Skip to content

Latest commit

Β 

History

120 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Event Management System

License: MIT Spring Boot React Java TypeScript Docker

A microservices-based event management platform built with Spring Boot, React, and Vite.


Application Preview



πŸ§‘β€πŸ’Ό Organizer Dashboard






🎟️ Attendee Dashboard

🎯 Overview

EventFlow is a comprehensive event management system featuring microservices architecture, JWT authentication, role-based access control, and a modern React frontend. The platform supports event organizers and attendees with complete event lifecycle management.

Key Highlights:

  • βœ… Fully implemented JWT authentication & authorization
  • βœ… 8 microservices with service discovery
  • βœ… Role-based access (Admin, Organizer, Attendee)
  • βœ… Real-time analytics and dashboard
  • βœ… Complete booking and ticketing system
  • βœ… User profile management with preferences
  • βœ… Docker-ready production deployment

πŸš€ Quick Start

Using Docker (Recommended)

git clone https://github.com/HasithFernando/event-management-system.git
cd event-management-system
docker-compose up --build

Access the application:

Local Development

See DEPLOYMENT.md for detailed local setup instructions.


πŸ—οΈ Architecture

Frontend (React/Vite) β†’ API Gateway (JWT Auth) β†’ Microservices β†’ H2 Databases
                              ↓
                       Eureka Discovery

Microservices

Service Port Description
Frontend 3000 React + Vite application
API Gateway 8080 JWT authentication & routing
Eureka Server 8761 Service discovery
Config Server 8888 Centralized configuration
Auth Service 8082 User authentication & JWT
Event Service 8081 Event management
Payment Service 8083 PayHere payment integration
Ticket Service 8084 Ticket operations
Notification Service 8085 Event notifications
Analytics Service 8086 Analytics & reporting
Admin Service 8087 Admin operations
Profile Service 8088 User profile management

Technology Stack

Backend:

  • Spring Boot 3.2.5, Java 17
  • Spring Cloud (Gateway, Eureka, Config)
  • JWT authentication (JJWT)
  • H2 in-memory databases
  • OpenFeign for inter-service communication

Frontend:

  • React 18 with Vite
  • TypeScript
  • Tailwind CSS
  • React Router
  • Recharts for analytics

DevOps:

  • Docker & Docker Compose
  • Multi-stage Docker builds
  • Nginx for frontend serving

✨ Features

Authentication & Security

  • βœ… JWT-based authentication
  • βœ… Bcrypt password hashing
  • βœ… Role-based access control (Admin, Organizer, Attendee)
  • βœ… API Gateway security filtering
  • βœ… Protected routes and endpoints

User Roles

Admin:

  • Dashboard with system-wide analytics
  • User management (view, delete, ban/unban)
  • Event management (all events)
  • Access to all features

Organizer:

  • Create and manage events
  • View attendee lists
  • Track ticket sales
  • Event analytics

Attendee:

  • Browse and search events
  • Purchase tickets
  • View booking history
  • Event notifications

Core Features

  • πŸ“… Event creation and management
  • 🎫 Ticket purchasing and management
  • πŸ‘₯ Attendee registration and tracking
  • πŸ“Š Analytics dashboard with charts
  • πŸ” Event search and filtering
  • πŸ“§ Notification system
  • πŸ’³ Booking and payment tracking

πŸ“š API Endpoints

All endpoints accessible through API Gateway at http://localhost:8080

Authentication (/api/auth)

POST   /api/auth/register    # User registration
POST   /api/auth/login       # User login (returns JWT)

Events (/api/events)

GET    /api/events           # List all events
POST   /api/events           # Create event (Organizer/Admin)
GET    /api/events/{id}      # Get event details
PUT    /api/events/{id}      # Update event (Organizer/Admin)
DELETE /api/events/{id}      # Delete event (Admin)

Attendees (/api/attendees)

GET    /api/attendees             # List attendees
POST   /api/attendees             # Register attendee
GET    /api/attendees/{id}        # Get attendee details
PUT    /api/attendees/{id}/status # Update status

