How rahulpiska/movie_booking_api works
This is a FastAPI movie-ticket booking API. Users register or log in, browse movies and scheduled shows, inspect seat availability, book seats, review booking history, and cancel bookings; administrators manage the movie, theatre, screen, and show catalog. Route modules own the business operations, with shared authentication helpers, Pydantic schemas, SQLAlchemy models, and database sessions beneath them. The route and model excerpts support the principal relationships; other documented capabilities are represented where their source paths are known.
Main entry points: main.py FastAPI app · database.py Database sessions · models.py Domain ORM · auth.py Login and profile
Components 14
API entry
- FastAPI app
main.py - API schemas
schemas.py - Domain ORM
models.py - Database sessions
database.py
Identity
- User registration
routes/users.py - Login and profile
routes/auth.py - Password and access
utils.py
Catalog management
- Movie catalog
routes/movies.py - Theatre management
routes/theatres.py
Shows and seats
- Screens and seats
routes/screens.py - Show scheduling
routes/shows.py
Booking
- Booking lifecycle
routes/bookings.py
Other components
- API client
- PostgreSQL
Connections 34
- API client → FastAPI app: sends requests
- FastAPI app → User registration: mounts routes
main.py - FastAPI app → Login and profile: mounts routes
main.py - FastAPI app → Movie catalog: mounts routes
main.py - FastAPI app → Theatre management: mounts routes
main.py - FastAPI app → Screens and seats: mounts routes
main.py - FastAPI app → Show scheduling: mounts routes
main.py - FastAPI app → Booking lifecycle: mounts routes
main.py - User registration → Password and access: hashes passwords
routes/users.py - Login and profile → Password and access: verifies and issues tokens
routes/auth.py - Login and profile → Password and access: checks current user
routes/auth.py - User registration → Database sessions: uses session
routes/users.py - Login and profile → Database sessions: uses session
routes/auth.py - Movie catalog → Database sessions: uses session
routes/movies.py - Theatre management → Database sessions: uses session
routes/theatres.py - Screens and seats → Database sessions: uses session
routes/screens.py - Show scheduling → Database sessions: uses session
routes/shows.py - Booking lifecycle → Database sessions: uses session
routes/bookings.py - User registration → Domain ORM: queries users
routes/users.py - Login and profile → Domain ORM: queries users
routes/auth.py - Movie catalog → Domain ORM: manages movies and shows
routes/movies.py - Theatre management → Domain ORM: manages theatres
routes/theatres.py - Screens and seats → Domain ORM: creates screens and seats
routes/screens.py - Show scheduling → Domain ORM: schedules and checks seats
routes/shows.py - Booking lifecycle → Domain ORM: creates and cancels bookings
routes/bookings.py - User registration → API schemas: validates and formats
routes/users.py - Login and profile → API schemas: formats profile
routes/auth.py - Movie catalog → API schemas: validates and formats
routes/movies.py - Theatre management → API schemas: validates and formats
routes/theatres.py - Screens and seats → API schemas: validates and formats
routes/screens.py - Show scheduling → API schemas: validates and formats
routes/shows.py - Booking lifecycle → API schemas: validates and formats
routes/bookings.py - Domain ORM → Database sessions: uses declarative base
models.py - Database sessions → PostgreSQL: connects to
database.py