How sreeshnave7-ship-it/attendance-calculator works
AttendanceIQ is a browser-based attendance tracker. Users manage subjects, record class outcomes, and review live percentages, skip/recovery estimates, risk alerts, and historical trends; subject records persist in localStorage. Optional AI workflows parse natural-language logs, answer attendance questions, predict risk, and extract subjects from timetable images. The dashboard and feature pages present these workflows, while storage, attendance calculations, and server-side AI routes provide the main internal services. Some feature-page and API wiring is documented but not shown in the excerpts, so those links are marked unverified.
Main entry points: app/page.tsx Dashboard · trends/page.tsx Trends page · storage.ts Browser storage · claudeClient.ts Claude client
Components 23
App experience
- Dashboard
app/page.tsx - Subjects page
app/subjects/page.tsx - Trends page
app/trends/page.tsx - Assistant page
app/assistant/page.tsx - Navigation
components/Navbar.tsx - Theme provider
components/ThemeProvider.tsx
Attendance tracking
- Subject form
components/SubjectForm.tsx - Subject cards
components/SubjectCard.tsx - Attendance simulator
components/OverallAttendanceCalculator.tsx - Risk alerts
components/RiskAlertBanner.tsx - Trend chart
components/TrendChart.tsx
AI features
- Natural-language logger
components/NaturalLanguageInput.tsx - Chat window
components/ChatWindow.tsx - Timetable upload
components/TimetableUpload.tsx - Chat endpoint
app/api/chat/route.ts - Attendance parser
app/api/parse-attendance/route.ts - Risk prediction
app/api/predict-risk/route.ts - Timetable OCR
app/api/ocr-timetable/route.ts
Core services
- Claude client
lib/claudeClient.ts - Browser storage
lib/storage.ts - Attendance data hook
lib/hooks.ts - Attendance calculations
lib/attendanceMath.ts
Other components
- Student
Connections 35
- Student → Dashboard: uses
README.md - Student → Subjects page: manages subjects
README.md - Student → Trends page: reviews trends
README.md - Student → Assistant page: asks questions
README.md - Dashboard → Subject cards: renders
app/page.tsx - Dashboard → Attendance simulator: renders
app/page.tsx - Dashboard → Risk alerts: renders
app/page.tsx - Dashboard → Natural-language logger: renders
app/page.tsx - Dashboard → Browser storage: records attendance
app/page.tsx - Subjects page → Subject form: manages subjects
- Dashboard → Subject form: edits subjects
app/page.tsx - Trends page → Trend chart: renders
app/trends/page.tsx - Trends page → Attendance data hook: loads data
app/trends/page.tsx - Trends page → Browser storage: logs attendance
app/trends/page.tsx - Trends page → Attendance calculations: calculates trends
app/trends/page.tsx - Assistant page → Chat window: renders
app/assistant/page.tsx - Assistant page → Attendance data hook: loads data
app/assistant/page.tsx - Natural-language logger → Browser storage: reads and updates
components/NaturalLanguageInput.tsx - Chat window → Browser storage: reads history
components/ChatWindow.tsx - Attendance simulator → Attendance calculations: calculates estimates
components/OverallAttendanceCalculator.tsx - Attendance data hook → Browser storage: subscribes and reads
lib/hooks.ts - Dashboard → Navigation: includes navigation
- Navigation → Subject form: opens form
app/client-layout.tsx - Navigation → Timetable upload: opens import
app/client-layout.tsx - Timetable upload → Browser storage: imports subjects
app/client-layout.tsx - Natural-language logger → Attendance parser: submits text
- Chat window → Chat endpoint: sends messages
- Chat endpoint → Claude client: requests response
app/api/chat/route.ts - Chat endpoint → Attendance calculations: computes attendance
app/api/chat/route.ts - Attendance parser → Claude client: requests extraction
app/api/parse-attendance/route.ts - Timetable upload → Timetable OCR: uploads image
- Timetable OCR → Claude client: requests extraction
app/api/ocr-timetable/route.ts - Dashboard → Risk prediction: requests risk analysis
- Risk prediction → Claude client: requests prediction
app/api/predict-risk/route.ts - Trends page → Attendance calculations: calculates attendance
app/trends/page.tsx