Skip to content

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, Gemini, 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.

The project is designed to explore production engineering practices including distributed transactions, compensating actions, event-driven architecture, observability, background processing, and clear service ownership while remaining fully runnable locally using Docker Compose.

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, Commerce, Analytics, and Notification
  • Go: Ticket and Discovery
  • GORM
  • Drizzle
  • PostgreSQL
  • Redis
  • Kafka
  • RabbitMQ
  • gRPC
  • Buf and ts-proto
  • Stripe
  • Resend
  • Ahnlich (vector DB, AI proxy)

AI

  • Google Gemini

Observability

  • OpenTelemetry
  • Prometheus
  • Grafana(Loki, Tempo)

Frontend

  • React
  • Vite

Infrastructure

  • Docker Compose
  • k6 for local performance testing

Local Development

For the full command reference, see commands.md.

Docker Compose starts the API Gateway, Identity Service, Event Service, Notification Service, their owned PostgreSQL databases, Redis-backed rate-limit and authentication state, RabbitMQ, and the local observability pipeline. Identity, Event, and Notification migrations run in one-shot containers before their services start.

Start the stack with:

pnpm services:start

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
  • 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

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages