π¬ Movie Pass API ποΈ
Welcome to the Movie Pass API! This API was created to simplify movie ticket purchasing, manage cinemas, theaters, movies, and users. Everything is ready for you to deliver an amazing seat reservation and ticket buying experience! πΏ
[!WARNING]
API is currently under development. Expect potential changes and unstable behavior.
π Main Features
- ποΈ Ticket Purchase: Simplify the online ticket buying process, powered by WebSockets and Server-Sent Events (SSE) for real-time updates.
- ποΈ Cinema Management: Add and update multiple cinemas and their respective theaters with custom seat arrangements, offering full flexibility in theater layout design.
- π½οΈ Movie Catalog: Manage the catalog of available movies with ease.
- π
Real-Time Seat Reservation: View and reserve available seats in real time using WebSockets and Server-Sent Events (SSE) to ensure a seamless booking experience.
- π€ User Authentication: Complete system for registration, sign-in, and authentication, including session management with Redis.
- π‘οΈ JWT Authentication: All routes are secured with JWT-based authentication for enhanced security.
- ποΈ Admin Control: Admins can create cinemas, theaters, and custom seat arrangements. The system also supports session management, enabling administrators to control access and availability.
- π Role-Based Permissions: The system comes with a robust role-based permission model, allowing different levels of access for users, such as admin, cashier, and customer, ensuring secure and organized management of resources.
π Installation
To get started with the Movie Pass API, follow these steps:
Requirements
Ensure you have the following installed:
- Go (version 1.22 or higher)
- MySQL (or any other compatible database)
- Redis (for caching and session management)
- Docker (optional, but recommended for deployment)
Steps
-
Clone the repository:
git clone https://github.com/GSVillas/movie-pass-api.git
-
Install the dependencies:
go mod tidy
-
Set up the environment variables in the .env file:
Create a .env based on .en.example
βοΈ Makefile Instructions
To simplify your development process, we have provided a Makefile with useful commands to manage keys, linting, running the application, and migrations.
Requirements
-
Generate Keys: Generates private and public ECDSA keys:
make generate-keys
-
Lint the Code: Runs the linter to check for code issues:
make lint
-
Clean Keys: Deletes the generated private and public keys:
make clean
-
Run the Application: Runs the Go application:
make rub
-
Run Migrations: Executes database migrations:
make migration
-
Run Test: Executes unity tests:
make test
-
Run e2e Test: Executes end to end:
make e2e