Skip to content

PROJECT01GALAHADD/COM-PSU-Rizal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PSU Rizal - Academic Collaboration Platform

PSU Rizal Platform - Landing Page

Palawan State University - Rizal Campus
A comprehensive online collaboration and meeting platform for academic excellence

Status Next.js TypeScript Tailwind


πŸ“‹ Table of Contents


🎯 Overview

PSU Rizal Academic Collaboration Platform is a modern, full-stack web application designed to facilitate online learning, collaboration, and academic management for Palawan State University - Rizal Campus. The platform provides video conferencing, academic management, and role-based access for students, faculty, and administrators.

Key Highlights

  • βœ… Production Ready - Fully tested and deployment-ready with autoscale configuration
  • πŸŽ₯ Enterprise Video - Twilio Video integration for HD conferencing (up to 50 participants)
  • πŸ‘₯ Guest Access - No account required for joining meetings
  • πŸ“š Academic Management - Complete curriculum system with 4 programs and 164 subjects
  • πŸ” Secure Authentication - JWT-based with role-based access control and admin approval
  • πŸ“± Responsive Design - Beautiful glass morphism UI that works on all devices
  • πŸš€ Modern Stack - Next.js 14, React 18, TypeScript, Tailwind CSS 4, PostgreSQL
  • πŸ”„ Multi-Platform - Deploys to Replit (autoscale), Vercel, or Firebase

✨ Features

For Students

  • πŸ“– View enrolled courses and progress
  • πŸ“ Submit assignments and track grades
  • πŸ“… Access class schedules
  • πŸ“₯ Download course materials and resources
  • πŸ”” Receive notifications and announcements
  • πŸŽ₯ Join video classes instantly

For Faculty

  • πŸ‘¨β€πŸ« Manage multiple classes and sections
  • πŸ“Š Track student attendance and performance
  • ✍️ Grade assignments and provide feedback
  • πŸ“’ Post announcements to students
  • πŸ“€ Upload teaching materials
  • πŸŽ₯ Conduct live video lectures

For Administrators

  • πŸŽ›οΈ Content management system (CMS)
  • πŸ’° Pricing and subscription management
  • πŸ“ˆ Analytics and reporting
  • βš™οΈ Platform settings and configuration

Video Conferencing (Twilio Video)

  • πŸŽ₯ Enterprise-grade HD video - Powered by Twilio Video SDK
  • 🎀 Professional controls - Mute/unmute, camera on/off
  • πŸ–₯️ Screen sharing - Built-in screen share capability
  • πŸ’¬ Real-time chat - In-meeting chat with WebSocket
  • πŸ‘₯ Up to 50 participants - Scalable SFU architecture
  • πŸ”— Guest access - Join meetings without account via shareable links
  • πŸ“Ή Recording ready - Infrastructure for meeting recordings
  • 🌐 Global reliability - Twilio's enterprise infrastructure

πŸ›  Tech Stack

Frontend

  • Framework: Next.js 14.2.4 (App Router)
  • UI Library: React 18.2.0
  • Language: TypeScript
  • Styling: Tailwind CSS 4.1.9
  • Components: Radix UI primitives
  • Icons: Lucide React
  • Charts: Chart.js, Recharts
  • Forms: React Hook Form + Zod validation

Backend & Database

  • Database ORM: Drizzle ORM
  • Database: PostgreSQL (Replit/Neon)
  • Database Driver: postgres driver
  • Authentication: JWT with jose library
  • Password Hashing: bcryptjs
  • API Routes: Next.js serverless functions
  • Middleware: Role-based access control

Real-time & Video

  • Video Platform: Twilio Video (Enterprise SFU)
  • Video SDK: twilio-video 2.x
  • Real-time Chat: WebSocket
  • State Management: React Hooks + TanStack Query
  • Storage: Replit Object Storage (multi-platform adapter)

Deployment & DevOps

  • Primary Hosting: Replit (autoscale deployment)
  • Alternative Hosting: Vercel, Firebase
  • Environment: Node.js 20+
  • Package Manager: pnpm
  • Build Tool: Next.js compiler
  • CI/CD: Automated deployments configured
  • Feature Flags: Runtime toggles with @vercel/flags

πŸ“Š Project Status

βœ… Completed Features

