Skip to content

Partha-dev01/eventmanagement

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

50 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Image

EasyEvent - Modern Event Management System

License React Node.js MySQL Express

EasyEvent is a comprehensive event management platform built with React and Node.js, designed to streamline the process of creating, managing, and attending events.

Image

๐Ÿ“‹ Table of Contents

๐ŸŽฏ System Overview

EasyEvent supports three user roles:

  • Admin: Full system control and user management
  • Organizer: Event creation and management
  • Attendee: Event participation and enrollment

๐Ÿ› ๏ธ Technology Stack

Frontend

  • React.js 18+ with Vite
  • React Router v6
  • Axios for API calls
  • CSS Modules
  • Context API for state management
  • JWT for authentication

Backend

  • Node.js
  • Express.js
  • MySQL Database
  • JWT Authentication
  • Bcrypt for password hashing
  • Multer for file uploads

๐Ÿ—๏ธ Architecture

Frontend Structure

โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/     Reusable UI components
โ”‚   โ”œโ”€โ”€ contexts/       React context providers
โ”‚   โ”œโ”€โ”€ pages/          Page components
โ”‚   โ”œโ”€โ”€ services/       API service layers
โ”‚   โ”œโ”€โ”€ styles/         CSS and style modules
โ”‚   โ”œโ”€โ”€ utils/          Utility functions
โ”‚   โ””โ”€โ”€ assets/         Static files and images

Backend Structure

โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ config/        Configuration files
โ”‚   โ”œโ”€โ”€ controllers/   Request handlers
โ”‚   โ”œโ”€โ”€ middleware/    Custom middleware
โ”‚   โ”œโ”€โ”€ routes/        API routes
โ”‚   โ”œโ”€โ”€ services/      Business logic
โ”‚   โ””โ”€โ”€ utils/         Utility functions

๐Ÿš€ Installation and Setup

Prerequisites

  • Node.js (v14+)
  • MySQL (v8.0+)
  • npm or yarn
  • git

Step 1: Clone the Repository

git clone https://github.com/devops-dtc/eventmanagement.git
cd eventmanagement

Step 2: Frontend Setup

cd frontend
npm install

Create aย .envย file in the frontend directory:

VITE_API_URL=http://localhost:3000/api

Step 3: Backend Setup

cd backend
npm install

Create aย .envย file in the backend directory:

# Server Configuration
PORT=3000
NODE_ENV=development
FRONTEND_URL=http://localhost:5173

# Database Configuration
DB_HOST=localhost
DB_USER=your_username
DB_PASSWORD=your_password
DB_NAME=easyevent_db
DB_PORT=3306

# JWT Configuration
JWT_SECRET=your_jwt_secret_key
JWT_EXPIRES_IN=24h

Step 4: Database Setup

CREATE DATABASE easyevent_db;

Run the sql queries to create a the Database Schema from backend/src/database/DatabaseSetup.sql

Note

To Populate the Database with Mock Data run the Query file in backend/src/database/MockData.sql

Step 5: Start the Application

Frontend:

cd frontend
npm run dev

Backend:

cd backend
npm run dev

๐ŸŽฎ Key Features

1. Authentication System

  • Secure JWT-based authentication
  • Role-based access control
  • Password hashing with bcrypt
  • Session management

2. Event Management

  • Create, read, update, and delete events
  • Event categorization
  • Image upload functionality
  • Event status tracking
  • Search and filtering

3. User Management

  • User registration and login
  • Profile management
  • Role assignment
  • Account suspension system

4. Enrollment System

  • Event registration
  • Attendance tracking
  • Capacity management
  • Waitlist functionality

๐Ÿ“ก API Documentation

Authentication Endpoints

POST /api/auth/register     # Register new user
POST /api/auth/login        # User login
POST /api/auth/logout       # User logout
GET  /api/auth/profile     # Get user profile
PUT  /api/auth/profile     # Update user profile

Event Endpoints

GET    /api/events              # Get all events
POST   /api/events              # Create new event
GET    /api/events/:id          # Get specific event
PUT    /api/events/:id          # Update event
DELETE /api/events/:id          # Delete event
GET    /api/events/featured     # Get featured events
GET    /api/events/categories   # Get event categories

Enrollment Endpoints

POST   /api/enrollments/:eventId    # Enroll in event
GET    /api/enrollments/my          # Get user enrollments
DELETE /api/enrollments/:id         # Cancel enrollment
PUT    /api/enrollments/:id/status  # Update enrollment status

Admin Endpoints

GET    /api/admin/users        # Get all users
PUT    /api/admin/users/:id    # Update user
DELETE /api/admin/users/:id    # Delete user

๐Ÿ”’ Security Features

1. Authentication & Authorization

  • JWT-based authentication
  • Role-based access control (RBAC)
  • Password hashing using bcrypt
  • Token refresh mechanism

2. Data Protection

  • Input validation and sanitization
  • XSS protection
  • CSRF protection
  • SQL injection prevention

3. API Security

  • Rate limiting
  • CORS configuration
  • Secure headers
  • Request validation

๐Ÿšฆ Error Handling

Frontend

  • Toast notifications for user feedback
  • Error boundary implementation
  • Form validation feedback
  • Loading states

Backend

  • Standardized error responses
  • Error logging
  • Custom error classes
  • Validation middleware

๐Ÿ“Š Performance Optimization

Frontend

  • Code splitting
  • Lazy loading
  • Image optimization
  • Caching strategies
  • Memoization

Backend

  • Database indexing
  • Query optimization
  • Connection pooling
  • Response caching
  • Compression

๐Ÿงช Testing (Not Updated Yet)

Frontend Testing

cd frontend
npm run test        # Run unit tests
npm run test:e2e    # Run E2E tests

Backend Testing

cd backend
npm run test        # Run unit tests
npm run test:integration  # Run integration tests

๐Ÿ“ฆ Deployment (Not Updated Yet)

Frontend Deployment

  • Build the production version:
cd frontend
npm run build

Backend Deployment

  • Prepare for production:
cd backend
npm run build

Environment Considerations

  • Set up proper environment variables
  • Configure database connections
  • Set up SSL certificates
  • Configure server security

๐Ÿค Contributing

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

๐Ÿ“ž Support

๐Ÿ“„ License

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


Made with โค๏ธ by the EasyEvent Team

Live Demoย |ย Report Bug

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 79.6%
  • CSS 20.1%
  • HTML 0.3%