This repository contains a ticketing application that enables users to purchase tickets online and make payments. The application is built using React.js for the frontend, Node.js for the backend, and it follows a microservices architecture. MongoDB is used as the primary database for storage and JetStream (Pub/Sub system) as a communicator between microservices.
Before running the application, ensure that you have set up the necessary configurations and dependencies.
To run the application, you need to create the following secrets using kubectl
:
kubectl create secret generic jwt-secret --from-literal=JWT_KEY=your_jwt_secret
kubectl create secret generic stripe-secret --from-literal STRIPE_KEY=your_stripe_secret_key
Replace your_jwt_secret
and your_stripe_secret_key
with your preferred secret keys.
To set up the Ingress controller for Kubernetes, apply the following configuration:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.8.2/deploy/static/provider/cloud/deploy.yaml
This will deploy the Ingress controller, allowing external access to your application.
After setting up the secrets and the Ingress controller, you can run the Ticketing App by following these steps:
-
Clone this repository:
git clone https://github.com/your_username/ticketing-app.git
-
Navigate to the project directory:
cd ticketing-app
-
Install dependencies for each service:
cd auth && npm install && cd .. cd tickets && npm install && cd .. cd orders && npm install && cd .. cd client && npm install && cd .. cd expirations && npm install && cd ..
-
Run each service:
# Run Auth service cd auth && npm start # Run Tickets service cd tickets && npm start # Run Orders service cd orders && npm start # Run Expiration service cd expirations && npm start # Run Client (Frontend) service cd client && npm start
-
Access the application in your browser at
http://localhost:3000
.
Feel free to contribute to this project by submitting pull requests or opening issues. Your contributions are highly appreciated!
This project is licensed under the MIT License - see the LICENSE file for details.