This repository hosts the CSCAS app (the repo name
CSCSis a shorthand).
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
- One-click timetable generation from your classes, subjects, and staff pool (
/generate-schedule) - Live schedule view with the generated result (
/timetable)
- 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)
- 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)
- Build and issue feedback forms (
/feedback-forms) - Collect and review responses (
/feedback)
- Active alert feed on the dashboard, backed by a
notificationstable
- Supabase email/password auth
- Profiles auto-created on signup (database trigger)
- Role-based access via
user_roles
| 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 |
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.
git clone https://github.com/princekumar-dev/CSCS.git
cd CSCS
npm install- Create a project at supabase.com
- Run the migrations in
supabase/migrations/(Supabase CLI:supabase db push) - Create
.envin 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
.envcontains 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.
npm run dev # http://localhost:5173| 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) |
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
All rights reserved.