This project is a backend prototype for a cinema ticket booking system. It was developed to practice backend development skills, including REST API design, database integration, and user authentication.
- Python 3.10+
- FastAPI – for building RESTful APIs
- SQLAlchemy – ORM for database interactions
- PostgreSQL – relational database
- Alembic – for database migrations
- Pydantic – for data validation
- Uvicorn – ASGI server for FastAPI
- User registration and authentication
- Movie listings with details
- Showtimes and seat availability
- Booking tickets with seat selection
- Admin panel for managing movies and schedules
- Python 3.10 or higher
- PostgreSQL database
-
Clone the repository:
git clone https://github.com/turdalievargen32/Cinema.git cd Cinema -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure the database:
- Create a PostgreSQL database.
- Update the
DATABASE_URLin the.envfile with your database credentials.
-
Apply migrations:
alembic upgrade head
-
Run the application:
uvicorn main:app --reload
The API will be available at
http://127.0.0.1:8000.
Once the application is running, you can access the interactive API docs at:
- Swagger UI:
http://127.0.0.1:8000/docs - ReDoc:
http://127.0.0.1:8000/redoc
This project is a work in progress and serves as a learning platform for backend development with FastAPI and PostgreSQL. Contributions and suggestions are welcome!
This project is licensed under the MIT License. See the LICENSE file for details.