How jeencr/meeting-room works
1. This is a two-tier monorepo: an Angular 10 frontend in meeting-room-frontend/ and a Django backend in meeting_room_backend/. The system is a single product with a clear browser-to-server boundary rather than multiple services.
2. The frontend is organized around user journeys. src/app/pages/ contains separate flows for authentication, customer usage, admin operations, and a not-found screen. src/app/components/ holds shared UI such as the navbar, while src/app/guards/ enforces route access by role.
3. The Angular routing layer is the main UI gatekeeper. Auth routes likely lead to login/register screens, customer routes expose room browsing and booking, and admin routes expose operational pages like dashboard, room management, and booking review. The 404 page handles unmatched routes.
4. Frontend data access is centralized in src/app/services/. auth.service, room.service, and booking.service act as the client-side integration layer between components and backend APIs. This keeps page components focused on presentation and user actions, not request logic.
5. Authentication and authorization are enforced in two places on the frontend: auth.guard prevents unauthenticated access, and admin.guard restricts admin-only pages. The README indicates role-based access via Admin and Customer groups, so route protection is a major architectural boundary.
6. The customer feature path is: browse rooms, inspect booked time slots for a date, create a booking, then review personal bookings and booking status. The booking flow includes overlap prevention, so the booking service and backend validation jointly protect the shared room/time-slot state.
7. The admin path is separate and operational. Admin pages include a dashboard with aggregate counts, room management, and booking moderation. This suggests the backend exposes both summary endpoints and CRUD-style endpoints for rooms and bookings.
8. The backend is a Django project with a single app named booking. Its core layers are the model layer in models.py, request handlers in views.py, URL routing in urls.py, and schema evolution in migrations/. That indicates a conventional Django API-backed monolith.
9. meeting_room_backend/meeting_room_backend/settings.py and project urls.py define the application-wide server configuration and endpoint mounting. asgi.py and wsgi.py show the backend can run under standard Django deployment modes, while manage.py is the main local admin/runtime entrypoint.
10. Persistence is centered on the database behind Django models. The README describes PostgreSQL as the target database, but the repository also includes db.sqlite3, which suggests a local development database may be checked in or used during development. Either way, the data model is the source of truth for rooms, bookings, users, and booking status.
11. Static asset handling is visible in staticfiles/, including Django admin assets and Django REST framework assets. That implies the backend serves standard admin/UI resources in addition to JSON APIs, and likely supports the Django admin interface for internal management.
12. Deployment and build tooling are split by stack. Angular uses its standard CLI workspace (angular.json, karma.conf.js, e2e/, netlify.toml), which suggests browser-side deployment may target Netlify. The backend uses Python packaging in requirements.txt and Django’s migration/test workflow.
13. The main end-to-end data flow is: user action in Angular page -> service call -> Django API view -> model/database update or query -> JSON response -> UI state update. The principal architecture diagram should show three major bounded areas: browser frontend, Django API/backend, and relational database, with role-based access and booking validation crossing both frontend and backend.
Main entry points: app-routing.module.ts Routing · views.py API views · room.service.ts Room service · booking.service.ts Booking service
Components 25
Angular frontend
Browser UI, route protection, and client-side API calls.
- App shell · Bootstraps the frontend and hosts the main app layout.
meeting-room-frontend/src/app/app.module.ts - Routing · Top-level route map for auth, customer, admin, and not-found flows.
meeting-room-frontend/src/app/app-routing.module.ts - Navbar · Shared navigation shown across the user journeys.
meeting-room-frontend/src/app/components/navbar/navbar.component.ts - Auth guard · Blocks unauthenticated access to protected pages.
meeting-room-frontend/src/app/guards/auth.guard.ts - Admin guard · Restricts admin-only pages to privileged users.
meeting-room-frontend/src/app/guards/admin.guard.ts - Auth service · Handles login, registration, and auth state on the client.
meeting-room-frontend/src/app/services/auth.service.ts - Room service · Fetches room data for browsing and admin management.
meeting-room-frontend/src/app/services/room.service.ts - Booking service · Creates and retrieves bookings and booked time slots.
meeting-room-frontend/src/app/services/booking.service.ts - Login · Signs users into the application.
meeting-room-frontend/src/app/pages/auth/login/login.component.ts - Register · Creates new user accounts.
meeting-room-frontend/src/app/pages/auth/register/register.component.ts - Room list · Lets customers browse available rooms.
meeting-room-frontend/src/app/pages/customer/room-list/room-list.component.ts - Create booking · Starts a new booking for a chosen room and time.
meeting-room-frontend/src/app/pages/customer/create-booking/create-booking.component.ts - My bookings · Shows the customer’s bookings and their status.
meeting-room-frontend/src/app/pages/customer/my-bookings/my-bookings.component.ts - Dashboard · Displays aggregate operational counts for admins.
meeting-room-frontend/src/app/pages/admin/dashboard/dashboard.component.ts - Manage rooms · Admin CRUD surface for room operations.
meeting-room-frontend/src/app/pages/admin/manage-rooms/manage-rooms.component.ts - Manage bookings · Admin review and moderation of bookings.
meeting-room-frontend/src/app/pages/admin/manage-bookings/manage-bookings.component.ts - Not found · Handles unmatched frontend routes.
meeting-room-frontend/src/app/pages/not-found/not-found.component.ts
Django backend
API, domain logic, and deployment/runtime entrypoints.
- Settings · Project-wide server configuration and app wiring.
meeting_room_backend/meeting_room_backend/settings.py - Project URLs · Mounts the booking app and top-level endpoints.
meeting_room_backend/meeting_room_backend/urls.py - Manage.py · Local runtime and admin command entrypoint.
meeting_room_backend/manage.py - Models · Defines the booking domain and persistent entities.
meeting_room_backend/booking/models.py - API views · Implements the backend endpoints consumed by the frontend.
meeting_room_backend/booking/views.py - App URLs · Routes booking app requests to the corresponding views.
meeting_room_backend/booking/urls.py - Migrations · Tracks schema evolution for the booking app.
meeting_room_backend/booking/migrations/0001_initial.py
Data layer
Persistent store behind the Django models.
- Database · Persistent store for rooms, bookings, and users.
meeting_room_backend/db.sqlite3
Connections 32
- Routing → Login: auth route · Routes unauthenticated users to the login screen.
- Routing → Register: auth route · Routes new users to registration.
- Routing → Room list: customer route · Routes customers into room browsing.
- Routing → Create booking: customer route · Routes customers into booking creation.
- Routing → My bookings: customer route · Routes customers to their bookings.
- Routing → Dashboard: admin route · Routes admins to the operations dashboard.
- Routing → Manage rooms: admin route · Routes admins to room management.
- Routing → Manage bookings: admin route · Routes admins to booking review.
- Routing → Not found: fallback · Handles unmatched paths.
- Auth guard → Routing: protects · Enforces authenticated access on protected routes.
- Admin guard → Routing: restricts · Enforces admin-only access on privileged routes.
- Navbar → Routing: navigates · Provides user navigation across journeys.
- Login → Auth service: auth calls · Submits credentials and receives session state.
- Register → Auth service: auth calls · Creates accounts through the auth client.
- Room list → Room service: loads rooms · Fetches rooms for customer browsing.
- Create booking → Room service: loads rooms · Loads room data before booking.
- Create booking → Booking service: creates booking · Submits booking requests and reads slot availability.
- My bookings → Booking service: reads bookings · Loads the customer’s bookings and status.
- Dashboard → Room service: admin summary · Uses room data for admin counts and overview.
- Manage rooms → Room service: crud · Creates, updates, and removes rooms.
- Manage bookings → Booking service: review · Inspects and moderates bookings.
- Auth service → API views: API · Calls backend auth endpoints.
- Room service → API views: API · Calls room endpoints.
- Booking service → API views: API · Calls booking endpoints.
- Project URLs → App URLs: mounts · Delegates app-specific routing to the booking app.
- App URLs → API views: routes to · Connects URLs to request handlers.
- API views → Models: queries · Reads and writes the booking domain models.
- Models → Database: persists · Stores canonical room and booking data.
- Migrations → Models: evolves · Keeps the schema aligned with the models.
- Manage.py → Settings: starts · Loads project settings for local and admin commands.
- Settings → Project URLs: configures · Wires the top-level URL configuration.
- API views → Database: reads/writes · Backs API operations with persistent storage.