A full-stack, production-grade cinema ticketing platform β book seats, manage theatres, and browse films with a Netflix-inspired UI.
- Overview
- Architecture
- Tech Stack
- Project Structure
- Quick Start
- Authentication & Roles
- Key Features
- API Overview
- Documentation
Red Cinema is a complete movie reservation system with:
- π JWT-based authentication with role-based access control (User, Theatre Admin, Super Admin)
- π₯ TMDB-integrated movie catalog with posters, genres, and director metadata
- πͺ Interactive seat maps with real-time concurrency safety (ReentrantLock)
- π₯οΈ Cinematic UI β hero billboards, animated seat grids, and a glassmorphic admin dashboard
- π³ Docker-ready β one
docker-compose upstarts everything in production mode
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Client Browser β
β Next.js 14 App Router (port 3000) β
β Zustand Β· React Query Β· Framer Motion Β· Tailwind CSS β
βββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β HTTP / REST (JWT Bearer)
βββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ
β Spring Boot 3.3 API (port 8080) β
β Spring Security Β· JWTFilter Β· JPA / Hibernate β
βββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β JDBC
βββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ
β PostgreSQL 16 (prod) / H2 (dev) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Layer | Technology |
|---|---|
| Frontend | Next.js 14, TypeScript, Tailwind CSS, Framer Motion |
| Backend | Spring Boot 3.3, Java 21, Spring Security |
| Auth | JWT (jjwt 0.12.6) β 15-min access tokens |
| Database | PostgreSQL 16 (prod) Β· H2 in-memory (dev) |
| ORM | Spring Data JPA / Hibernate |
| State | Zustand (client) Β· TanStack React Query (server) |
| Build | Maven (backend) Β· npm (frontend) |
| Container | Docker + Docker Compose |
| Testing | JUnit 5 Β· Mockito Β· MockMvc (backend) |
red-cine/
βββ backend/ # Spring Boot REST API
β βββ src/
β βββ Dockerfile
β βββ docker-compose.yml
β βββ pom.xml
β βββ README.md β Backend deep-dive
β
βββ frontend/ # Next.js 14 App Router
β βββ src/
β βββ next.config.js
β βββ tailwind.config.ts
β βββ README.md β Frontend deep-dive
β
βββ README.md β You are here
| Tool | Version |
|---|---|
| Java | 21+ |
| Maven | 3.9+ |
| Node.js | 18+ |
| Docker | 24+ (optional, for PostgreSQL) |
cd backend
# Dev mode (H2 in-memory, no Docker needed)
./mvnw spring-boot:run
# API β http://localhost:8080
# H2 console β http://localhost:8080/h2-console
# OR Production mode (PostgreSQL via Docker)
cp .env.example .env # fill in secrets
docker-compose up --buildcd frontend
npm install
# Copy environment config
cp .env.local.example .env.local
# Set: NEXT_PUBLIC_API_URL=http://localhost:8080
npm run dev
# App β http://localhost:3000| Field | Value |
|---|---|
| Username | superAdmin |
| Password | superPassword@123 |
superadmin@redcinema.com |
The backend issues a signed JWT on login/signup. The frontend stores it in a secure HTTP-only cookie (rc_token) and attaches it as a Bearer token on every API call via an Axios interceptor.
| Role | Capabilities |
|---|---|
ROLE_USER |
Browse movies, book & cancel own reservations |
ROLE_THEATRE_ADMIN |
All of USER + manage shows for their assigned theatre |
ROLE_SUPER_ADMIN |
Full CRUD β movies, theatres, users, shows |
Next.js Middleware (src/middleware.ts) enforces role-based routing before any page renders.
- Auto-rotating Hero Billboard (5 featured films, 8 s interval)
- Horizontal scroll rows with drag support and fade-out edges
- Movie card hover expansion β synopsis, genre pills, and a booking CTA
- Interactive seat grid grouped by row (SINGLE / COUPLE / SOFA types)
- Live availability from
ShowSeat.seatStatus - ReentrantLock on the server prevents race-condition double-booking
- Floating Framer Motion cart with real-time total; graceful 409 toast on conflict
- Super Admin β movie & theatre CRUD, revenue stats, user management
- Theatre Admin β show scheduling for their assigned venue
- Auto-fills director, genres, and poster when creating/updating a movie
| Resource | Public Endpoints | Protected Endpoints |
|---|---|---|
| Auth | POST /auth/login, /auth/signup |
β |
| Movies | GET /api/movies/all, β¦/{id} |
POST / PUT / DELETE (SUPER_ADMIN) |
| Theatres | GET /api/theatres/all, β¦/{id} |
POST / PUT / DELETE / admin (role-guarded) |
| Shows | GET /api/shows/** |
POST / PUT / DELETE (THEATRE_ADMIN+) |
| Reservations | β | POST reserve, PUT cancel (USER+) |
| Users | β | Full CRUD (SUPER_ADMIN only) |
For deeper technical details, see the individual READMEs:
| Directory | README | What's inside |
|---|---|---|
backend/ |
π Backend README | API reference, auth flow, concurrency model, Docker setup, test coverage |
frontend/ |
π Frontend README | Design system, component map, state management, environment config |
Built with β€οΈ using Spring Boot & Next.js Β· Β© 2026 Red Cinema