A full-stack web application for managing cinema bookings, movies, shows, and user administration. Built with React.js frontend and Node.js/Express.js backend with SQL Server database.
- User Authentication: Secure login/signup system with JWT tokens
- Movie Browsing: View all available movies with details, ratings, and genres
- Show Booking: Book movie shows with seat selection
- Payment Integration: Secure payment processing for bookings
- Profile Management: User profile management and booking history
- Responsive Design: Mobile-friendly interface
- Admin Dashboard: Comprehensive admin panel with analytics
- Movie Management: Add, edit, and delete movies
- Cinema Management: Manage cinema locations and screens
- Show Management: Create and manage movie shows and timings
- Booking Management: View and manage all user bookings
- User Management: Administer user accounts
- Payment Tracking: Monitor payment transactions
- Complaint Handling: Manage user complaints and feedback
- Seat Management: Configure seat types and pricing
- React.js 19.1.0 - Modern UI framework
- React Router DOM 7.5.0 - Client-side routing
- Axios 1.8.4 - HTTP client for API calls
- React Icons 5.5.0 - Icon library
- React Toastify 11.0.5 - Toast notifications
- Tailwind CSS 4.1.4 - Utility-first CSS framework
- Date-fns 4.1.0 - Date manipulation library
- Node.js - JavaScript runtime
- Express.js 4.21.2 - Web application framework
- bcrypt 5.1.1 - Password hashing
- jsonwebtoken 9.0.2 - JWT authentication
- mssql 11.0.1 - SQL Server database driver
- cors 2.8.5 - Cross-origin resource sharing
- dotenv 16.4.7 - Environment variable management
- Microsoft SQL Server - Relational database
freakmax/
├── backend/ # Backend API server
│ ├── mainserver.js # Main server file with routes
│ ├── db.js # Database connection configuration
│ ├── authMidware.js # Authentication middleware
│ ├── admin.js # Admin-related API endpoints
│ ├── user.js # User-related API endpoints
│ ├── movie.js # Movie management endpoints
│ ├── booking.js # Booking management endpoints
│ ├── payment.js # Payment processing endpoints
│ ├── cinema.js # Cinema management endpoints
│ ├── showtiming.js # Show timing management
│ ├── screen.js # Screen management
│ ├── seat.js # Seat management
│ ├── complaint.js # Complaint handling
│ └── package.json # Backend dependencies
├── frontend/ # React frontend application
│ ├── src/
│ │ ├── components/ # Reusable React components
│ │ ├── pages/ # Page components
│ │ │ ├── HomePage.js
│ │ │ ├── UserLogin.js
│ │ │ ├── AdminLogin.js
│ │ │ ├── AdminDashboard.js
│ │ │ ├── BookingPage.js
│ │ │ └── ... # Other page components
│ │ ├── App.js # Main App component with routing
│ │ └── index.js # Application entry point
│ └── package.json # Frontend dependencies
└── README.md # Project documentation
- Node.js (v14 or higher)
- Microsoft SQL Server
- npm or yarn package manager
-
Clone the repository
git clone https://github.com/saadbinather/FreakMax.git cd freakmax -
Install backend dependencies
cd backend npm install -
Install frontend dependencies
cd ../frontend npm install -
Environment Setup
Create a
.envfile in the backend directory:DB_SERVER=your_sql_server_host DB_NAME=your_database_name DB_USER=your_database_user DB_PASSWORD=your_database_password DB_PORT=1433 JWT_SECRET=your_jwt_secret_key
-
Database Setup
- Ensure SQL Server is running
- Create the database and tables (schema files should be provided)
- Update the database connection in
backend/db.js
-
Start the backend server
cd backend npm startThe backend will run on
http://localhost:5000 -
Start the frontend application
cd frontend npm startThe frontend will run on
http://localhost:3000 -
Access the application
- User Interface:
http://localhost:3000 - Admin Interface:
http://localhost:3000/admin/login
- User Interface:
The application uses JWT (JSON Web Tokens) for authentication:
- User Authentication: Users can register and login to access booking features
- Admin Authentication: Admins have separate login with elevated privileges
- Token Storage: JWT tokens are stored in localStorage
- Password Security: All passwords are hashed using bcrypt
POST /api/users/register- User registrationPOST /api/users/login- User loginGET /api/users/profile- Get user profilePUT /api/users/profile- Update user profile
GET /api/movies- Get all moviesGET /api/movies/top5- Get top 5 moviesGET /api/movies/children-friendly- Get children-friendly moviesPOST /api/movies- Add new movie (admin only)PUT /api/movies/:id- Update movie (admin only)DELETE /api/movies/:id- Delete movie (admin only)
GET /api/bookings- Get user bookingsPOST /api/bookings- Create new bookingGET /api/bookings/:id- Get booking detailsPUT /api/bookings/:id- Update booking
POST /api/admins/login- Admin loginGET /api/admins/me- Get admin profilePUT /api/admins/:id- Update admin profile
- Real-time seat selection
- Multiple seat types with different pricing
- Booking confirmation with payment
- Booking history and management
- Comprehensive dashboard with analytics
- Movie, cinema, and show management
- User and booking administration
- Payment and complaint tracking
- JWT-based authentication
- Password hashing with bcrypt
- Role-based access control
- CORS configuration for security
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the ISC License.
Saad Bin Ather
- GitHub: @saadbinather
- React.js community for the excellent framework
- Express.js team for the robust backend framework
- SQL Server for reliable database management
- All contributors and testers of this project
Note: This is a cinema booking system designed for educational and commercial use. Please ensure proper security measures are in place before deploying to production.