A comprehensive, AI-powered e-ticket booking platform designed for Sri Lanka. This platform allows users to browse events, select seats interactively, purchase tickets securely, and manage their bookings. It features a modern frontend, a robust Node.js API, and a Python microservice for AI-driven capabilities such as personalized event recommendations and an intelligent chatbot assistant.
- Event Discovery: Browse and search for upcoming events by category, location, and date.
- Interactive Seat Selection: View real-time seat availability and select seats on an interactive map.
- Secure Booking System: Temporary seat locking during checkout to prevent double-booking.
- QR Code Ticketing: Generates unique QR codes for purchased tickets.
- AI Event Assistant: Integrated chatbot (powered by Qwen2.5-VL via Hugging Face) to answer user queries about events, pricing, and bookings.
- AI Recommendations: Personalized event recommendations based on user booking history, and similar event suggestions using NLP (TF-IDF & Cosine Similarity).
- Automated Content Generation: AI-generated professional event descriptions for organizers.
- Dashboard: Manage bookings, view purchased tickets, and access QR codes.
- Framework: React 19 + Vite
- Styling: Tailwind CSS
- State Management: Zustand, React Query
- Routing: React Router DOM
- Other Tools: Axios, QRCode.react, React Markdown
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB (Mongoose)
- Cache / Concurrency: Redis (ioredis) for seat locking mechanisms
- Authentication: JWT (JSON Web Tokens) & bcryptjs
- Language: Python
- Framework: Flask
- Database: MongoDB (PyMongo)
- Machine Learning: scikit-learn (TF-IDF, Cosine Similarity)
- AI Integration: OpenAI SDK targeting Hugging Face inference endpoints (Qwen)
eticket-platform/
├── frontend/ # React (Vite) frontend application
│ ├── src/ # React components, pages, and store
│ ├── package.json # Frontend dependencies
│ └── vite.config.js # Vite configuration
├── backend/ # Node.js Express API & Python Flask API
│ ├── src/ # Node.js API source code (controllers, routes, models)
│ ├── server.js # Entry point for the Node.js API
│ ├── app.py # Entry point for the Python AI Microservice
│ ├── package.json # Node.js dependencies
│ └── requirements.txt # Python dependencies
└── README.md # This documentation file
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- Python (v3.8 or higher)
- MongoDB (Local or Atlas URL)
- Redis (Local or Cloud URL)
- A Hugging Face account and Access Token (for AI features)
git clone <repository-url>
cd eticket-platform- Navigate to the backend directory:
cd backend - Install dependencies:
npm install
- Create a
.envfile in thebackenddirectory and add the following variables:PORT=5000 MONGO_URI=your_mongodb_connection_string REDIS_URL=your_redis_connection_string JWT_SECRET=your_jwt_secret CLIENT_URL=http://localhost:5173 FRONTEND_URL=http://localhost:5173
- Start the Node.js server:
npm run dev
- Stay in the
backenddirectory (or open a new terminal in thebackenddirectory). - Create and activate a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
- Install Python dependencies:
pip install -r requirements.txt
- Update the
.envfile in thebackenddirectory to include variables for Python:HF_TOKEN=your_hugging_face_access_token
- Start the Flask server:
The Python API will run on
python app.py
http://localhost:5001by default.
- Open a new terminal and navigate to the frontend directory:
cd frontend - Install dependencies:
npm install
- Create a
.envfile in thefrontenddirectory (if needed) to specify your API URLs:(Check the frontend codebase for exact environment variable names).VITE_API_BASE_URL=http://localhost:5000/api VITE_AI_API_BASE_URL=http://localhost:5001
- Start the development server:
npm run dev
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the ISC License.