How ihsanbaihaqii/siaira works
Smart Academic AI is an academic operations system for managing teaching schedules, attendance, replacement sessions, exams, and teaching progress, with analytics and an AI assistant. Users work through the React dashboard; its pages call a shared API adapter that selects an Express API when available or a browser-local engine for static deployments. The server routes handle domain requests against SQLite, with academic transaction logic and AI scheduling/analysis services behind them. Major UI capabilities are represented, but several backend route details are unsampled, so only evidenced wiring is shown.
Main entry points: App.tsx Application routes · api.ts API adapter · database.ts SQLite database · server.ts HTTP server
Components 25
Web application
- Application routes
src/App.tsx - Main layout
src/layouts/MainLayout.tsx - Dashboard
src/pages/dashboard/DashboardPage.tsx - Smart roster UI
src/pages/roster/SmartRosterPage.tsx - Exam management UI
src/pages/exams/ExamsPage.tsx - Attendance UI
src/pages/attendance/AttendancePage.tsx - Replacement UI
src/pages/replacement/ReplacementPage.tsx - Teaching progress UI
src/pages/progress/TeachingProgressPage.tsx - AI analytics UI
src/pages/analytics/AiAnalyticsPage.tsx - AI assistant UI
src/pages/assistant/AiAssistantPage.tsx - Master data UI
src/pages/master/MasterDataPage.tsx - API adapter
src/services/api.ts - Browser academic engine
src/services/localEngine.ts
Academic operations
- HTTP server
server.ts - Academic routes
server/routes/academicRoutes.ts - Master data routes
server/routes/masterRoutes.ts - Roster routes
server/routes/rosterRoutes.ts - Exam routes
server/routes/examRoutes.ts - Academic transactions
server/services/academicService.ts
AI capabilities
- AI and assistant routes
server/routes/aiRoutes.ts - ML analytics engine
server/ai/mlEngine.ts - Replacement scheduler
server/ai/smartRescheduler.ts
Persistence
- SQLite database
server/db/database.ts
Other components
- Academic staff
- Google GenAI
Connections 42
- Academic staff → Application routes: uses
src/App.tsx - Application routes → Main layout: renders
src/App.tsx - Application routes → Dashboard: routes to
src/App.tsx - Application routes → Smart roster UI: routes to
src/App.tsx - Application routes → Exam management UI: routes to
src/App.tsx - Application routes → Attendance UI: routes to
src/App.tsx - Application routes → Replacement UI: routes to
src/App.tsx - Application routes → Teaching progress UI: routes to
src/App.tsx - Application routes → AI analytics UI: routes to
src/App.tsx - Application routes → AI assistant UI: routes to
src/App.tsx - Application routes → Master data UI: routes to
src/App.tsx - Dashboard → API adapter: requests data
src/pages/dashboard/DashboardPage.tsx - Smart roster UI → API adapter: requests data
src/pages/roster/SmartRosterPage.tsx - Exam management UI → API adapter: requests data
src/pages/exams/ExamsPage.tsx - Attendance UI → API adapter: requests data
src/pages/attendance/AttendancePage.tsx - Replacement UI → API adapter: requests data
src/pages/replacement/ReplacementPage.tsx - Teaching progress UI → API adapter: requests data
src/pages/progress/TeachingProgressPage.tsx - AI analytics UI → API adapter: requests data
src/pages/analytics/AiAnalyticsPage.tsx - AI assistant UI → API adapter: requests data
src/pages/assistant/AiAssistantPage.tsx - Master data UI → API adapter: requests data
src/pages/master/MasterDataPage.tsx - API adapter → Browser academic engine: dispatches locally
src/services/api.ts - API adapter → HTTP server: HTTP requests
src/services/api.ts - HTTP server → Academic routes: registers routes
server.ts - HTTP server → Master data routes: registers routes
server.ts - HTTP server → Roster routes: registers routes
server.ts - HTTP server → Exam routes: registers routes
server.ts - HTTP server → AI and assistant routes: registers routes
server.ts - Academic routes → SQLite database: queries
server/routes/academicRoutes.ts - Academic routes → Academic transactions: calls transactions
server/routes/academicRoutes.ts - Master data routes → SQLite database: queries
server/routes/masterRoutes.ts - Roster routes → SQLite database: queries
server/routes/rosterRoutes.ts - Exam routes → SQLite database: queries
server/routes/examRoutes.ts - Exam routes → Academic transactions: uses domain logic
server/routes/examRoutes.ts - Academic transactions → SQLite database: transactions
server/services/academicService.ts - AI and assistant routes → SQLite database: queries
server/routes/aiRoutes.ts - AI and assistant routes → ML analytics engine: calls analytics
server/routes/aiRoutes.ts - AI and assistant routes → Replacement scheduler: calls scheduling
server/routes/aiRoutes.ts - ML analytics engine → SQLite database: reads and trains
server/ai/mlEngine.ts - ML analytics engine → Academic transactions: uses day names
server/ai/mlEngine.ts - Replacement scheduler → SQLite database: uses data
server/ai/smartRescheduler.ts - Replacement scheduler → Academic transactions: uses domain logic
server/ai/smartRescheduler.ts - AI and assistant routes → Google GenAI: optional AI calls
server/routes/aiRoutes.ts