Skip to content

Debadatta-jena/Event-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

College Event Management System

A full-stack web-based application for managing college events with separate interfaces for administrators and students.

Technologies Used

  • Frontend: HTML, CSS, JavaScript, Bootstrap 5
  • Backend: Node.js with Express.js
  • Database: MySQL (connected using mysql2)
  • Authentication: JWT-based login system
  • Password Security: bcrypt for password hashing
  • Environment Configuration: .env file for database credentials and secret keys

Features

Admin Module

  • Admin login/logout using JWT
  • Add, edit, delete, and view events
  • View all registered students per event
  • Dashboard with:
    • Total events
    • Total students
    • Total registrations
    • Upcoming events

Student Module

  • Student registration and login
  • View upcoming and past events
  • Register for events
  • View "My Registered Events" list

Public Pages

  • Homepage showing all upcoming events
  • About Us and Contact Us pages

Database Schema

The application uses a MySQL database named college_event_db with the following tables:

  1. admins - Admin login information
  2. students - Student registration information
  3. events - Event details (name, date, venue, description)
  4. registrations - Mapping of students to events

Project Structure

college-event-management-system/
│
├── backend/
│   ├── config/
│   ├── controllers/
│   ├── middleware/
│   ├── routes/
│   └── utils/
│
├── frontend/
│   ├── assets/
│   ├── css/
│   ├── js/
│   └── *.html
│
├── .env
├── package.json
├── server.js
└── database_schema.sql

Setup Instructions

  1. Clone the repository

    git clone <repository-url>
    cd college-event-management-system
    
  2. Install dependencies

    npm install
    
  3. Set up the database

    • Create a MySQL database named college_event_db
    • Update the .env file with your database credentials
    • Run the SQL commands in database_schema.sql to create the tables
  4. Configure environment variables Update the .env file with your database credentials and JWT secret:

    # Server Configuration
    PORT=3000
    
    # Database Configuration
    DB_HOST=localhost
    DB_USER=your_username
    DB_PASSWORD=your_password
    DB_NAME=college_event_db
    
    # JWT Configuration
    JWT_SECRET=your_jwt_secret_key
    JWT_EXPIRES_IN=24h
    
  5. Start the server

    npm start
    
  6. Access the application Open your browser and navigate to http://localhost:3000

API Endpoints

Admin Routes

  • POST /api/admin/login - Admin login
  • POST /api/admin/create - Create admin (for initial setup)
  • GET /api/admin/dashboard - Get admin dashboard data
  • GET /api/admin/events - Get all events
  • POST /api/admin/events - Create event
  • PUT /api/admin/events/:id - Update event
  • DELETE /api/admin/events/:id - Delete event
  • GET /api/admin/events/:id/registrations - Get registered students for an event

Student Routes

  • POST /api/student/register - Student registration
  • POST /api/student/login - Student login
  • GET /api/student/profile - Get student profile
  • PUT /api/student/profile - Update student profile
  • GET /api/student/events/upcoming - Get upcoming events
  • GET /api/student/events/past - Get past events
  • POST /api/student/events/register - Register for an event
  • GET /api/student/events/registered - Get student's registered events
  • POST /api/student/events/cancel - Cancel event registration

Public Routes

  • GET /api/public/events/upcoming - Get all upcoming events
  • GET /api/public/events/:id - Get event by ID

Security Features

  • JWT for secure authentication
  • Input validation on both client and server
  • Prepared statements to prevent SQL injection
  • Password hashing with bcrypt before storing in the database

Development

To run the application in development mode with auto-restart:

npm run dev

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published