Feature Status Description
Authentication βœ… Complete JWT-based with admin approval workflow
Student Dashboard βœ… Complete 6 tabs (Courses, Assignments, Grades, Schedule, Resources, Notifications)
Faculty Dashboard βœ… Complete 6 tabs (Classes, Students, Grading, Schedule, Resources, Announcements)
Admin Dashboard βœ… Complete CMS with content, pricing, analytics, settings
Guest Access βœ… Complete Join meetings without account
Twilio Video βœ… Complete Enterprise HD video with up to 50 participants
Meeting UI βœ… Complete Professional conference layout with controls
Curriculum System βœ… Complete 4 bachelor programs, 164 subjects, complete curriculum
Database Schema βœ… Complete 20+ tables with relationships
Documentation βœ… Complete Comprehensive docs in /docs folder
Deployment Config βœ… Complete Replit autoscale + Vercel + Firebase ready
Multi-Platform Ready βœ… Complete Auto-detects and configures for deployment platform

πŸ”„ In Progress / Future Enhancements

Feature Status Notes
Email Notifications 🟑 Pending Infrastructure ready, needs SMTP configuration
Advanced Analytics 🟑 Pending Basic analytics implemented
File Upload to Cloud 🟑 Pending Object storage ready, UI needs implementation
Mobile App 🟑 Future PWA support ready
Sentry Integration 🟑 Optional Error monitoring configured but needs DSN

πŸš€ Getting Started

Prerequisites

  • Node.js 18.0.0 or higher
  • pnpm 8.0.0 or higher
  • Git for version control
  • Supabase account (for database and auth)

Installation

  1. Clone the repository

    git clone https://github.com/PROJECT01GALAHADD/COM-PSU-Rizal.git
    cd COM-PSU-Rizal
  2. Install dependencies

    pnpm install
  3. Set up environment variables

    cp .env.example .env.local

    Edit .env.local with your configuration:

    # Database (Required)
    DATABASE_URL=your_postgres_connection_string
    
    # Authentication (Required)
    JWT_SECRET=your_jwt_secret
    SESSION_SECRET=your_session_secret
    
    # Twilio Video (Required for video conferencing)
    TWILIO_ACCOUNT_SID=your_twilio_account_sid
    TWILIO_API_KEY=your_twilio_api_key
    TWILIO_API_SECRET=your_twilio_api_secret
    
    # Optional: Error monitoring
    NEXT_PUBLIC_SENTRY_DSN=your_sentry_dsn
  4. Run database migrations

    pnpm db:push
  5. Start the development server

    pnpm dev
  6. Open your browser

    http://localhost:3000
    

Quick Start with Scripts

We provide convenient scripts in the /scripts folder:

# Start app with database
bash scripts/deployment/start-app.sh --with-db

# Upload to GitHub
bash scripts/deployment/quick-upload.sh

# Deploy to Vercel
bash scripts/deployment/prepare-for-vercel.sh

πŸ“ Project Structure

