How palanoyz/cinemahub works
CinemaHub is a full-stack cinema ticketing system. The main customer flow is browsing movies and showtimes, authenticating, selecting and locking seats, confirming a booking, then viewing tickets; seat updates are broadcast live and confirmed bookings are processed asynchronously. The graph preserves the documented admin, distributed-locking, and background-processing capabilities. Backend wiring is only partly sampled, so documented relationships are cited to the README; uncertain implementation-level calls are omitted.
Main entry points: index.ts Route access · handler HTTP handlers · api.ts HTTP API client · auth.ts Auth state
Components 25
Customer application
- Vue application
Frontend/src/App.vue - Route access
Frontend/src/router/index.ts - Login and signup
Frontend/src/views/LoginView.vue - Auth state
Frontend/src/stores/auth.ts - Firebase client
Frontend/src/firebase.ts - Movie browsing
Frontend/src/views/HomeView.vue - Movie and showtimes
Frontend/src/views/MovieDetailView.vue - Seat selection
Frontend/src/views/SeatSelectionView.vue - Customer tickets
Frontend/src/views/TicketView.vue - Admin dashboard
Frontend/src/views/AdminDashboardView.vue - HTTP API client
Frontend/src/services/api.ts
Backend API
- Go API server
Backend/cmd/server/main.go - HTTP handlers
Backend/internal/handler - Auth middleware
Backend/internal/middleware/auth.go - Firebase verification
Backend/internal/auth/firebase.go
Booking and realtime
- Booking domain models
Backend/internal/model - Data repositories
Backend/internal/repository - WebSocket hub
Backend/internal/websocket/hub.go - WebSocket endpoint
Backend/internal/handler/websocket_handler.go - Ticket worker
Backend/internal/websocket/consumer.go
External services
- MongoDB
- Redis seat locks
- RabbitMQ queue
- Firebase Auth
Other components
- Cinema customer
Connections 30
- Cinema customer → Vue application: uses
README.md - Vue application → Route access: renders routes
Frontend/src/main.ts - Route access → Movie browsing: routes to
Frontend/src/router/index.ts - Route access → Login and signup: routes to
Frontend/src/router/index.ts - Route access → Movie and showtimes: routes to
Frontend/src/router/index.ts - Route access → Seat selection: routes to
Frontend/src/router/index.ts - Route access → Customer tickets: routes to
Frontend/src/router/index.ts - Route access → Admin dashboard: routes to
Frontend/src/router/index.ts - Vue application → Auth state: uses state
Frontend/src/App.vue - Login and signup → Auth state: authenticates via
Frontend/src/views/LoginView.vue - Auth state → Firebase client: uses auth
Frontend/src/stores/auth.ts - Firebase client → Firebase Auth: authenticates
README.md - Route access → Auth state: checks access
Frontend/src/router/index.ts - Movie and showtimes → HTTP API client: fetches catalog
Frontend/src/views/MovieDetailView.vue - Seat selection → HTTP API client: locks and confirms
Frontend/src/views/SeatSelectionView.vue - Customer tickets → HTTP API client: fetches tickets
Frontend/src/views/TicketView.vue - Admin dashboard → HTTP API client: manages bookings
Frontend/src/views/AdminDashboardView.vue - HTTP API client → Firebase client: attaches ID token
Frontend/src/services/api.ts - HTTP API client → Go API server: calls REST API
README.md - Go API server → HTTP handlers: serves requests
README.md - HTTP handlers → Auth middleware: protects routes
- Auth middleware → Firebase verification: verifies identity
- HTTP handlers → Data repositories: accesses data
- Data repositories → MongoDB: reads and writes
README.md - HTTP handlers → Redis seat locks: acquires seat locks
README.md - HTTP handlers → WebSocket hub: broadcasts seat status
README.md - Seat selection → WebSocket hub: receives live updates
README.md - Go API server → WebSocket endpoint: serves WebSocket
- HTTP handlers → RabbitMQ queue: publishes booking
README.md - RabbitMQ queue → Ticket worker: delivers booking
README.md