How uttambits/cyber-cafe works
Shaurya eServices is a cyber-café management web application. A user discovers a service, applies and optionally uploads a file, or books a time slot; users can then track requests and bookings, while administrators manage services, requests, bookings, users, contacts, and updates. The React routes and API client are sampled, along with service handling and selected backend setup. Other backend route implementations are not sampled, so their internal calls are not asserted.
Main entry points: index.js API Operations · App.jsx Route Application · admin Admin Console · models Domain Records
Components 26
Customer Web App
- Route Application
frontend/src/App.jsx - Authentication State
frontend/src/context/AuthContext.jsx - Service Catalog
frontend/src/pages/ServicesPage.jsx - Service Application
frontend/src/pages/ApplyServicePage.jsx - Slot Booking
frontend/src/pages/BookingPage.jsx - Contact Form
frontend/src/pages/ContactPage.jsx - Public Updates
frontend/src/pages/UpdatesPage.jsx - User Dashboard
frontend/src/pages/dashboard - Fetch State Hook
frontend/src/hooks/useFetch.js
Administration
- Admin Console
frontend/src/pages/admin - Service Management
frontend/src/pages/admin/AdminServices.jsx - Request Management
frontend/src/pages/admin/AdminRequests.jsx - Booking Management
frontend/src/pages/admin/AdminBookings.jsx - Update Management
frontend/src/pages/admin/AdminUpdates.jsx
API Layer
- API Operations
frontend/src/api/index.js - HTTP Client
frontend/src/api/axios.js
Backend Domain
- Flask Application
backend/app.py - Service Routes
backend/routes/services.py - Request Routes
backend/routes/requests.py - Booking Routes
backend/routes/bookings.py - Authentication Routes
backend/routes/auth.py - Other API Routes
backend/routes - Domain Records
backend/models - Database and Auth Extensions
backend/extensions.py - Password Reset OTP
backend/models/otp.py
Other components
- Customer
Connections 36
- Customer → Route Application: uses
frontend/src/App.jsx - Route Application → Authentication State: provides auth
frontend/src/App.jsx - Route Application → Service Catalog: routes to
frontend/src/App.jsx - Route Application → Service Application: routes to
frontend/src/App.jsx - Route Application → Slot Booking: routes to
frontend/src/App.jsx - Route Application → Contact Form: routes to
frontend/src/App.jsx - Route Application → Public Updates: routes to
frontend/src/App.jsx - Route Application → User Dashboard: routes to
frontend/src/App.jsx - Route Application → Admin Console: routes to
frontend/src/App.jsx - Service Catalog → Fetch State Hook: uses
frontend/src/pages/ServicesPage.jsx - Service Catalog → API Operations: requests services
frontend/src/pages/ServicesPage.jsx - Service Application → API Operations: submits application
frontend/src/pages/ApplyServicePage.jsx - Slot Booking → API Operations: manages bookings
frontend/src/pages/BookingPage.jsx - Authentication State → API Operations: calls auth
frontend/src/context/AuthContext.jsx - Service Management → API Operations: manages services
frontend/src/pages/admin/AdminServices.jsx - Request Management → API Operations: manages requests
frontend/src/pages/admin/AdminRequests.jsx - Admin Console → Service Management: renders
- API Operations → HTTP Client: sends requests
frontend/src/api/index.js - HTTP Client → Flask Application: HTTP API
- Flask Application → Service Routes: registers routes
- Service Routes → Domain Records: queries and updates
backend/routes/services.py - Service Routes → Database and Auth Extensions: uses database
backend/routes/services.py - Booking Routes → Domain Records: uses records
backend/routes/bookings.py - Booking Routes → Database and Auth Extensions: uses database
backend/routes/bookings.py - Request Routes → Domain Records: uses records
- Authentication Routes → Domain Records: uses records
backend/routes/auth.py - Authentication Routes → Password Reset OTP: stores reset codes
backend/routes/auth.py - Authentication Routes → Database and Auth Extensions: uses database
backend/routes/auth.py - Admin Console → Booking Management: routes to
- Admin Console → Update Management: routes to
- Booking Management → API Operations: manages bookings
- Update Management → API Operations: manages updates
- Contact Form → API Operations: submits messages
- Public Updates → API Operations: loads updates
- User Dashboard → API Operations: loads account data
frontend/src/pages/dashboard/DashboardOverview.jsx - Flask Application → Other API Routes: registers routes
backend/app.py