PSU-Rizal/
β”œβ”€β”€ app/                          # Next.js App Router
β”‚   β”œβ”€β”€ api/                      # API routes
β”‚   β”‚   β”œβ”€β”€ auth/                 # Authentication endpoints
β”‚   β”‚   β”œβ”€β”€ debug/                # Debug utilities
β”‚   β”‚   └── geo/                  # Geolocation API
β”‚   β”œβ”€β”€ admin/                    # Admin dashboard
β”‚   β”œβ”€β”€ faculty/                  # Faculty dashboard
β”‚   β”œβ”€β”€ student/                  # Student dashboard
β”‚   β”œβ”€β”€ meetings/                 # Video conferencing
β”‚   β”œβ”€β”€ guest/                    # Guest access
β”‚   └── [pages]/                  # Other pages
β”œβ”€β”€ components/                   # React components
β”‚   β”œβ”€β”€ ui/                       # Radix UI components
β”‚   β”œβ”€β”€ auth/                     # Auth components
β”‚   β”œβ”€β”€ dashboard/                # Dashboard components
β”‚   └── [others]/                 # Shared components
β”œβ”€β”€ lib/                          # Core libraries
β”‚   β”œβ”€β”€ database/                 # Drizzle ORM setup
β”‚   β”‚   β”œβ”€β”€ schema.ts             # Database schema
β”‚   β”‚   β”œβ”€β”€ connection.ts         # DB connection
β”‚   β”‚   └── utils.ts              # DB utilities
β”‚   β”œβ”€β”€ supabase/                 # Supabase clients
β”‚   └── auth.ts                   # JWT utilities
β”œβ”€β”€ hooks/                        # React hooks
β”‚   β”œβ”€β”€ use-webrtc.ts             # WebRTC hook
β”‚   β”œβ”€β”€ use-websocket.ts          # WebSocket hook
β”‚   └── use-toast.ts              # Toast notifications
β”œβ”€β”€ docs/                         # Documentation
β”‚   β”œβ”€β”€ deployment/               # Deployment guides
β”‚   β”œβ”€β”€ setup/                    # Setup instructions
β”‚   β”œβ”€β”€ archive/                  # Historical docs
β”‚   └── [guides]/                 # Various guides
β”œβ”€β”€ scripts/                      # Utility scripts
β”‚   β”œβ”€β”€ deployment/               # Deployment scripts
β”‚   β”œβ”€β”€ database/                 # Database scripts
β”‚   └── utilities/                # Helper scripts
β”œβ”€β”€ public/                       # Static assets
β”‚   β”œβ”€β”€ images/                   # Images
β”‚   └── icons/                    # Icons
β”œβ”€β”€ drizzle/                      # Drizzle migrations
β”œβ”€β”€ supabase/                     # Supabase config
└── [config files]                # Configuration files

πŸ” Authentication & Roles

Authentication Flow

  1. Login/Signup β†’ API validates credentials
  2. JWT Generation β†’ Server signs JWT with user data
  3. Cookie Storage β†’ httpOnly cookie set
  4. Middleware Verification β†’ Every request verified
  5. Role-Based Routing β†’ Access granted based on role

User Roles

