Skip to content
princekumar-devPublic

About

CSCAS (Collaborative Smart Class Allocation System) - AI-powered class allocation & timetable platform for colleges: manage classes and staff, auto-generate schedules, collect feedback and track staff performance. React + Supabase.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CSCAS — Collaborative Smart Class Allocation System

AI-powered class allocation & timetable platform for colleges

React TypeScript Vite Tailwind CSS Supabase PostgreSQL

This repository hosts the CSCAS app (the repo name CSCS is a shorthand).

🎯 Overview

CSCAS is a full-stack platform that solves the messiest problem in department administration: building class timetables. Admins register classes, subjects, and staff once — then CSCAS generates an allocation-aware schedule automatically, while staff pick their own class preferences and everyone from the HOD to the students sees the result.

  • Real backend: Supabase (Postgres + Auth + Row Level Security), schema shipped as versioned migrations
  • Frontend: React + TypeScript + Vite + Tailwind CSS + shadcn/ui

✨ Features

🤖 AI-Powered Schedule Generation

  • One-click timetable generation from your classes, subjects, and staff pool (/generate-schedule)
  • Live schedule view with the generated result (/timetable)

🏫 Class & Staff Management

  • Manage Classes — set up classes with their subjects and assigned staff (/manage-classes)
  • Manage Staff — register faculty into the system (/manage-staff)
  • Staff Class Choices — staff select which classes they want to teach (/choose-classes)

📊 Dashboards & Performance

  • Admin dashboard with at-a-glance stats: total classes, registered staff, active schedules, alerts
  • Staff performance tracking page (/staff-performance)
  • Class logs — history of what ran when (/class-logs)

💬 Feedback

  • Build and issue feedback forms (/feedback-forms)
  • Collect and review responses (/feedback)

🔔 Notifications & Alerts

  • Active alert feed on the dashboard, backed by a notifications table

🔐 Auth & Roles

  • Supabase email/password auth
  • Profiles auto-created on signup (database trigger)
  • Role-based access via user_roles

🗺️ Routes

Route Page
/ Login
/dashboard Admin dashboard (stats + quick actions)
/timetable Generated timetable view
/generate-schedule AI schedule generation
/manage-classes Classes, subjects & staff assignment
/manage-staff Faculty registration
/choose-classes Staff class preferences
/feedback · /feedback-forms Feedback collection & management
/class-logs Class history logs
/staff-performance Staff performance analytics
* 404

🗄️ Database Schema

Migrations live in supabase/migrations/:

Table Purpose
classes Class sections
subjects Subjects taught per class
staff_class_choices Staff→class preferences
schedules Generated timetables
feedback · notifications Feedback responses & alerts
profiles User profiles (auto-filled by signup trigger)
user_roles Role assignments

Row Level Security is enabled on user-facing tables.

🚀 Getting Started

1. Clone & install

git clone https://github.com/princekumar-dev/CSCS.git
cd CSCS
npm install

2. Connect Supabase

  1. Create a project at supabase.com
  2. Run the migrations in supabase/migrations/ (Supabase CLI: supabase db push)
  3. Create .env in the project root:
VITE_SUPABASE_PROJECT_ID=your_project_ref
VITE_SUPABASE_PUBLISHABLE_KEY=your_publishable_key
VITE_SUPABASE_URL=https://your_project_ref.supabase.co

🔑 The committed .env contains only this project's publishable Supabase keys (safe by design — they're meant for browsers and protected by RLS). When deploying your own instance, supply your own project's keys.

3. Run

npm run dev        # http://localhost:5173

Scripts

Command What it does
npm run dev Dev server with HMR
npm run build Production build → dist/
npm run preview Preview the production build
npm run lint ESLint
npm run test Unit tests (Vitest)

📁 Project Structure

CSCS/
├── src/
│   ├── pages/                    # Login, Dashboard, Timetable, Manage*, Feedback…
│   ├── components/dashboards/    # Role dashboards (Admin, Staff…)
│   ├── hooks/useAuth.tsx         # Supabase auth hook
│   ├── integrations/supabase/    # Typed Supabase client & DB types
│   └── App.tsx                   # Route definitions
├── supabase/
│   ├── config.toml               # Supabase project config
│   └── migrations/               # Versioned schema (classes, schedules…)
├── vitest.config.ts · playwright.config.ts
└── vite.config.ts

📄 License

All rights reserved.

About

CSCAS (Collaborative Smart Class Allocation System) - AI-powered class allocation & timetable platform for colleges: manage classes and staff, auto-generate schedules, collect feedback and track staff performance. React + Supabase.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages