How agnesvika162-star/kemudi-sistem-pemantauan-kantuk-pengemudi works
This is a driver-drowsiness monitoring application: a signed-in user starts live monitoring, browser camera frames are sent to the API for AI classification, and the UI presents status/alerts and monitoring history. The frontend also supports registration, login, profile management, trip records, and dashboard summaries. Source excerpts establish the main API, inference, persistence, and dashboard interactions; some frontend routes and backend endpoints are only partially sampled, so those relationships are omitted where not evidenced.
Main entry points: main.py FastAPI Service · App.jsx App Router · DashboardPage.jsx Dashboard · ProfilePage.jsx Profile Page
Components 16
Frontend
- App Router
frontend/drowsiness-app/src/App.jsx - Camera Capture
frontend/drowsiness-app/src/components/CameraSection.jsx - Live Detection
frontend/drowsiness-app/src/pages/LiveDetectionPage.jsx - Dashboard
frontend/drowsiness-app/src/pages/DashboardPage.jsx - History Charts
frontend/drowsiness-app/src/components/ChartSection.jsx - History Page
frontend/drowsiness-app/src/pages/HistoryPage.jsx - Profile Page
frontend/drowsiness-app/src/pages/ProfilePage.jsx
Identity
- Login and Register
frontend/drowsiness-app/src/pages/LoginPage.jsx - Token Storage
frontend/drowsiness-app/src/utils/auth.js - JWT Checks
backend/jwt.py
Detection
- FastAPI Service
backend/main.py - Drowsiness Inference
backend/ai.py
Monitoring Records
- Data Models
backend/models.py - Database Sessions
backend/database.py - API Schemas
backend/schemas.py
Other components
- Driver
Connections 19
- Driver → App Router: uses
- App Router → Live Detection: routes to
frontend/drowsiness-app/src/App.jsx - App Router → Dashboard: routes to
frontend/drowsiness-app/src/App.jsx - App Router → Login and Register: routes to
frontend/drowsiness-app/src/App.jsx - App Router → Profile Page: routes to
frontend/drowsiness-app/src/App.jsx - Live Detection → Camera Capture: renders
frontend/drowsiness-app/src/pages/LiveDetectionPage.jsx - Dashboard → History Charts: renders
frontend/drowsiness-app/src/pages/DashboardPage.jsx - App Router → FastAPI Service: posts frames
frontend/drowsiness-app/src/App.jsx - FastAPI Service → Drowsiness Inference: calls
backend/main.py - FastAPI Service → Database Sessions: queries and writes
backend/main.py - FastAPI Service → JWT Checks: checks login
backend/main.py - FastAPI Service → Data Models: uses models
backend/main.py - FastAPI Service → API Schemas: uses schemas
backend/main.py - History Charts → FastAPI Service: fetches history
frontend/drowsiness-app/src/components/ChartSection.jsx - Dashboard → FastAPI Service: updates summary
frontend/drowsiness-app/src/pages/DashboardPage.jsx - Profile Page → FastAPI Service: fetches profile
frontend/drowsiness-app/src/pages/ProfilePage.jsx - Login and Register → Token Storage: uses token helper
frontend/drowsiness-app/src/pages/LoginPage.jsx - Profile Page → Token Storage: reads token
frontend/drowsiness-app/src/pages/ProfilePage.jsx - Data Models → Database Sessions: uses database base
backend/models.py