A production-grade, microservices-based Event Management REST API built progressively across 5 phases — from a simple monolith to a cloud-ready distributed system with Kafka messaging, Docker containerization, and real-time monitoring.
Inspired by real-world platforms like Eventbrite, BookMyShow, and Meetup.
📖 API Docs • 🚀 Quick Start • 🏗️ System Architecture • 📡 API Endpoints
This is not a simple CRUD application. It is a real backend system designed and built the way companies actually evolve software — starting with a working monolith, adding technologies only when they solve real problems, and ending with a cloud-ready microservices architecture.
Every technology was added at the right moment. Redis came when the database was being hit unnecessarily. Elasticsearch came when LIKE queries weren't good enough. Kafka came when synchronous email delivery was blocking API responses. Each phase solved a problem the previous phase created.
- 🏗️ Production-Grade Event Management Platform
- 🔐 JWT Authentication + Google OAuth2 Login
- ⚡ Redis Distributed Caching for High Performance
- 🔍 Elasticsearch Full-Text Search with Fuzzy Matching
- 📨 Apache Kafka Event-Driven Messaging Architecture
- 🐳 Dockerized Multi-Service Deployment
- 🚀 CI/CD Pipeline with GitHub Actions
- 📊 Prometheus & Grafana Monitoring Stack
- 🧩 Microservices-Based Email Notification Service
- 🗄️ Flyway Database Version Control & Migrations
- 🔄 Rate Limiting with Bucket4j
- 🤖 AI-Powered Event Recommendations using Spring AI
- Full Event CRUD with lifecycle state machine (DRAFT → PUBLISHED → CANCELLED/COMPLETED)
- Venue management with automatic GPS geocoding via OpenStreetMap API
- Organization management (groups like "Pune Java User Group") with follower system
- Category tagging system with Elasticsearch-powered filtered search
- Event registration with atomic SQL concurrency control — zero overselling under any load
- JWT stateless authentication (HS256, 24-hour expiry)
- BCrypt password hashing with adaptive cost factor
- OAuth2 Google Social Login
- Role-based access control (USER / ADMIN)
- Per-IP rate limiting via Bucket4j token bucket algorithm
- Redis caching with
@Cacheable/@CacheEvict— eliminates redundant database hits - Elasticsearch fuzzy search with
fuzziness: AUTO— finds results despite typos - HikariCP connection pooling for efficient database connections
- Async email via
@Async— API never blocks on email delivery
- Real-time in-app notification system (EVENT_CANCELLED, REGISTRATION_CONFIRMED, NEW_FOLLOWER)
- Reviews and ratings with multi-layer validation (only attendees of completed events)
- Bookmarks / wishlist for events
- Waitlist with automatic promotion on cancellation
- Apache Kafka message bus between main app and Email microservice
- Event cancellations publish to
event.cancelledtopic — email service consumes asynchronously - Registration confirmations publish to
event.registeredtopic - Zero coupling between services — each evolves independently
- Docker multi-stage builds — final image 220MB vs 720MB without multi-stage
- Docker Compose — one command starts all 8 services
- GitHub Actions CI/CD — tests run on every push, Docker image built on merge to main
- Prometheus + Grafana — real-time dashboard (request rate, P95 latency, JVM memory, DB connections)
- Custom
GET /api/system/healthendpoint checks MySQL, Redis, Elasticsearch
- Organizer dashboard with registration rate, turnout metrics
- Platform-wide admin analytics
- CSV and Excel (
.xlsx) attendee export via Apache POI
| Phase | Focus | Key Technologies | Status |
|---|---|---|---|
| Phase 1 | Core REST API | Spring Boot, JPA, H2, Lombok | ✅ Complete |
| Phase 2 | Persistence & Validation | MySQL, Flyway, MapStruct, JUnit 5 | ✅ Complete |
| Phase 3 | Performance & Search | Redis, Elasticsearch, Swagger, Email | ✅ Complete |
| Phase 4 | Security & Features | JWT, OAuth2, Kafka, Rate Limiting, Spring AI | ✅ Complete |
| Phase 5 | Cloud & Microservices | Docker, GitHub Actions, Kafka, Prometheus, Grafana | ✅ Complete |
| Layer | Technology | Version |
|---|---|---|
| Language | Java | 17 |
| Framework | Spring Boot | 3.4.1 |
| ORM | Spring Data JPA / Hibernate | 6.6.4 |
| Database | MySQL | 8.0 |
| Cache | Redis | 7.x |
| Search | Elasticsearch | 8.x |
| Messaging | Apache Kafka | 3.x |
| Migrations | Flyway | 10.x |
| Security | Spring Security + JWT | jjwt 0.12.3 |
| OAuth2 | Google Login | Spring Security OAuth2 |
| Rate Limiting | Bucket4j | 8.7.0 |
| Mapping | MapStruct | 1.5.5 |
| API Docs | Springdoc OpenAPI | 2.7.0 |
| AI | Spring AI (Groq LLaMA 3) | 1.0.0-M6 |
| Export | Apache POI | 5.2.5 |
| Monitoring | Prometheus + Grafana | 2.48 / 10.2 |
| Containerization | Docker + Compose | 24.x / 2.x |
| CI/CD | GitHub Actions | — |
| Build Tool | Maven | 3.x |
14 Flyway Migrations (V1–V14)
| Migration | Description |
|---|---|
| V1 | Create events table |
| V2 | Add created_at to events |
| V3 | Create users table |
| V4 | Seed admin user (BCrypt password) |
| V5 | Create venues table with geocoding fields |
| V6 | Add venue_id FK to events |
| V7 | Add bio, phone, city, updated_at to users |
| V8 | Create organizations + organization_followers |
| V9 | Create registrations table + registrations_count |
| V10 | Add event status + lifecycle timestamps |
| V11 | Create notifications table with indexes |
| V12 | Create reviews table with rating constraint |
| V13 | Create bookmarks junction table |
| V14 | Create waitlist table with position ordering |
| Service | Port | Verify |
|---|---|---|
| Docker Desktop | — | docker --version |
| Java 17+ | — | java -version |
| Maven | — | mvn --version |
All other services (MySQL, Redis, Elasticsearch, Kafka, Prometheus, Grafana) are started automatically by Docker Compose.
# 1. Clone the repository
git clone https://github.com/Shubhamkale1/event-manager.git
cd event-manager
# 2. Create environment file
cp .env.example .env
# Edit .env with your values
# 3. Start everything
docker-compose up --build
# 4. Verify all services are running
docker psServices available after startup:
| Service | URL | Credentials |
|---|---|---|
| API | http://localhost:8081 | — |
| Swagger UI | http://localhost:8081/swagger-ui/index.html | — |
| System Health | http://localhost:8081/api/system/health | — |
| Kafka UI | http://localhost:8090 | — |
| Prometheus | http://localhost:9090 | — |
| Grafana | http://localhost:3000 | admin / admin123 |
| MySQL | localhost:3307 | root / (from .env) |
| Redis | localhost:6380 | — |
| Elasticsearch | localhost:9201 | — |
# Start infrastructure (MySQL, Redis, Elasticsearch)
# Then run the application with dev profile:
mvn spring-boot:run -Dspring-boot.run.profiles=devDB_PASSWORD=your_mysql_password
JWT_SECRET=your-jwt-secret-minimum-32-characters
MAIL_USERNAME=your_mailtrap_username
MAIL_PASSWORD=your_mailtrap_password
GEOCODING_API_KEY=your_geocode_api_key
AI_API_KEY=your_groq_api_keyAll protected endpoints require a JWT Bearer token.
Step 1 — Register
POST /api/auth/register
Step 2 — Copy token from response and use in every request
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9...
Default admin credentials (seeded by Flyway V4)
Email: admin@events.com
Password: admin123
| Category | Count | Auth Required |
|---|---|---|
| Authentication | 4 | No |
| Events (CRUD + Search + Lifecycle) | 12 | Partial |
| Venues | 7 | Partial |
| Organizations | 9 | Partial |
| User Profile | 4 | Yes |
| Categories | 6 | Partial |
| Registration | 6 | Yes |
| Waitlist | 4 | Yes |
| Reviews & Ratings | 6 | Partial |
| Bookmarks | 4 | Yes |
| Notifications | 6 | Yes |
| Dashboard & Analytics | 3 | Yes |
| Export | 1 | Yes |
| Admin | 3 | ADMIN role |
| AI Recommendations | 1 | Yes |
| System Health | 2 | No |
Total: 88 REST endpoints Full documentation with request/response examples: Wiki →
Developer pushes code
↓
GitHub Actions triggers (ci.yml)
↓
Ubuntu VM spins up
MySQL + Redis start as service containers
↓
Java 17 configured
Maven dependency cache restored
↓
mvn clean test (full test suite)
↓
Tests pass? → merge to main
↓
docker-build.yml triggers
↓
Tests run again (verify main branch)
↓
Multi-stage Docker image built
Tagged: latest, sha-{commit}, main
↓
Image pushed to Docker Hub
Prometheus scrapes /actuator/prometheus every 15 seconds.
Grafana Dashboard (auto-provisioned) shows:
- HTTP Request Rate (requests/sec)
- HTTP Error Rate (5xx responses/sec)
- P95 Response Time (95th percentile latency)
- JVM Heap Memory Usage
- HikariCP Active Database Connections
- Request distribution by endpoint and status
| Decision | Choice | Why |
|---|---|---|
| Cache | Redis | Eliminates database hits on unchanged data |
| Search | Elasticsearch | Fuzzy matching impossible with SQL LIKE |
| Migrations | Flyway | Versioned, trackable schema changes — never ddl-auto=update |
| Messaging | Kafka | Decouples email delivery from API response time |
| Auth | Stateless JWT | Scales horizontally — no server-side sessions |
| Concurrency | Atomic SQL UPDATE | Thread-safe capacity checks without application locks |
| Mapping | MapStruct | Compile-time generation — zero runtime overhead |
| Images | Multi-stage Docker | 220MB final image vs 720MB with full JDK |
The test suite runs against real MySQL and Redis instances using GitHub Actions service containers. Elasticsearch indexing is bypassed during test phases to maximize build execution speed.
# Run the complete test suite
mvn clean test
# Run a single targeted test class
mvn test -Dtest=EventServiceTest
# Run tests and generate an absolute code coverage report
mvn test jacoco:reportContributions are welcome! Please follow these guidelines to maintain code quality and consistency.
git clone https://github.com/YOUR_USERNAME/event-manager.git
cd event-managergit checkout -b feature/your-feature-name- Follow the existing project structure.
- Write clean, maintainable code.
- Add unit tests for any new business logic.
- Use descriptive commit messages.
git add .
git commit -m "Add event waitlist notification feature"git push origin feature/your-feature-nameProvide a clear description of:
- What was changed
- Why it was changed
- Any architectural decisions involved
- Follow the Google Java Style Guide.
- Keep commits atomic and meaningful.
- Ensure all tests pass before submitting.
- Update documentation when introducing new features.
MIT License — Copyright (c) 2026 Shubham Kale
⭐ Star this repository if you found it helpful
Shubham Kale • Pune, India
