Sport-tickets is a comprehensive platform designed for browsing, purchasing, and managing tickets for various sports events. The platform is built with a microservices architecture, utilizing modern technologies to ensure scalability, reliability, and maintainability.
- User Authentication: Secure user registration and login.
- Ticket Management: Browse and manage sports event tickets.
- Order Processing: Create and manage orders for tickets.
- Payment Handling: Secure payment processing for ticket purchases.
- AI Recommendations: Personalized AI-driven ticket recommendations based on user activity.
- Expiration Service: Manages the expiration of unpaid orders.
- Event Streaming: Real-time updates and communication between microservices with Apache Kafka.
- State Management: Efficient state management using Redux.
- Caching: Enhanced performance through Redis caching.
- Frontend: Next.js, React, React Query, TailwindCSS
- Backend: Node.js, Express
- Database: MongoDB
- Authentication: JSON Web Tokens (JWT), bcrypt
- State Management: Redux
- Caching: Redis
- Event Streaming: Apache Kafka
- Payment Processing: Stripe
- Testing: Jest, Supertest
- Containerization: Docker
- Orchestration: Kubernetes
- Cloud: Google Cloud
- Continuous Development: Skaffold
- CI/CD: GitHub Actions
- Deployment: DigitalOcean
The application is divided into several microservices, each responsible for a specific domain of the application:
Handles user registration, login, and authentication using JWTs. It ensures secure access to other services.
Manages the lifecycle of tickets, including creation, updates, and retrieval. It allows users to browse available sports event tickets.
Processes orders by associating tickets with users and managing the order states (created, cancelled, completed).
Integrates with payment gateways to handle transactions securely. Ensures payments are processed before completing an order.
Ensures unpaid orders are cancelled after a certain period, freeing up tickets for other users.
Implements event streaming to ensure real-time communication between services, facilitating a responsive and cohesive system.
Uses AI to analyze user behavior and recommend the best tickets for each user based on their past activity.
Deployed as a GitHub module for code reuse
The platform utilizes an event-driven architecture with Apache Kafka to enable real-time communication and updates between microservices. This ensures that all parts of the system stay in sync and respond to events as they occur, providing a seamless and responsive user experience.
Next.js is used for server-side rendering (SSR) to enhance performance and SEO. This ensures fast initial load times and better indexing by search engines.
git clone https://github.com/almoghindi/Sport-tickets.git
cd Sport-tickets
cd auth && npm install
cd ../tickets && npm install
cd ../orders && npm install
cd ../payments && npm install
cd ../expiration && npm install
cd ../client && npm install
cd ../common && npm install
Create a .env file in each service's root directory and configure the required environment variables.
npm run dev
Ensure Docker and Kubernetes are installed and running. Use Skaffold to manage the development lifecycle:
skaffold dev
The project uses GitHub Actions for CI/CD, ensuring automated testing, building, and deployment to DigitalOcean.
Experience the welcoming home page where users are greeted with vibrant visuals and a simple interface to explore various sports events.
Browse through an extensive list of available tickets with detailed filters to narrow down choices based on date, price range, and category.
See the confirmation page that assures users their ticket purchases were successful and provides details of the completed order.