A comprehensive web application for cinema management, enabling repertoire handling, online ticket sales, a loyalty program, and an administrative panel.
- Frontend: React.js (React Router, Google OAuth, SASS, React Icons, React Player, React QR Code, React Select, Redux)
- Backend: Node.js (Express.js, REST API, Multer, JWT, bcrypt, Tpay, Mongoose)
- Database: MongoDB
- Other: Integrations with Google, Tpay, file uploads, CORS
- Browse repertoire, movie details, and halls
- Buy tickets online (integration with Tpay)
- Loyalty program, generate and use vouchers
- Login with Google or own system
- Transaction history and purchased tickets
- Movie ratings and reviews
- Manage movies (add, edit, banners)
- Manage halls and their layout
- Manage showtimes
- Manage users and roles
- Manage vouchers
- Sales and activity reports
CinemaModern-project/
├── backend/
│ ├── src/
│ │ ├── models/ # Mongoose models (User, Movie, Reservation, Hall, Schedule, Rating, Review, Voucher)
│ │ ├── routes/ # API routes (movies, users, halls, schedules, payments, reservations, vouchers, tickets)
│ │ └── server.js # Main entry point
│ └── package.json
├── frontend/
│ ├── src/
│ │ ├── components/ # React components (dashboard, home, common)
│ │ ├── routers/ # Views and routing (e.g., movies, halls, payments, vouchers, ticket purchases)
│ │ ├── assets/ # Static assets
│ │ └── Styles/ # SASS/SCSS styles
│ └── package.json
└── README.md
- Node.js >= 18.x
- MongoDB (locally or Atlas)
- Tpay account (for online payments)
- Google OAuth account (for login)
- Go to the
backenddirectory:cd backend - Install dependencies:
npm install
- Create a
.envfile and fill in the required data:MONGODB_URI– database addressPORT– backend port (e.g., 5000)CLIENT_ID– Tpay client IDCLIENT_SECRET– Tpay client secretURL_SUCCESS_NOTIFICATION– Tpay notification URL (e.g.,http://localhost:5000)JWT_SECRET– JWT secret
- Run the backend:
npm start
- Go to the
frontenddirectory:cd frontend - Install dependencies:
npm install
- Create a
.envfile and fill in the required data:REACT_APP_GOOGLE_CLIENT_ID– Google client IDREACT_APP_BACKEND_URL– backend URL (e.g.,http://localhost:5000)
- Run the frontend:
npm start
MONGODB_URIPORTCLIENT_ID(Tpay)CLIENT_SECRET(Tpay)URL_SUCCESS_NOTIFICATION(Tpay)JWT_SECRET
REACT_APP_GOOGLE_CLIENT_IDREACT_APP_BACKEND_URL
- user – regular user (buys tickets, uses loyalty program, rates movies)
- admin – full access to the administrative panel, managing movies, halls, schedules, vouchers, and users
How to assign the admin role?
- Change the user's
rolefield in the database toadmin(e.g., through MongoDB Compass or a script).
Example main endpoints:
GET /api/movies– list of moviesPOST /api/movies– add a movie (admin)PUT /api/movies/:id– edit a movie (admin)DELETE /api/movies/:id– delete a movie (admin)
POST /api/reservations– create a reservationGET /api/reservations/:userId/transactions– user's transaction historyGET /api/tickets– list of all tickets (admin)
POST /api/payments/create-session-transaction-tpay– start a Tpay transactionPOST /api/payments/tpay-notifications– Tpay notification webhook
POST /api/users/google-login– login with GoogleGET /api/users– list of users (admin)
POST /api/vouchers– add a voucher (admin)GET /api/vouchers– list of vouchers
More details can be found in the source code in the backend/src/routes/ directory




