A production-style microservices application for buying and selling event tickets — inspired by platforms like StubHub and Ticketmaster.
Built to demonstrate scalable backend architecture, event-driven communication, and cloud-native deployment using modern engineering best practices.
- User authentication and authorization
- Ticket creation, updates, and listings
- Order locking to prevent double booking
- Automatic order expiration using background jobs
- Secure payments with Stripe
- Real-time data synchronization via events
- Optimistic concurrency control for consistency
| Service | Responsibility |
|---|---|
| Auth Service | User signup, signin, JWT authentication |
| Tickets Service | Create & manage tickets |
| Orders Service | Handle order lifecycle |
| Expiration Service | Auto-expire unpaid orders |
| Payments Service | Stripe payment processing |
| Client (Next.js) | Server-side rendered frontend |
Each service owns its own database following the database-per-service pattern.
All services communicate asynchronously using NATS Streaming Server.
ticket:createdticket:updatedorder:createdorder:cancelledorder:expiredpayment:created
- Loose coupling between services
- Horizontal scalability
- Reliable data synchronization
- TypeScript
- Node.js, Express
- MongoDB + Mongoose
- NATS Streaming Server
- BullJS
- Redis
- Stripe API
- Docker
- Kubernetes (local + GCP)
- Ingress NGINX
- Jest
- Supertest
- mongodb-memory-server
- Private NPM packages for reusable logic
- Strong typing with TypeScript
- Event-driven microservices architecture
- Database-per-service pattern
- Optimistic concurrency control
- Test-first development
- Centralized error handling
- Reusable shared libraries
- Clean and scalable folder structure
- Cloud-native deployment
- Real-world microservices system design
- Asynchronous service communication
- Distributed data consistency
- Background job processing
- Secure payment workflows
- Production-grade DevOps practices