How jagadish210523-lgtm/cinemahub-api works
Cinema Hub is a FastAPI cinema-booking API. Clients enter through the application, then use authentication and separate movie, theatre, show, and booking endpoints; these modules validate requests and perform SQLAlchemy operations against persistent MySQL data. The graph preserves the documented API, authentication, validation, and database capabilities. The supplied tree lists flat filenames while excerpts use router.* and app.* imports, so runtime wiring beyond the shown entry point is uncertain.
Main entry points: auth.py Authentication · database.py Database sessions · main.py FastAPI app · models.py SQLAlchemy models
Components 10
API and access
- FastAPI app
main.py - Authentication
auth.py
Cinema catalog
- Movie endpoints
movies.py - Theatre endpoints
theatres.py
Shows and seats
- Show endpoints
shows.py - Booking and seats
bookings.py
Persistence
- SQLAlchemy models
models.py - Database sessions
database.py
Other components
- API client
- MySQL database
Connections 22
- API client → FastAPI app: sends requests
README.md - FastAPI app → Authentication: registers router
main.py - FastAPI app → Movie endpoints: registers router
main.py - FastAPI app → Theatre endpoints: registers router
main.py - FastAPI app → Show endpoints: registers router
main.py - FastAPI app → Booking and seats: registers router
main.py - Authentication → SQLAlchemy models: queries users
auth.py - Authentication → Database sessions: opens sessions
auth.py - Movie endpoints → Authentication: verifies tokens
movies.py - Movie endpoints → SQLAlchemy models: reads and writes
movies.py - Movie endpoints → Database sessions: creates tables
movies.py - Theatre endpoints → Authentication: verifies tokens
theatres.py - Theatre endpoints → SQLAlchemy models: reads and writes
theatres.py - Theatre endpoints → Database sessions: creates tables
theatres.py - Show endpoints → Authentication: verifies tokens
shows.py - Show endpoints → SQLAlchemy models: reads and writes
shows.py - Show endpoints → Database sessions: creates tables
shows.py - Booking and seats → Authentication: verifies tokens
bookings.py - Booking and seats → SQLAlchemy models: reads and writes
bookings.py - Booking and seats → Database sessions: creates tables
bookings.py - SQLAlchemy models → Database sessions: uses base
models.py - Database sessions → MySQL database: connects to
database.py