Role Access Routes
Student Student dashboard, courses, assignments /student/*
Faculty Faculty dashboard, classes, grading /faculty/*
Admin Full platform control, CMS, analytics /admin/*
Guest Meeting access only (with URL parameter) /meetings/*?guest=true

Demo Credentials

For testing purposes:

Student:
  Email: [email protected]
  Password: student123

Faculty:
  Email: [email protected]
  Password: faculty123

Admin:
  Email: [email protected]
  Password: admin123

🌐 Deployment

Deploy to Vercel

Deploy with Vercel

Manual Deployment:

  1. Push code to GitHub
  2. Connect repository to Vercel
  3. Add environment variables
  4. Deploy

Detailed Guide: See docs/deployment/guide.md

Deploy to Replit (Recommended)

This platform is optimized for Replit with autoscale deployment configuration.

Quick Steps:

  1. Import from GitHub: https://github.com/PROJECT01GALAHADD/COM-PSU-Rizal
  2. Set required secrets in Replit Secrets:
    • DATABASE_URL - Your production PostgreSQL database
    • JWT_SECRET - Strong secret (32+ characters)
    • SESSION_SECRET - Strong secret for sessions
  3. Connect Twilio integration via Replit Connectors (automatic credential management)
  4. Click Deploy button - Build takes ~2-3 minutes
  5. Your app goes live at your Replit deployment URL!

Deployment Configuration:

  • βœ… Build command: pnpm run build (already configured)
  • βœ… Start command: next start -H 0.0.0.0 -p ${PORT:-5000}
  • βœ… Deployment target: autoscale (auto-scales based on traffic)
  • βœ… Port binding: Automatically uses Replit's PORT environment variable

Testing Video: After deployment, test video conferencing at /meeting/test-001

Detailed Guides:

Environment Variables (Production)

Required for deployment:

# Database (Required)
DATABASE_URL=your_postgresql_connection_string

# Authentication (Required)
JWT_SECRET=your_strong_secret_32_chars_minimum
SESSION_SECRET=your_session_secret

# Twilio Video (Required - or use Replit connector)
TWILIO_ACCOUNT_SID=your_account_sid
TWILIO_API_KEY=your_api_key
TWILIO_API_SECRET=your_api_secret

# Optional: Error Monitoring
NEXT_PUBLIC_SENTRY_DSN=your_sentry_dsn
SENTRY_AUTH_TOKEN=your_sentry_token

Note: When deploying to Replit, use the Twilio connector for automatic credential management.


πŸ“š Documentation

Comprehensive documentation is available in the /docs folder:

Quick Links

Documentation Structure

docs/
β”œβ”€β”€ README.md                     # Documentation index
β”œβ”€β”€ deployment/                   # Deployment guides
β”‚   β”œβ”€β”€ start-here.md
β”‚   β”œβ”€β”€ guide.md
β”‚   β”œβ”€β”€ github-upload.md
β”‚   └── checklist.md
β”œβ”€β”€ setup/                        # Setup & configuration
β”‚   β”œβ”€β”€ quick-reference.md
β”‚   β”œβ”€β”€ database-manual.md
β”‚   └── supabase-guide.md
└── [other docs]                  # Various guides

πŸ”§ Scripts

All scripts are organized in the /scripts folder:

Deployment Scripts

# Quick upload to GitHub
bash scripts/deployment/quick-upload.sh

# Start application
bash scripts/deployment/start-app.sh

# Prepare for Vercel
bash scripts/deployment/prepare-for-vercel.sh

# Cleanup for deployment
bash scripts/deployment/cleanup-for-vercel.sh

Database Scripts

# Initialize database
bash scripts/database/init-db.sh

# Run migrations
pnpm db:push

# Seed database
bash scripts/database/seed-db.sh

Development Scripts

# Start development server
pnpm dev

# Build for production
pnpm build

# Run tests
pnpm test

# Type check
pnpm type-check

# Lint code
pnpm lint

πŸ“¦ Database Schema

Core Tables

  • users - User accounts with roles (student, faculty, admin, guest)
  • meetings - Video conference meetings
  • participants - Meeting participants
  • chat_messages - In-meeting chat
  • courses - Academic courses
  • enrollments - Student-course relationships
  • assignments - Course assignments
  • submissions - Student assignment submissions

Relationships

users
β”œβ”€β”€ β†’ meetings (as host)
β”œβ”€β”€ β†’ enrollments (as student)
β”œβ”€β”€ β†’ submissions (as student)
└── β†’ courses (as faculty)

meetings
β”œβ”€β”€ β†’ participants
β”œβ”€β”€ β†’ chat_messages
└── β†’ courses

courses
β”œβ”€β”€ β†’ enrollments
└── β†’ assignments
    └── β†’ submissions

Full Schema: See lib/database/schema.ts


🀝 Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Use Tailwind CSS for styling
  • Follow the existing code structure
  • Add tests for new features
  • Update documentation as needed
  • Read: docs/documentation-rules.md for documentation standards

πŸ“„ License

This project is developed for Palawan State University - Rizal Campus.
Educational use only.


πŸ™ Acknowledgments

  • Palawan State University - For the opportunity to build this platform
  • Next.js Team - For the amazing framework
  • Vercel - For hosting and deployment platform
  • Supabase - For backend infrastructure
  • Radix UI - For accessible UI components
  • Tailwind CSS - For the styling framework

πŸ“ž Support

For questions or issues:


πŸ—ΊοΈ Roadmap

Version 1.0 (Current - Production Ready) βœ…

  • JWT authentication with admin approval workflow
  • Student/Faculty/Admin dashboards (complete)
  • Twilio Video integration - Enterprise HD video conferencing
  • Guest access for meetings
  • Complete curriculum system (4 programs, 164 subjects)
  • Database schema with 20+ tables
  • Deployment configuration (Replit autoscale, Vercel, Firebase)
  • Multi-platform storage adapter
  • Feature flags system
  • Real-time chat via WebSocket

Version 1.1 (Optional Enhancements) πŸ”„

  • Sentry error monitoring (configured, needs DSN)
  • Email notifications (infrastructure ready)
  • File upload UI (storage adapter ready)
  • Advanced analytics dashboard
  • Meeting recordings (Twilio supports this)
  • Mobile PWA optimizations

Version 2.0 (Future Vision) πŸš€

  • Native mobile applications (iOS/Android)
  • AI-powered features (assignment grading, attendance tracking)
  • Advanced reporting and data visualization
  • Integration with university enrollment systems
  • Multi-campus support
  • Learning Management System (LMS) features

Made with ❀️ for PSU Rizal

🌐 Live Demo | πŸ“– Documentation | πŸ› Report Bug

# COM-PSU-Rizal

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published