It is a microservice-based NodeJS Web App, where a user can create account, and start selling tickets. LoggedIn user can also buy tickets from other users. Tickets can be various types like film, sports, concert, etc. A user, who buys a ticket, has lock period of 2 minutes, within which noone else can buy/update the ticket. The user has to complete the transaction within that 2 minutes, otherwise ticket is freed for other users' to buy.
- Type Safety
- Seperation of Concern
- Centralised Error Handling and middlewares
- Common Repo as npm package used by other services
- Async Execution
- Robust Unit Tests
- Restricted APIS with JWT authentication
- Best practices in communication between different services
- Event-based communication between Services
- Production-level Code
- UI: NextJS with Bootstrap
- Backend: NodeJS, Express
- Database: MongoDb with Mongoose ODM
- Request body Validation: express-validator
- Testing: Jest
- Containerisation and Orchestartion: Docker, Kubernetes
- Message Queue: Nats Streaming Server
- Authentication: JWT and session
- CI/CD: Github Actions
- Apply this kubectl command manually:
kubectl create secret generic jwt-secret --from-literal=JWT_KEY=<secret-key>
kubectl create secret generic stripe-secret --from-literal=STRIPE_KEY=<stripe-secret-key>
- Install ingress-nginx (the load balancer service that will interact with Load Balancer of Cloud Provider) by applying yaml file.It is basically set of rules that will distribute traffic to correct pods in our cluster based on path requested.
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.8.2/deploy/static/provider/cloud/deploy.yaml
- Check if secrets are added.If you donot see the secrets , reapply them using above command:
kubectl get secrets
- Run test Cases:
npm run test