Orchestrate is a comprehensive event management platform built using microservices architecture. It provides a scalable, maintainable solution for organizing events, managing venues, handling user authentication, and tracking attendees.
- 🔐 User Authentication & Authorization with JWT
- 📅 Event Management with CRUD operations
- 🏢 Venue Management and capacity control
- 👥 Attendee Registration and tracking
- 🚪 API Gateway for unified access
- 🐳 Containerized with Docker
- 📊 Database per Service pattern
- 🔧 Type-safe with TypeScript
Our microservices architecture follows industry best practices with clear service boundaries and independent deployments.
Client Applications → API Gateway → Microservices → Databases
- Synchronous: HTTP/REST API calls through API Gateway
- Asynchronous: Event-driven communication between services using RabbitMQ (e.g., for notifications)
- Authentication: JWT token validation across services
- Database: PostgreSQL with service-specific databases
- Network: Docker internal networking with service discovery
Service | Port | Database | Responsibility |
---|---|---|---|
API Gateway | 3000 | - | Request routing, authentication, rate limiting |
Auth Service | 3001 | auth_db (5433) | User management, JWT tokens, roles, event publishing |
Event Service | 3002 | event_db (5434) | Event CRUD, status management |
Venue Service | 3003 | venue_db (5435) | Venue management, capacity control |
Attendee Service | 3004 | attendee_db (5436) | Registration, ticket management |
Notification Service | N/A (Worker) | - | Consumes events (e.g., user registration) from RabbitMQ to send notifications (e.g., welcome emails) |
- User registration and authentication
- JWT token generation and validation
- Role-based access control (ATTENDEE, ORGANIZER, ADMIN)
- Password hashing with bcrypt
- Event creation, update, deletion
- Event status management (DRAFT, PUBLISHED, CANCELLED, COMPLETED)
- Organizer-specific event queries
- Event-attendee relationship management
- Venue information management
- Capacity and availability tracking
- Venue search and filtering
- Event registration management
- Ticket generation and validation
- Attendee status tracking
- Check-in functionality
- Route proxying to appropriate services
- Centralized authentication middleware
- Request/response logging
- Rate limiting and security headers
- Consumes events published by other services via RabbitMQ.
- Handles asynchronous tasks like sending email notifications.
- Example: Sends welcome emails upon user registration events from the Auth Service.
- Utilizes a topic exchange (
EMAIL_NOTIFICATIONS_EXCHANGE
) for flexible event routing.
- Node.js 18+
- Docker & Docker Compose
- Git
-
Clone the repository
git clone https://github.com/srexrg/orchestrate.git cd orchestrate
-
Setup environment variables
# Copy environment template for each service cp services/auth-service/.env.example services/auth-service/.env cp services/event-service/.env.example services/event-service/.env cp services/venue-service/.env.example services/venue-service/.env cp services/attendee-service/.env.example services/attendee-service/.env cp services/api-gateway/.env.example services/api-gateway/.env # Add .env for notification-service if it requires specific env vars (e.g., for email service credentials) # cp services/notification-service/.env.example services/notification-service/.env
-
Install dependencies
npm install
-
Build shared package
cd shared && npm run build && cd ..
-
Start databases
docker compose up -d auth-db event-db venue-db attendee-db
-
Run migrations
# Run migrations for each service cd services/auth-service && npx prisma migrate dev && cd ../.. cd services/event-service && npx prisma migrate dev && cd ../..
-
Start all services
# Using npm workspaces (recommended for development) npm run dev:all # Or using Docker (recommended for production) docker compose up -d
-
Verify services
curl http://localhost:3000/health
- Start services individually
# Terminal 1 - Auth Service cd services/auth-service && npm run dev # Terminal 2 - Event Service cd services/event-service && npm run dev # Terminal 3 - Venue Service cd services/venue-service && npm run dev # Terminal 4 - Attendee Service cd services/attendee-service && npm run dev # Terminal 5 - API Gateway cd services/api-gateway && npm run dev # Terminal 6 - Notification Service (if running as a separate process) # cd services/notification-service && npm run dev
orchestrate/
├── services/
│ ├── auth-service/ # User authentication & authorization, event publishing
│ ├── event-service/ # Event management & CRUD
│ ├── venue-service/ # Venue management
│ ├── attendee-service/ # Registration & ticket management
│ ├── notification-service/ # Event consumption & notifications (e.g., email)
│ └── api-gateway/ # Request routing & centralized auth
├── shared/ # Common utilities, types & interfaces
│ ├── types/ # TypeScript interfaces & enums
│ └── utils/ # Shared utility classes
├── prisma/ # Legacy - to be removed
├── src/ # Legacy - to be removed
├── docker-compose.yml # Service orchestration
├── package.json # Workspace management
└── tsconfig.json # Root TypeScript configuration
# Development
npm run dev:auth # Start auth service only
npm run dev:event # Start event service only
npm run dev:venue # Start venue service only
npm run dev:attendee # Start attendee service only
npm run dev:gateway # Start API gateway only
npm run dev:notification # Start notification service only
npm run dev:all # Start all services (with concurrently)
# Docker
docker compose up -d # Start with Docker
docker compose down # Stop containers
docker compose logs -f # View logs
# Database
cd services/<service-name>
npx prisma migrate dev # Run migrations
npx prisma generate # Generate Prisma client
npx prisma studio # Open Prisma Studio
# Building
npm run build --workspaces # Build all services
cd shared && npm run build # Build shared package only
Each service uses environment variables for configuration:
Auth Service:
DATABASE_URL="postgresql://postgres:postgres@localhost:5433/auth"
JWT_SECRET="your-secret-key"
JWT_REFRESH_SECRET="your-refresh-secret"
PORT=3001
NODE_ENV=development
Event Service:
DATABASE_URL="postgresql://postgres:postgres@localhost:5434/events"
AUTH_SERVICE_URL="http://localhost:3001"
PORT=3002
NODE_ENV=development
All API requests (except registration/login) require authentication:
Authorization: Bearer <jwt_token>
POST /api/auth/register # User registration
POST /api/auth/login # User login
POST /api/auth/refresh # Refresh token
POST /api/auth/logout # User logout
GET /api/events # List events
POST /api/events # Create event
GET /api/events/:id # Get event details
PUT /api/events/:id # Update event
DELETE /api/events/:id # Delete event
GET /api/events/organizer # Get organizer's events
GET /api/venues # List venues
POST /api/venues # Create venue
GET /api/venues/:id # Get venue details
PUT /api/venues/:id # Update venue
DELETE /api/venues/:id # Delete venue
POST /api/attendees/register # Register for event
GET /api/attendees/tickets # Get user tickets
POST /api/attendees/checkin # Check-in to event
GET /api/attendees/events/:eventId # Get event attendees
Register User:
curl -X POST http://localhost:3000/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "password123",
"name": "John Doe"
}'
Login:
curl -X POST http://localhost:3000/api/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "password123"
}'
Create Event:
curl -X POST http://localhost:3000/api/events \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
-d '{
"title": "Tech Conference 2025",
"description": "Annual tech conference",
"date": "2025-12-01T10:00:00Z",
"capacity": 100,
"price": 99.99
}'
Get Events:
curl -X GET http://localhost:3000/api/events \
-H "Authorization: Bearer <token>"
# Run tests for all services
npm test --workspaces
# Run tests for specific service
cd services/auth-service && npm test
Each service contains:
- Unit tests: Testing individual functions and methods
- Integration tests: Testing API endpoints
- Database tests: Testing Prisma operations
-
Build production images
docker compose build
-
Deploy with production config
docker compose up -d
- Development:
docker-compose.yml
- Production:
docker-compose.prod.yml
(to be created) - Testing:
docker-compose.test.yml
(to be created)
Each service maintains its own database:
# Database ports for local development
Auth DB: localhost:5433
Event DB: localhost:5434
Venue DB: localhost:5435
Attendee DB: localhost:5436
- Port conflicts: Ensure ports 3000-3004 and 5433-5436 are available
- Database connection: Verify PostgreSQL containers are running
- JWT tokens: Check JWT_SECRET environment variables match across services
- Prisma issues: Run
npx prisma generate
after schema changes
# View service logs
docker compose logs auth-service
docker compose logs event-service
# Check service health
curl http://localhost:3000/health
curl http://localhost:3001/health
curl ht
67E5
tp://localhost:3002/health
- 🎫 Payment Integration (Stripe/PayPal)
- 📨 Enhanced Event-Driven Capabilities (e.g., exploring Kafka for high-throughput scenarios, dead-letter queue strategies for RabbitMQ)
- ⚡ Caching Layer with Redis
- 📊 Monitoring & Observability (Prometheus, Grafana)
- 🔍 Search Service with Elasticsearch
- 📧 Expanded Notification Channels (SMS, Push notifications, in-app)
- 📱 Mobile API optimizations
- 🧪 Comprehensive Testing suite
- 🚀 CI/CD Pipeline with GitHub Actions
- ☁️ Cloud Deployment guides (AWS, GCP, Azure)
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow TypeScript best practices
- Write tests for new features
- Update documentation
- Follow the existing code style
- Use conventional commit messages
# Clone your fork
git clone https://github.com/srexrg/orchestrate.git
cd orchestrate
# Install dependencies
npm install
# Build shared package
cd shared && npm run build && cd ..
# Start development environment
npm run dev:all