Skip to content

A microservices-based ticket booking application using Kubernetes, Docker, Next.js, Node.js, TypeScript, MongoDB, and Redis. Features include authentication, ticket management, orders, payments, and event-driven expiration handling.

Notifications You must be signed in to change notification settings

Max-im/tickets-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Application for tickets booking

Microservice approach to application building

auth test orders test payment test ticket test

Features

  • Kubernetes
  • Docker
  • Next.js
  • Node
  • TypeScript
  • MongoDB
  • Redis
  • Jest
  • NATS streaming
  • NPM module for sharing common code

client service

Next app to of the app

auth service

method url body description
POST /api/users/signup {email: string, password: string} create user
POST /api/users/signin {email: string, password: string} login user
POST /api/users/signout - logout user
GET /api/users/currentuser - get current user data

ticket service

method url body description
POST /api/tickets {title: string, price: number} create ticket
GET /api/tickets - get tickets list
GET /api/tickets/:id - get ticket
PUT /api/tickets/:id {title: string, price: number} update ticket

orders service

method url body description
GET /api/orders - a user orders list
GET /api/orders/:id - get order by id
POST /api/orders {ticketId: string} create new order
DELETE /api/orders/:id - delete order by id

payment service

method url body description
POST /api/payment {token: string, orderId: string} handle payment

expiration service

internal service with no endpoints, listen and publish events to make orders expire

Usage

  • clone the repo
  • install dependencies for every service
  • make sure you wire up kubernetes minikube and skaffold
  • set host tickets.net on your local machine equal to ingress-nginx ip (run minikube ip to see your minikube ip address)
  • set up jwt-secret value on kubernetes env kubectl create secret generic jwt-secret --from-literal=jwt=<secretString>
  • set up stripe-secret value on kubernetes env kubectl create secret generic stripe-secret --from-literal STRIPE_KEY=<secretString>
  • run skaffold dev for run on your local machine
  • open https://tickets.net

About

A microservices-based ticket booking application using Kubernetes, Docker, Next.js, Node.js, TypeScript, MongoDB, and Redis. Features include authentication, ticket management, orders, payments, and event-driven expiration handling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published