Skip to content

gajanansr/event.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

221 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ‰ Event Management & Resource Allocation Platform

Version Spring Boot Angular MySQL

A full-stack platform for event planning, resource allocation, staff management, and client collaboration

Quick Start β€’ Features β€’ API Docs β€’ Architecture


πŸ“‹ Overview

A comprehensive event management solution with role-based access control, real-time messaging, resource allocation, and booking management.

###Users

  • πŸ‘¨β€πŸ’Ό Event Planners: Create events, manage resources, assign staff, handle bookings
  • πŸ‘· Staff Members: View assigned events, update status, communicate with planners
  • πŸ‘₯ Clients: Book events, track bookings, communicate with planners

✨ Key Features

πŸ” JWT Authentication β€’ πŸ‘€ Role-Based Access β€’ πŸ“… Event CRUD β€’ πŸ“¦ Resource Management
🎯 Resource Allocation β€’ πŸ“ Booking System β€’ πŸ’¬ Real-time Messaging β€’ πŸ“Š Dashboards
🎨 Material Design β€’ πŸ“± Responsive UI β€’ πŸ”’ BCrypt Security β€’ ⚑ RESTful APIs


πŸ› οΈ Technology Stack

Backend

  • Spring Boot 2.7.17 - Application framework
  • Spring Security - Authentication & authorization
  • JPA/Hibernate - ORM
  • MySQL 8.0 - Database
  • JWT - Token-based auth
  • Maven - Build tool

Frontend

  • Angular 13+ - Frontend framework
  • TypeScript - Language
  • RxJS - Reactive programming
  • Bootstrap 5 - UI framework
  • Material Design - Design system

πŸš€ Quick Start

Prerequisites

Java 11+, Node.js 14+, MySQL 8.0+, Maven 3.8+

Backend Setup

# Clone repository
git clone https://github.com/gajanansr/EventManagement.git
cd EventManagement/server

# Configure MySQL (create database 'event_management')
# Update server/src/main/resources/application.properties with your credentials

# Build and run
mvn clean install
mvn spring-boot:run

Backend runs on http://localhost:8080

Frontend Setup

cd client
npm install
npm start

Frontend runs on http://localhost:4200


πŸ—„οΈ Database Schema

users (userId, username, password, email, role, phoneNumber, fullName, address)
  └── 1:N ──► events (eventID, title, description, dateTime, location, status, assignedStaffId)
                 └── 1:N ──► allocations (allocationID, eventID, resourceID, quantity)
                                └── N:1 ──► resources (resourceID, name, type, availability)

users (CLIENT) ──► bookings (bookingId, clientId, eventId, requirements, notes, status)
users/events ──► messages (messageId, eventId, senderId, content, timestamp, senderRole)

πŸ“‘ API Quick Reference

Authentication

POST /api/user/register     # Register new user
POST /api/user/login         # Login and get JWT token

Event Planner APIs

POST   /api/planner/event                    # Create event
GET    /api/planner/events                   # Get all events
GET    /api/planner/event-details/{id}       # Get event details
DELETE /api/planner/event/{id}               # Delete event
POST   /api/planner/resource                 # Add resource
GET    /api/planner/resources                # Get all resources
POST   /api/planner/allocate-resources       # Allocate resource to event
GET    /api/planner/staff                    # Get all staff
POST   /api/planner/assign-staff             # Assign staff to event
POST   /api/planner/send-message             # Send message
GET    /api/planner/messages/{eventId}       # Get event messages
GET    /api/planner/bookings                 # Get all bookings
PUT    /api/planner/booking/{id}/status      # Update booking status

Staff APIs

GET  /api/staff/allEvents               # Get assigned events only
GET  /api/staff/event-details/{id}      # Get event details
PUT  /api/staff/update-setup/{id}       # Update event status
POST /api/staff/send-message            # Send message
GET  /api/staff/messages/{eventId}      # Get event messages

Client APIs

POST /api/client/create-booking              # Create booking
GET  /api/client/my-bookings                 # Get my bookings
GET  /api/client/my-booking/{id}             # Get booking by ID
GET  /api/client/allEvents                   # Get all events
POST /api/client/send-message                # Send message
GET  /api/client/messages/{eventId}          # Get event messages

Profile APIs

GET /api/profile      # Get user profile
PUT /api/profile      # Update profile

Authorization: All protected endpoints require Authorization: Bearer <jwt_token> header


πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Angular Frontend (Client Layer)                            β”‚
β”‚  Components β†’ Services β†’ HTTP Requests + JWT                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚ REST API (JSON)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Spring Boot Backend (Server Layer)                         β”‚
β”‚  Security Filter β†’ Controllers β†’ Services β†’ Repositories    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚ JPA/Hibernate
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  MySQL Database (Data Layer)                                β”‚
β”‚  Tables: users, events, resources, allocations, bookings... β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ”’ Security

  • βœ… JWT-based authentication with 24-hour expiration
  • βœ… BCrypt password hashing (10 rounds)
  • βœ… Role-based access control (RBAC)
  • βœ… CORS configuration
  • βœ… SQL injection protection (JPA parameterized queries)
  • βœ… Password validation (8-20 chars, uppercase, lowercase, number, special char)

πŸ“– Usage Examples

1. Register & Login

# Register
curl -X POST http://localhost:8080/api/user/register \
  -H "Content-Type: application/json" \
  -d '{"username":"john","email":"john@test.com","password":"Test@123","role":"CLIENT"}'

# Login
curl -X POST http://localhost:8080/api/user/login \
  -H "Content-Type: application/json" \
  -d '{"username":"john","password":"Test@123"}'

2. Create Event (Planner)

curl -X POST http://localhost:8080/api/planner/event \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title":"Tech Conference",
    "description":"Annual tech event",
    "dateTime":"2025-12-15T10:00:00",
    "location":"Convention Center",
    "status":"Active"
  }'

3. Create Booking (Client)

curl -X POST http://localhost:8080/api/client/create-booking \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "eventId":1,
    "requirements":"Wheelchair access needed",
    "notes":"VIP table requested"
  }'

πŸ“ Project Structure

EventManagement/
β”œβ”€β”€ server/                          # Spring Boot Backend
β”‚   β”œβ”€β”€ src/main/java/.../
β”‚   β”‚   β”œβ”€β”€ config/                  # Security & configurations
β”‚   β”‚   β”œβ”€β”€ controller/              # REST controllers
β”‚   β”‚   β”œβ”€β”€ dto/                     # Data transfer objects
β”‚   β”‚   β”œβ”€β”€ entity/                  # JPA entities
β”‚   β”‚   β”œβ”€β”€ jwt/                     # JWT utilities
β”‚   β”‚   β”œβ”€β”€ repository/              # JPA repositories
β”‚   β”‚   └── service/                 # Business logic
β”‚   β”œβ”€β”€ src/main/resources/
β”‚   β”‚   └── application.properties   # App configuration
β”‚   └── pom.xml                      # Maven dependencies
β”‚
β”œβ”€β”€ client/                          # Angular Frontend
β”‚   β”œβ”€β”€ src/app/
β”‚   β”‚   β”œβ”€β”€ login/                   # Login component
β”‚   β”‚   β”œβ”€β”€ registration/            # Registration component
β”‚   β”‚   β”œβ”€β”€ dashbaord/               # Dashboard (role-specific)
β”‚   β”‚   β”œβ”€β”€ create-event/            # Event creation
β”‚   β”‚   β”œβ”€β”€ view-events/             # Event listing & messaging
β”‚   β”‚   β”œβ”€β”€ add-resource/            # Resource management
β”‚   β”‚   β”œβ”€β”€ resource-allocate/       # Resource allocation
β”‚   β”‚   β”œβ”€β”€ booking-details/         # Client bookings
β”‚   β”‚   └── app-routing.module.ts    # Routes
β”‚   β”œβ”€β”€ src/services/
β”‚   β”‚   β”œβ”€β”€ auth.service.ts          # Authentication service
β”‚   β”‚   └── http.service.ts          # HTTP API service
β”‚   β”œβ”€β”€ src/styles.scss              # Global styles
β”‚   └── package.json                 # npm dependencies
β”‚
β”œβ”€β”€ README.md                        # Project documentation
└── .gitignore

πŸ› Troubleshooting

MySQL Connection Error

# Check MySQL is running
sudo systemctl status mysql
# Verify credentials in application.properties

Port 8080 Already in Use

# Change port in application.properties
server.port=8081

CORS Error

# Verify SecurityConfig.java allows your frontend origin
# Check environment.ts has correct backend URL

JWT Token Expired

# Re-login to get new token (tokens expire after 24 hours)
# Adjust jwt.expiration in application.properties if needed

🀝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open Pull Request

πŸ“§ Contact


πŸ“„ License

MIT License - see LICENSE file for details


Built with ❀️ using Spring Boot & Angular

⭐ Star this repo if you find it helpful!

Back to Top

About

Full-stack event management system with modules for events, resources, staff, availability, and messaging. Built with scalable REST APIs, optimized SQL, and secure JWT-based auth.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors