Palawan State University - Rizal Campus
A comprehensive online collaboration and meeting platform for academic excellence
- Overview
- Features
- Tech Stack
- Project Status
- Getting Started
- Project Structure
- Authentication & Roles
- Deployment
- Documentation
- Scripts
- Contributing
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.
- β 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
- π 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
- π¨βπ« 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
- ποΈ Content management system (CMS)
- π° Pricing and subscription management
- π Analytics and reporting
- βοΈ Platform settings and configuration
- π₯ 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
- 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
- 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
- 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)
- 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
| 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 |
| 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 |
- Node.js 18.0.0 or higher
- pnpm 8.0.0 or higher
- Git for version control
- Supabase account (for database and auth)
-
Clone the repository
git clone https://github.com/PROJECT01GALAHADD/COM-PSU-Rizal.git cd COM-PSU-Rizal -
Install dependencies
pnpm install
-
Set up environment variables
cp .env.example .env.local
Edit
.env.localwith 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
-
Run database migrations
pnpm db:push
-
Start the development server
pnpm dev
-
Open your browser
http://localhost:3000
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.shPSU-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
- Login/Signup β API validates credentials
- JWT Generation β Server signs JWT with user data
- Cookie Storage β httpOnly cookie set
- Middleware Verification β Every request verified
- Role-Based Routing β Access granted based on role
| 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 |
For testing purposes:
Student:
Email: [email protected]
Password: student123
Faculty:
Email: [email protected]
Password: faculty123
Admin:
Email: [email protected]
Password: admin123
Manual Deployment:
- Push code to GitHub
- Connect repository to Vercel
- Add environment variables
- Deploy
Detailed Guide: See docs/deployment/guide.md
This platform is optimized for Replit with autoscale deployment configuration.
Quick Steps:
- Import from GitHub:
https://github.com/PROJECT01GALAHADD/COM-PSU-Rizal - Set required secrets in Replit Secrets:
DATABASE_URL- Your production PostgreSQL databaseJWT_SECRET- Strong secret (32+ characters)SESSION_SECRET- Strong secret for sessions
- Connect Twilio integration via Replit Connectors (automatic credential management)
- Click Deploy button - Build takes ~2-3 minutes
- 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:
docs/deployment-success.md- Complete deployment guidedocs/twilio-quick-start.md- Twilio Video setupdocs/twilio-migration.md- Full Twilio documentation
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_tokenNote: When deploying to Replit, use the Twilio connector for automatic credential management.
Comprehensive documentation is available in the /docs folder:
- π Start Here - Complete getting started guide
- π Documentation Index - Full documentation catalog
- π₯ Twilio Video Quick Start - Test video conferencing
- π§ Twilio Migration Guide - Full Twilio documentation
- π Deployment Guide - Deploy to production
- ποΈ Database Setup - Database configuration
- π Project Summary - Detailed project overview
- π Running the App - Local development
- π Multi-Platform Deployment - Deploy anywhere
- π Platform Upgrade Plan - Enhancement roadmap
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
All scripts are organized in the /scripts folder:
# 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# Initialize database
bash scripts/database/init-db.sh
# Run migrations
pnpm db:push
# Seed database
bash scripts/database/seed-db.sh# Start development server
pnpm dev
# Build for production
pnpm build
# Run tests
pnpm test
# Type check
pnpm type-check
# Lint code
pnpm lint- 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
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
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
- 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.mdfor documentation standards
This project is developed for Palawan State University - Rizal Campus.
Educational use only.
- 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
For questions or issues:
- π§ Email: [email protected]
- π Documentation:
/docs - π Issues: GitHub Issues
- 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
- 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
- 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
