Skip to content
RahmannugarPublic

About

A distributed event ticketing platform built with NestJS and Go microservices, Kafka, RabbitMQ, gRPC, PostgreSQL, Redis, and OpenTelemetry.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

Eventa

A distributed event ticketing platform built on a NestJS and Go microservices architecture using gRPC, Kafka, RabbitMQ, PostgreSQL, Redis, OpenTelemetry, and Docker Compose.

https://excalidraw.com/#json=SFbQZx5HysD4qID-yI_WI,BiqyfjSj0iGFfR4oRcvJ_A

Overview

Eventa is a distributed event ticketing platform that enables organizers to create and manage events, publish tickets, process attendee purchases through Stripe, validate QR code check-ins, issue refunds for cancelled events, deliver semantic and location-aware recommendations using Ahnlich and PostGIS, and provide analytics for organizers.

The system is composed of independently deployable modular-monolith services responsible for identity, events, commerce, ticketing, discovery, analytics, notifications, and an API Gateway. Services communicate using HTTP, gRPC, Kafka, and RabbitMQ, combining synchronous request-response communication with asynchronous event-driven workflows. Transactional outbox records and Debezium are the primary relay for durable database-backed inter-service facts and initial job assignments.

The project is designed to explore production engineering practices including distributed transactions, compensating actions, event-driven architecture, observability, background processing, and clear service ownership. The whole system is reproducible with Docker Compose; see Where to Run Eventa for where to run it.

Architecture

See ARCHITECTURE.md for service ownership, communication boundaries, data ownership, and distributed workflow decisions.

  • API Gateway
  • Identity Service
  • Event Service
  • Commerce Service
  • Ticket Service
  • Discovery Service
  • Analytics Service
  • Notification Service

Services use explicit application services for business use cases, thin transport controllers, persistence-only repositories, and capability adapters for infrastructure. Separate read models are introduced only when a real access pattern justifies them. Every backend service owns README.md, API.md, and ARCHITECTURE.md; each substantial backend domain owns concise API.md and ARCHITECTURE.md files without duplicating machine-readable contracts. Frontend applications own a focused README.md and design guidance instead of service API or architecture catalogs.

Technology

Backend

  • NestJS and TypeScript: API Gateway, Identity, Event, and Commerce
  • Go: Ticket, Discovery, Analytics, and Notification
  • pgx and Tern
  • Drizzle
  • PostgreSQL
  • Redis
  • Kafka
  • RabbitMQ
  • gRPC
  • Buf and ts-proto
  • Stripe
  • Resend
  • Ahnlich (vector DB, AI proxy)

AI

Observability

  • OpenTelemetry
  • Prometheus
  • Grafana(Loki, Tempo)

Frontend

  • React
  • Vite

Product interfaces use attendee and organizer language. They translate system state into what happened and what the user can do next; they do not expose services, contracts, internal fields or versions, implementation progress, or unavailable backend capabilities as interface copy.

Infrastructure

  • Docker Compose
  • k6 for local performance testing

Where to Run Eventa

Eventa is a large Compose project: roughly forty containers including six PostgreSQL databases, Kafka, five Debezium relays, RabbitMQ, Redis, Ahnlich, and the observability pipeline. Run it on a VPS or another dedicated remote machine, not on your laptop or workstation. Building the images and keeping the stack healthy consumes the CPU, memory, and disk a development machine should spend on editing, gates, and unit tests.

"Local" in the sections below means the machine that runs the Compose project (its own .env files, its own localhost endpoints).

Local Development

For the full command reference, see commands.md.

Docker Compose starts the API Gateway, Identity Service, Event Service, Commerce Service, Ticket Service, Discovery Service, Notification Service, their owned PostgreSQL databases, Redis-backed rate-limit and authentication state, RabbitMQ, Kafka, CDC, and the local observability pipeline. Identity, Event, Commerce, Ticket, Discovery, and Notification migrations and event-bus initialization run in one-shot containers before their dependants start. The startup command warms Kafka and RabbitMQ before starting the remaining stack with bounded concurrency, protecting local resources without omitting services.

Build and start Eventa with:

pnpm services:start

After the images have been built once, start the same complete stack without rebuilding:

pnpm services:start:no-build

Create each service .env file from its service-owned .env.example before starting Eventa. Missing files and invalid permanent configuration intentionally stop startup.

Create the ignored RabbitMQ .env from infrastructure/messaging/job-queue/rabbitmq/.env.example and the Grafana .env from infrastructure/observability/dashboards/grafana/.env.example as well. Secrets are not stored in Compose or committed configuration.

Create apps/eventa-app/.env from its .env.example before starting the web app. Run it directly on the host with pnpm web:start; it is not part of Docker Compose. The attendee and admin browser flows share http://localhost:5273, so the Gateway's CLIENT_ORIGIN uses that origin.

The migration must complete successfully before Identity starts, and the Gateway waits for healthy Identity and Redis containers.

Local endpoints:

  • Eventa web app: http://localhost:5273
  • API Gateway: http://localhost:3004
  • Scalar API reference: http://localhost:3004/docs
  • OpenAPI JSON: http://localhost:3004/openapi.json
  • OpenAPI YAML: http://localhost:3004/openapi.yaml
  • Gateway liveness: http://localhost:3004/health/live
  • Identity readiness: http://localhost:3005/health/ready
  • Notification readiness: http://localhost:3006/health/ready
  • Event readiness: http://localhost:3007/health/ready
  • Commerce readiness: http://localhost:3008/health/ready
  • Ticket readiness: http://localhost:3010/health/ready
  • Discovery readiness: http://localhost:3011/health/ready
  • RabbitMQ management: http://localhost:15673
  • Grafana: http://localhost:3300
  • Grafana Alloy diagnostics: http://localhost:51234
  • Prometheus: http://localhost:59090

Stop the stack without deleting database data:

pnpm services:stop

Use pnpm db:reset:all only when you intentionally want to delete and recreate all local databases.

API Documentation

See API.md for the public API and internal contract map. While the Gateway is running, Scalar is available at http://localhost:3004/docs and the importable OpenAPI contracts are available as JSON and YAML.

Each deployable service also owns its operational, API, and architecture documentation inside its service directory.

Performance Validation

Eventa uses k6 for local performance validation. k6 scenarios validate both request-response and event-driven work:

About

A distributed event ticketing platform built with NestJS and Go microservices, Kafka, RabbitMQ, gRPC, PostgreSQL, Redis, and OpenTelemetry.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages