How prajwalhire-dev/reservation works
Project type and purpose
• This is a full-stack Django web application named “reservation.”
• Purpose: allow engineers to make reservations (e.g., testbed reservations) via a web UI and automatically notify them of key events via a Webex bot.
File structure
Top level:
• manage.py, reservation/ → Django project settings, ASGI/WSGI, Celery integration
• reservationDashboard/ → primary Django app: models, views, forms, admin, custom management commands, Celery tasks, migrations, URL routes, templates under templates/reservation/
• testbed/ → secondary app: testbed data, admin, views, URLs
• static/ & templates/ → compiled CSS/JS assets (Hope-UI, plugins) and HTML templates (base, auth, plugins, reservation, testbed)
• celerybeat-schedule.* → on-disk Celery beat state
• requirements.txt → Python dependencies (Django, Celery, requests or Webex SDK, etc.)
Architectural hints:
– Django’s MTV (Model-Template-View) pattern
– Celery with a beat scheduler for periodic tasks
– Custom management command to bootstrap users
– Asynchronous notifications via Webex API
README
• Confirms high scalability and robustness
• Mentions Webex bot integration for real-time notifications
Components
a. Main components
1. User’s browser (UI)
2. Web server / load balancer (e.g., Nginx or CDN)
3. Django application (reservation project)
• Django apps: reservationDashboard & testbed
• URL router, views, forms, templates
4. Static asset service (served by Nginx or Django’s collectstatic)
5. Relational database (PostgreSQL/MySQL)
6. Cache/Broker service (Redis or RabbitMQ)
7. Celery worker pool
8. Celery beat scheduler
9. External Webex Bot API
10. Optional: object store (S3) if large media or assets
b. Relationships & data flows
• HTTP(S) between Browser ↔ Load Balancer/Nginx ↔ Django (ASGI/WSGI)
• Django ORM generates SQL ↔ Database
• Django → publish tasks (via AMQP/Redis) → Broker
• Broker → Celery workers execute async tasks
• Celery beat → schedule periodic tasks (e.g., cleanup, daily reports)
• Celery tasks → Webex Bot API (HTTPS) to send notifications
• Static files (CSS/JS/images) served either by Nginx or CDN
c. Architectural patterns & principles
• MVC/MTV separation (models, views, templates)
• Layered architecture: Presentation (templates+static), Application logic (views+tasks), Data (models+DB)
• Asynchronous processing via Celery for decoupling UI from notifications
• Modular apps for separation of concerns (reservationDashboard vs. testbed)
• Management command for idempotent setup of system users
d. Key technologies & frameworks
• Python 3.x, Django (core web framework)
• Celery (async task queue) + Celery beat (scheduler)
• Redis or RabbitMQ (broker & optional cache)
• PostgreSQL or MySQL (relational DB)
• Hope-UI + custom CSS/JS front end assets
• Webex Python SDK or REST calls for bot notifications
• Nginx or CDN for static file/library offloading