How athus27/studyflow-app works
StudyFlow is a web study organizer: users register or log in, enter protected study dashboards, and manage dashboards and their prioritized tasks. The frontend routes/pages use hooks and HTTP services to communicate with an Express API; controllers perform Prisma-backed persistence. The README also documents basic progress summaries and focus-session recording/deletion, while noting that full focus-session workflows were not completed. The tree and sampled source support the main API and persistence links; detailed page-to-hook wiring and unsampled route/controller internals are not asserted.
Main entry points: server.js Express API · AppRoutes.tsx Page routing · client.js Prisma access · App.tsx Application entry
Components 21
Web interface
- Application entry
frontend-web/src/App.tsx - Page routing
frontend-web/src/routes/AppRoutes.tsx - Route protection
frontend-web/src/routes/ProtectedRoute.tsx - Login and register
frontend-web/src/pages/Login - Study dashboard
frontend-web/src/pages/Dashboard - User page
frontend-web/src/pages/User
Client data flow
- Login and registration
frontend-web/src/hooks - Task state
frontend-web/src/hooks/useTasks.ts - HTTP services
frontend-web/src/services - User API client
frontend-web/src/services/usersService.ts - Dashboard API client
frontend-web/src/services/dashboardsService.ts - Task API client
frontend-web/src/services/tasksService.ts - Focus session client
frontend-web/src/services/focusSessionsService.ts
API
- Express API
server/src/server.js - User operations
server/src/controller/UserController.js - Dashboard operations
server/src/controller/DashboardController.js - Task operations
server/src/controller/TaskController.js - Focus records
server/src/controller/FocusSessionController.js
Persistence
- Prisma access
server/src/database/client.js
Other components
- Student
- PostgreSQL
Connections 24
- Student → Application entry: uses
- Application entry → Page routing: renders
- Page routing → Route protection: guards private pages
- Page routing → Login and register: routes to
- Page routing → Study dashboard: routes to
- Page routing → User page: routes to
- Login and register → Login and registration: uses
- Study dashboard → Task state: uses
- Login and registration → User API client: calls
- Task state → Task API client: calls
- HTTP services → Express API: sends HTTP requests
- User API client → Express API: sends HTTP requests
- Dashboard API client → Express API: sends HTTP requests
- Task API client → Express API: sends HTTP requests
- Focus session client → Express API: sends HTTP requests
- Express API → User operations: dispatches user routes
- Express API → Dashboard operations: dispatches dashboard routes
- Express API → Task operations: dispatches task routes
- Express API → Focus records: dispatches focus routes
- User operations → Prisma access: queries users
- Dashboard operations → Prisma access: queries dashboards and tasks
- Task operations → Prisma access: queries tasks
- Focus records → Prisma access: queries sessions
- Prisma access → PostgreSQL: reads and writes