How whittywhiz/sti-sync works
STI Sync is a class-scheduling application: staff maintain academic and resource data, generate a schedule, then inspect and adjust the timetable. The client provides login and views for programs, professors, rooms, courses, sections, generation, and timetable display. The server exposes the API and persists data in PostgreSQL; its generation endpoint builds scheduling input and runs a genetic algorithm in a worker before saving results. README documents conflict-free generation using availability, room type, section size, and curriculum. Server route details and most client API wiring were not sampled, so those links are shown only at the broad application boundary.
Main entry points: index.ts Express API · Index.tsx Workspace views · schedulingStore.ts Scheduling state · TimetableView.tsx View timetable
Components 21
Scheduling client
- App and routes
client/src/App.tsx - Workspace views
client/src/pages/Index.tsx - Academic catalogs
client/src/components/CoursesView.tsx - Professor records
client/src/components/ProfessorsView.tsx - Room records
client/src/components/RoomsView.tsx - Section records
client/src/components/SectionsView.tsx - Generate schedule
client/src/components/GenerateView.tsx - View timetable
client/src/components/TimetableView.tsx - Excel import
client/src/components/ImportExcelButton.tsx - Scheduling state
client/src/store/schedulingStore.ts
API and data
- Express API
server/src/index.ts - Database connection
server/src/db.ts - PostgreSQL
Generation engine
- Scheduling input
server/src/scheduling-data.ts - Genetic algorithm
server/src/ga.ts - Worker launcher
server/src/run-ga-worker.ts - GA worker
server/src/worker.ts
Scheduling domain
- Schedule validation
client/src/lib/generationValidation.ts - Collision checks
client/src/lib/collisionCheck.ts - Scheduling model
client/src/types/scheduling.ts
Other components
- Scheduling staff
Connections 32
- Scheduling staff → App and routes: use application
- App and routes → Workspace views: route to workspace
- Workspace views → Academic catalogs: select view
- Workspace views → Professor records: select view
- Workspace views → Room records: select view
- Workspace views → Section records: select view
- Workspace views → Generate schedule: select view
- Workspace views → View timetable: select view
- Academic catalogs → Scheduling state: manage catalog state
- Professor records → Scheduling state: manage scheduling state
- Room records → Scheduling state: manage scheduling state
- Section records → Scheduling state: manage scheduling state
- Generate schedule → Scheduling state: read scheduling state
- View timetable → Scheduling state: read schedule state
- Scheduling staff → Excel import: upload spreadsheet
- Excel import → Express API: submit import
- Generate schedule → Express API: request generation
- View timetable → Express API: timetable operations
- Express API → Database connection: query database
- Database connection → PostgreSQL: read and write
- Express API → Scheduling input: build generation input
- Scheduling input → Database connection: load scheduling data
- Express API → Genetic algorithm: build requirements
- Express API → Worker launcher: dispatch generation
- Worker launcher → GA worker: send worker data
- GA worker → Genetic algorithm: run algorithm
- Express API → Database connection: save generated schedule
- View timetable → Schedule validation: validate edits
- View timetable → Collision checks: check collisions
- Scheduling state → Scheduling model: uses domain model
- Schedule validation → Scheduling model: uses schedule types
- Collision checks → Scheduling model: uses schedule types