Skip to content

Shashwati12/Event-Hub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Event Hub

A modern, full-stack event management platform for seamless event discovery, registration, and hosting

React Node.js MongoDB Tailwind CSS Vite


πŸ“‹ Table of Contents


🌟 Overview

Event Hub is a comprehensive event management platform designed for colleges and organizations to streamline event hosting and participation. The platform provides a dual-interface system catering to both event hosts (organizers/admins) and regular users (participants), offering role-based dashboards with tailored features for each user type.

Built with the MERN stack (MongoDB, Express.js, React, Node.js) and styled with Tailwind CSS, Event Hub offers a modern, responsive, and intuitive user experience.


✨ Features

πŸ‘₯ User Features

  • πŸ” Secure Authentication - JWT-based authentication with protected routes
  • πŸ“… Event Discovery - Browse and search through all available events
  • 🎫 Event Registration - Quick and easy event registration process
  • πŸ“± Personal Dashboard - View registered events and manage participation
  • πŸ” Advanced Search - Filter events by categories, date, and location
  • πŸŒ“ Dark Mode Support - Toggle between light and dark themes
  • πŸ“§ Notifications - Stay updated on event changes and reminders

🎯 Host/Admin Features

  • ✏️ Event Creation - Create events with rich details, images, and categories
  • πŸ–ΌοΈ Image Upload - Upload event banners and promotional images
  • πŸ“Š Event Management - Full CRUD operations on hosted events
  • πŸ‘€ Participant Tracking - View registered participants for events
  • πŸ“ˆ Dashboard Analytics - Overview of hosted events and registrations
  • βœ… Real-time Updates - Instant updates on event registrations

🎨 General Features

  • πŸ“± Responsive Design - Works seamlessly across all devices
  • πŸ”„ API Interceptors - Centralized request handling with automatic token injection
  • 🎨 Modern UI/UX - Beautiful interface with Framer Motion animations
  • πŸ”’ Protected Routes - Role-based access control
  • 🌐 RESTful API - Well-structured backend API
  • ⚑ Fast Performance - Optimized with Vite for lightning-fast development

πŸ› οΈ Tech Stack

Frontend

Technology Version Purpose
React 19.0.0 UI framework
Vite 6.2.0 Build tool and dev server
Tailwind CSS 4.1.3 Utility-first CSS framework
React Router 7.5.0 Client-side routing
Axios 1.8.4 HTTP client with interceptors
Framer Motion 12.6.3 Animation library
Zustand 5.0.3 State management
Radix UI - Headless UI components
Lucide React 0.487.0 Icon library

Backend

Technology Version Purpose
Node.js - JavaScript runtime
Express.js 5.1.0 Web framework
MongoDB - NoSQL database
Mongoose 8.13.2 MongoDB ODM
JWT 9.0.2 Authentication tokens
bcryptjs 3.0.2 Password hashing
Multer 1.4.5 File upload handling
CORS 2.8.5 Cross-origin resource sharing

πŸ“ Project Structure

Event-Hub/
β”œβ”€β”€ event-registration-backend/
β”‚   β”œβ”€β”€ config/           # Database and configuration files
β”‚   β”œβ”€β”€ controllers/      # Request handlers (auth, events, registrations)
β”‚   β”œβ”€β”€ middleware/       # Authentication middleware
β”‚   β”œβ”€β”€ models/          # Mongoose schemas (User, Event, Registration)
β”‚   β”œβ”€β”€ routes/          # API route definitions
β”‚   β”œβ”€β”€ uploads/         # Uploaded event images
β”‚   β”œβ”€β”€ utils/           # Utility functions
β”‚   β”œβ”€β”€ server.js        # Main server file
β”‚   β”œβ”€β”€ .env.example     # Environment variables template
β”‚   └── package.json     # Backend dependencies
β”‚
└── event-registration-frontend/
    β”œβ”€β”€ public/          # Static assets
    β”œβ”€β”€ src/
    β”‚   β”œβ”€β”€ api/         # Axios instance and API configuration
    β”‚   β”œβ”€β”€ components/  # Reusable React components
    β”‚   β”‚   β”œβ”€β”€ ui/      # UI components (buttons, cards, dialogs)
    β”‚   β”‚   β”œβ”€β”€ Navbar.jsx
    β”‚   β”‚   β”œβ”€β”€ Footer.jsx
    β”‚   β”‚   β”œβ”€β”€ EventCard.jsx
    β”‚   β”‚   └── ...
    β”‚   β”œβ”€β”€ context/     # React context providers
    β”‚   β”œβ”€β”€ pages/       # Page components
    β”‚   β”‚   β”œβ”€β”€ admin/   # Admin/Host dashboard pages
    β”‚   β”‚   β”œβ”€β”€ user/    # User dashboard pages
    β”‚   β”‚   β”œβ”€β”€ Home.jsx
    β”‚   β”‚   β”œβ”€β”€ Login.jsx
    β”‚   β”‚   └── ...
    β”‚   β”œβ”€β”€ utils/       # Utility functions
    β”‚   β”œβ”€β”€ App.jsx      # Main app component with routing
    β”‚   └── main.jsx     # Application entry point
    β”œβ”€β”€ .env.example     # Environment variables template
    β”œβ”€β”€ vite.config.js   # Vite configuration
    β”œβ”€β”€ tailwind.config.js # Tailwind CSS configuration
    └── package.json     # Frontend dependencies

πŸš€ Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

Installation

  1. Clone the repository
git clone https://github.com/Sherin-2711/Event-Hub.git
cd Event-Hub
  1. Install backend dependencies
cd event-registration-backend
npm install
  1. Install frontend dependencies
cd ../event-registration-frontend
npm install

Environment Variables

Backend (event-registration-backend/.env)

Create a .env file in the event-registration-backend directory:

PORT=5000
MONGO_URI=mongodb://localhost:27017/eventhub
# Or use MongoDB Atlas:
# MONGO_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/eventhub

JWT_SECRET=your_super_secret_jwt_key_here_change_this_in_production

πŸ’‘ Tip: Use .env.example as a template

Frontend (event-registration-frontend/.env)

Create a .env file in the event-registration-frontend directory:

VITE_API_URL=http://localhost:5000

Running the Application

Option 1: Run Backend and Frontend Separately

Terminal 1 - Start Backend Server:

cd event-registration-backend
npm run dev
# Server will run on http://localhost:5000

Terminal 2 - Start Frontend Dev Server:

cd event-registration-frontend
npm run dev
# Frontend will run on http://localhost:5173

Option 2: Production Build

Backend (Production):

cd event-registration-backend
npm start

Frontend (Build):

cd event-registration-frontend
npm run build
npm run preview

πŸ—οΈ Architecture

Frontend Architecture

  • Component-based architecture with React
  • API interceptors for centralized token management
  • Protected routes using custom ProtectedRoute component
  • State management with Zustand
  • Responsive design using Tailwind CSS and mobile-first approach

Backend Architecture

  • MVC pattern with controllers, models, and routes
  • JWT-based authentication middleware
  • RESTful API design with proper HTTP methods
  • File upload handling with Multer
  • MongoDB database with Mongoose ODM

Security Features

  • πŸ”’ Password hashing with bcrypt (10 salt rounds)
  • 🎫 JWT token-based authentication
  • πŸ›‘οΈ Protected API routes with auth middleware
  • πŸ” CORS configuration for secure cross-origin requests
  • βœ… Input validation and sanitization

🀝 Contributing

Contributions are welcome! Please follow these steps:

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

Development Guidelines

  • Follow the existing code style
  • Write meaningful commit messages
  • Add comments for complex logic
  • Test your changes before submitting PR
  • Update documentation if needed

πŸ™ Acknowledgments

  • React community for excellent documentation
  • MongoDB team for the powerful database
  • Tailwind CSS for the amazing utility-first framework
  • All contributors who help improve this project

⭐ Star this repository if you find it helpful!

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors