How gutierrez101/proyecto_construccion works
QueueLess is a web-based service queue system. Citizens select a service, request a turn, and track or cancel it; employees call and advance turns; administrators manage services and review filtered turn records. The frontend routes role-specific screens to a Django REST API, whose turn handlers use service, turn, and visitor-session records and can send Firebase push notifications. The excerpts establish the main API calls and push registration; some turn and notification internals are partial or unsampled, so uncertain links are omitted.
Main entry points: turnos/views.py Turn and service API · App.jsx Role routing · notificaciones/views.py Subscription endpoint · VistaCiudadano.jsx Citizen queue
Components 18
Web client
- Role routing
frontend/src/App.jsx - Sign-in
frontend/src/views/Login.jsx - Citizen queue
frontend/src/views/VistaCiudadano.jsx - Counter desk
frontend/src/views/VistaEmpleado.jsx - Admin dashboard
frontend/src/views/VistaAdmin.jsx
Turn management
- Turn and service API
backend/turnos/views.py - Queue records
backend/turnos/models.py - API serialization
backend/turnos/serializers.py
Push notifications
- Subscription endpoint
backend/notificaciones/views.py - Push subscriptions
backend/notificaciones/models.py - Firebase setup
backend/notificaciones/firebase_service.py - Browser messaging
frontend/src/services/firebase.js - Push activation
frontend/src/services/pushNotifications.js
API platform
- API routing
backend/config/urls.py
Other components
- Citizen
- Employee
- Administrator
- Firebase Cloud Messaging
Connections 23
- Citizen → Role routing: opens
frontend/src/App.jsx - Employee → Role routing: opens
frontend/src/App.jsx - Administrator → Role routing: opens
frontend/src/App.jsx - Role routing → Sign-in: routes to
frontend/src/App.jsx - Role routing → Citizen queue: routes to
frontend/src/App.jsx - Role routing → Counter desk: routes to
frontend/src/App.jsx - Role routing → Admin dashboard: routes to
frontend/src/App.jsx - Sign-in → Turn and service API: authenticates via
- Citizen queue → Turn and service API: requests turns
frontend/src/views/VistaCiudadano.jsx - Counter desk → Turn and service API: manages turns
frontend/src/views/VistaEmpleado.jsx - Admin dashboard → Turn and service API: manages records
frontend/src/views/VistaAdmin.jsx - Turn and service API → Queue records: reads and writes
backend/turnos/views.py - Turn and service API → API serialization: serializes
backend/turnos/views.py - Turn and service API → Subscription endpoint: registers subscriptions
- Subscription endpoint → Queue records: validates session
backend/notificaciones/views.py - Subscription endpoint → Push subscriptions: updates subscription
backend/notificaciones/views.py - Citizen queue → Browser messaging: gets token
frontend/src/views/VistaCiudadano.jsx - Push activation → Browser messaging: uses Firebase app
frontend/src/services/pushNotifications.js - Push activation → Subscription endpoint: registers device
frontend/src/services/pushNotifications.js - Browser messaging → Firebase Cloud Messaging: requests messaging
frontend/src/services/firebase.js - Firebase setup → Firebase Cloud Messaging: initializes app
backend/notificaciones/firebase_service.py - Turn and service API → Firebase Cloud Messaging: sends push
- API routing → Turn and service API: routes API