How notlath/guitara-scheduling-system works
Project Type and Purpose
• This is a full-stack web application called “GUITARA,” a scheduling management system built with a Django REST back end (including Django Channels for real-time) and a React/Redux front end.
• Purpose: automate appointment booking, staff coordination, inventory and payment tracking for Royal Care Home Service Massage.
Main Components
a. Frontend (royal-care-frontend)
• React SPA served by Vite
• Redux Toolkit for state (authSlice, schedulingSlice)
• Axios HTTP client (src/services/api.js)
• WebSocket service (src/services/webSocketService.js) for real-time updates
• CSS Modules for styling, role-based dashboards & pages.
b. Backend (guitara/)
• Django REST Framework with Django REST Knox for token auth
• Django Channels (asgi.py, routing.py, consumers.py) for WebSocket connections
• Core Django apps: authentication, core, registration, scheduling
• Models → Serializers → Views → URLs (MVC pattern)
• apply_migration script, manage.py entry point
c. Database
• PostgreSQL (production) / SQLite (development)
• Migrations under each app (guitara/*/migrations/)
d. External Services
• SMTP (Gmail) for 2FA email workflows
• GCash payment gateway API for cashless transactions
• (Optional) Redis as Channels layer backend
e. Deployment & Tooling
• Docker (future)
• pytest for tests (TBD)
Component Relationships & Data Flow
• Browser → React SPA → Redux store → API & WebSocket services
• Axios calls → Django REST endpoints (authentication/, core/, registration/, scheduling/)
• WebSocket client → Django Channels consumer (scheduling/consumers.py) for real-time slot availability & notifications
• Django ORM → PostgreSQL
• Django email backend → SMTP server
• Django payment endpoints → GCash API → backend validates via SHA-256 receipts
Architectural Patterns & Principles
• Backend: Traditional MVC + layered service (Views → Serializers → Models), separation of concerns per app.
• Real-time: publish-subscribe model via Channels (consumers + routing + channel layer).
• Frontend: Component-based UI with container/presentational split, unidirectional data flow (Redux).
• Security: token-based authentication, 2FA workflows, role-based permissions.
Detail Checklist
• ASGI server layer for Channels alongside WSGI for normal REST.