Skip to content

saadbinather/FreakMax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FreakMax - Cinema Booking System

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.

🎬 Features

User Features

  • 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 Features

  • 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

🛠️ Tech Stack

Frontend

  • 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

Backend

  • 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

Database

  • Microsoft SQL Server - Relational database

📁 Project Structure

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

🚀 Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • Microsoft SQL Server
  • npm or yarn package manager

Installation

  1. Clone the repository

    git clone https://github.com/saadbinather/FreakMax.git
    cd freakmax
  2. Install backend dependencies

    cd backend
    npm install
  3. Install frontend dependencies

    cd ../frontend
    npm install
  4. Environment Setup

    Create a .env file 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
  5. 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

Running the Application

  1. Start the backend server

    cd backend
    npm start

    The backend will run on http://localhost:5000

  2. Start the frontend application

    cd frontend
    npm start

    The frontend will run on http://localhost:3000

  3. Access the application

    • User Interface: http://localhost:3000
    • Admin Interface: http://localhost:3000/admin/login

🔐 Authentication

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

📊 API Endpoints

User Endpoints

  • POST /api/users/register - User registration
  • POST /api/users/login - User login
  • GET /api/users/profile - Get user profile
  • PUT /api/users/profile - Update user profile

Movie Endpoints

  • GET /api/movies - Get all movies
  • GET /api/movies/top5 - Get top 5 movies
  • GET /api/movies/children-friendly - Get children-friendly movies
  • POST /api/movies - Add new movie (admin only)
  • PUT /api/movies/:id - Update movie (admin only)
  • DELETE /api/movies/:id - Delete movie (admin only)

Booking Endpoints

  • GET /api/bookings - Get user bookings
  • POST /api/bookings - Create new booking
  • GET /api/bookings/:id - Get booking details
  • PUT /api/bookings/:id - Update booking

Admin Endpoints

  • POST /api/admins/login - Admin login
  • GET /api/admins/me - Get admin profile
  • PUT /api/admins/:id - Update admin profile

🎯 Key Features

Booking System

  • Real-time seat selection
  • Multiple seat types with different pricing
  • Booking confirmation with payment
  • Booking history and management

Admin Panel

  • Comprehensive dashboard with analytics
  • Movie, cinema, and show management
  • User and booking administration
  • Payment and complaint tracking

Security Features

  • JWT-based authentication
  • Password hashing with bcrypt
  • Role-based access control
  • CORS configuration for security

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is licensed under the ISC License.

👨‍💻 Author

Saad Bin Ather

🙏 Acknowledgments

  • 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published