Tickets (/api/tickets)

GET    /api/tickets          # List tickets
POST   /api/tickets          # Purchase ticket
GET    /api/tickets/{id}     # Get ticket details

Analytics (/api/analytics)

GET    /api/analytics/overview  # System overview
GET    /api/analytics/revenue   # Revenue data

Admin (/api/admin)

GET    /api/admin/dashboard/stats    # Dashboard statistics
GET    /api/admin/events             # All events
GET    /api/admin/users              # All users
DELETE /api/admin/users/{id}         # Delete user

Security: All endpoints (except /api/auth/*) require valid JWT token in Authorization header.


πŸ”§ Configuration

Frontend Environment

Create frontend/.env.local:

VITE_API_URL=http://localhost:8080

Backend JWT Configuration

JWT secret configured in backend/auth-service/src/main/resources/application.yml:

jwt:
  secret: <base64-encoded-secret>
  expiration: 86400000  # 24 hours

Note: Same JWT secret must be configured in backend/api-gateway/src/main/resources/application.yml.


πŸ“ Project Structure

event-management-system/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ api-gateway/           # JWT authentication & routing
β”‚   β”œβ”€β”€ eureka-server/         # Service discovery
β”‚   β”œβ”€β”€ config-server/         # Configuration server
β”‚   β”œβ”€β”€ auth-service/          # Authentication & user management
β”‚   β”œβ”€β”€ event-service/         # Event CRUD operations
β”‚   β”œβ”€β”€ attendee-service/      # Attendee management
β”‚   β”œβ”€β”€ ticket-service/        # Ticket operations
β”‚   β”œβ”€β”€ notification-service/  # Notifications
β”‚   β”œβ”€β”€ analytics-service/     # Analytics & reporting
β”‚   └── admin-service/         # Admin operations
β”œβ”€β”€ frontend/                  # React + Vite application
β”œβ”€β”€ config-repo/              # Shared configurations
β”œβ”€β”€ docker-compose.yml        # Docker orchestration
β”œβ”€β”€ DEPLOYMENT.md             # Deployment guide
└── README.md                 # This file

πŸ› οΈ Development

Build Commands

# Build all services
./build.sh  # Linux/Mac
build.bat   # Windows

# Build individual service
cd backend/auth-service
mvn clean package -DskipTests

# Build frontend
cd frontend
npm install
npm run build

Docker Commands

docker-compose up --build      # Build and start all services
docker-compose down            # Stop all services
docker-compose logs -f         # View logs
docker-compose ps              # List containers
docker-compose down -v         # Remove volumes

πŸ” Security Notes

βœ… Implemented:

  • JWT token-based authentication
  • Password hashing with BCrypt
  • API Gateway security filtering
  • Role-based access control
  • Protected routes

⚠️ Production Recommendations:

  • Change default admin password
  • Use environment variables for secrets
  • Enable HTTPS/TLS
  • Implement rate limiting
  • Add CORS configuration
  • Set up proper logging and monitoring
  • Use managed databases (not H2)

πŸ› Troubleshooting

Services not registering with Eureka:

JWT token errors:

  • Verify JWT secrets match in auth-service and api-gateway
  • Check token expiration time

Port conflicts:

  • Stop conflicting services or change ports in application.yml

Docker issues:

docker-compose down -v
docker system prune -f
docker-compose up --build

For detailed troubleshooting, see DEPLOYMENT.md.


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


🀝 Contributing

Contributions welcome! Please ensure:

  • Code follows existing patterns
  • JWT authentication is maintained
  • Role-based access is respected
  • Documentation is updated

πŸ“ž Support

For issues or questions:

  • Check service health: http://localhost:8080/actuator/health
  • View Eureka dashboard: http://localhost:8761
  • Check logs: docker-compose logs [service-name]

Version: 1.0.0 | Status: Production Ready | License: MIT

About

πŸš€ A full-stack Event Management System using Spring Boot microservices, Next.js, Docker, and an API Gateway β€” designed for scalability and clean service separation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages