Skip to content

Latest commit

Β 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ ICCT SmartCampus Portal

A production-ready full-stack school management system combining a Learning Management System (LMS) and Student Information System (SIS) for ICCT Colleges.

React Node.js PostgreSQL Tailwind CSS License: MIT


πŸ“‹ Table of Contents


✨ Features

🌐 Public Website

  • Home, About, Contact, FAQ, Privacy, Terms pages
  • News & Announcements feed
  • Newsletter subscription
  • Search bar with auto-suggest
  • System Status page
  • Help Center / Knowledge Base
  • Custom 404 page
  • Fully responsive (mobile, tablet, desktop)

πŸ‘¨β€πŸŽ“ Student Portal

  • Dashboard with schedule, grades, and announcements
  • View prelim/midterm/final grades with equivalency
  • Weekly class schedule viewer
  • Access and download course learning materials
  • Edit personal profile

πŸ‘¨β€πŸ« Faculty Portal

  • View assigned course sections and class rosters
  • Encode and submit student grades online
  • Upload and manage course learning materials per section
  • View teaching schedule

πŸ› οΈ Admin Portal

  • System dashboard with live statistics and charts
  • User management (approve, suspend, delete accounts)
  • Course and section management (CRUD)
  • Create and publish announcements
  • Finalize submitted grades
  • Trigger manual or review automated backups
  • Full audit log

πŸ”’ Security

  • bcrypt password hashing (12 salt rounds)
  • JWT access + refresh token authentication
  • Role-based access control (Student / Faculty / Admin / Super Admin)
  • Helmet.js HTTP security headers
  • Rate limiting (100 req/15min)
  • Input validation and XSS sanitization

πŸ’Ύ Automated Backup System

  • Daily automated PostgreSQL dump (2:00 AM Asia/Manila)
  • C++ microservice encrypts backup file using AES-256-CBC
  • Encrypted file uploaded to Google Drive via API
  • Backup status logged to database

πŸ›  Tech Stack

Layer Technology
Frontend React 18 + Vite + Tailwind CSS
Backend Node.js 20 + Express 4
Database PostgreSQL 15
Auth JWT (access + refresh) + bcrypt
C++ Service AES-256 encryption microservice
File Storage Local + Google Drive (backups)
Deployment Vercel / Railway / Supabase

πŸ“ Project Structure

smartcampus-portal/
β”œβ”€β”€ frontend/                   # React + Vite app
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   └── layout/        # Navbar, Footer, PortalLayout, PublicLayout
β”‚   β”‚   β”œβ”€β”€ context/           # AuthContext (JWT state)
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ auth/          # Login, Register
β”‚   β”‚   β”‚   β”œβ”€β”€ public/        # Home, About, Contact, FAQ, etc.
β”‚   β”‚   β”‚   └── portal/
β”‚   β”‚   β”‚       β”œβ”€β”€ student/   # Dashboard, Grades, Schedule, Materials
β”‚   β”‚   β”‚       β”œβ”€β”€ faculty/   # Dashboard, Grades encoder, Materials
β”‚   β”‚   β”‚       └── admin/     # Dashboard, Users, Courses, Backup
β”‚   β”‚   β”œβ”€β”€ styles/            # Tailwind + custom CSS
β”‚   β”‚   └── utils/             # Axios API client with auto-refresh
β”‚   └── package.json
β”‚
β”œβ”€β”€ backend/                    # Node.js + Express API
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/            # PostgreSQL pool
β”‚   β”‚   β”œβ”€β”€ controllers/       # 11 controllers
β”‚   β”‚   β”œβ”€β”€ middleware/        # Auth, validation, upload
β”‚   β”‚   β”œβ”€β”€ routes/            # 12 route files
β”‚   β”‚   β”œβ”€β”€ services/          # Backup, Scheduler
β”‚   β”‚   └── utils/             # API response helpers, logger
β”‚   └── package.json
β”‚
β”œβ”€β”€ cpp-service/                # C++ AES-256 microservice
β”‚   β”œβ”€β”€ src/main.cpp
β”‚   β”œβ”€β”€ CMakeLists.txt
β”‚   └── Dockerfile
β”‚
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ migrations/            # 001_initial_schema.sql (16 tables)
β”‚   └── seeds/                 # 001_seed_data.sql (demo data)
β”‚
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ srs/                   # Software Requirements Specification
β”‚   β”œβ”€β”€ api/                   # REST API Documentation (45+ endpoints)
β”‚   └── DEPLOYMENT_GUIDE.md
β”‚
└── deployment/
    └── docker-compose.yml

πŸš€ Getting Started

Prerequisites

1. Clone the repository

git clone https://github.com/YOUR_USERNAME/smartcampus-portal.git
cd smartcampus-portal

2. Set up the database

psql -U postgres -c "CREATE DATABASE smartcampus_db;"
psql -U postgres -d smartcampus_db -f database/migrations/001_initial_schema.sql
psql -U postgres -d smartcampus_db -f database/seeds/001_seed_data.sql

3. Configure the backend

cd backend
cp .env.example .env

Edit .env and fill in your values:

DB_HOST=localhost
DB_PORT=5432
DB_NAME=smartcampus_db
DB_USER=postgres
DB_PASSWORD=your_password
JWT_SECRET=your_secret_key_here
JWT_REFRESH_SECRET=your_refresh_secret_here

4. Install and run the backend

cd backend
npm install
npm run dev
# β†’ API running at http://localhost:5000

5. Install and run the frontend

cd frontend
npm install
npm run dev
# β†’ App running at http://localhost:5173

Open http://localhost:5173 in your browser.


πŸ”‘ Default Accounts

These are seed data accounts for testing. Change all passwords in production.

Role Email Password
Super Admin superadmin@icctsmartcampus.edu.ph SmartCampus@2024!
Admin admin@icctsmartcampus.edu.ph SmartCampus@2024!
Faculty jdela.cruz@icctsmartcampus.edu.ph SmartCampus@2024!
Student student1@gmail.com SmartCampus@2024!
Student student2@gmail.com SmartCampus@2024!

πŸ“‘ API Documentation

Base URL: http://localhost:5000/api

Method Endpoint Description
POST /auth/register Register new account
POST /auth/login Login and receive tokens
POST /auth/refresh Refresh access token
GET /auth/me Get current user profile
GET /students List all students (Admin/Faculty)
GET /students/:id Get student by ID
PUT /students/:id Update student profile
GET /students/:id/grades Get student grades
GET /students/:id/schedule Get student schedule
GET /faculty List all faculty (Admin)
GET /courses List all courses
POST /courses Create course (Admin)
POST /enrollments Enroll student in section
POST /grades Submit grades (Faculty)
GET /grades/:studentId Get grades by student
GET /announcements List public announcements
POST /announcements Create announcement
GET /notifications Get user notifications
PUT /notifications/read-all Mark all as read
GET /materials/section/:id Get materials for section
POST /materials Upload material (Faculty)
POST /newsletter/subscribe Subscribe to newsletter
GET /admin/dashboard Admin statistics
GET /admin/users List all users
PUT /admin/users/:id/status Update user status
POST /backup/run Trigger manual backup

Full API docs: docs/api/API_DOCUMENTATION.md


☁️ Deployment

Service Platform
Frontend Vercel
Backend Railway
Database Supabase
C++ Service Railway (Docker)
Backups Google Drive API

See full instructions: docs/DEPLOYMENT_GUIDE.md


πŸ—οΈ C++ Microservice

The cpp-service/ directory contains a standalone HTTP server written in C++ that handles AES-256-CBC file encryption for database backups.

# Build (Linux/macOS/WSL)
cd cpp-service
g++ -std=c++17 -O2 -o smartcampus-service src/main.cpp -lssl -lcrypto -lpthread

# Run
./smartcampus-service 8080

The Node.js backend calls this service automatically during backup. If unavailable, it falls back to uploading the unencrypted dump.


πŸ“„ License

This project is licensed under the MIT License β€” see LICENSE for details.


πŸ‘₯ Authors

Built as a capstone-level school portal project for ICCT Colleges.


Keywords: school portal, student information system, learning management system, LMS, SIS, React, Node.js, PostgreSQL, Express, Tailwind CSS, school management system, academic portal, ICCT, Philippines

About

Full-stack school portal with LMS and SIS - React, Node.js, PostgreSQL

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages