Skip to content

Crevmick/Event_Management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ‰ Event Management Backend System

A scalable and secure RESTful API for managing events, users, categories, and event registrations. Built with Node.js, Express.js, and MongoDB, with user authentication, OTP verification, and Google OAuth support.


πŸš€ Tech Stack

Technology Purpose
Node.js JavaScript runtime
Express.js Web framework
MongoDB NoSQL database
Mongoose MongoDB object modeling
JWT User authentication
bcryptjs Password hashing
Passport.js Google OAuth login

πŸ” Authentication Features

  • User signup & login with email/password
  • Email verification via OTP
  • Password reset with OTP
  • Google OAuth login
  • JWT-based route protection

πŸ“ API Endpoints Overview

πŸ”‘ Auth Routes

Method Endpoint Description
POST /api/auth/signup Register new user
POST /api/auth/signup/verifyOTP Verify user via OTP
POST /api/auth/signup/resendOTPVerificationCode Resend OTP
POST /api/auth/signup/forget_password Request password reset OTP
POST /api/auth/login Login with email/password
GET /api/auth/google Google OAuth login
GET /api/auth/google/callback OAuth callback
GET /api/auth/logout Logout

🧩 Category Routes

Method Endpoint Description
POST /api/category/category Create new category
GET /api/category/categories Fetch all categories
GET /api/category/categories/:id Get single category
PUT /api/category/categories/:id Update category
DELETE /api/category/categories/:id Delete category

πŸ“… Event Routes

Method Endpoint Description
POST /api/event/ Create event
GET /api/event/ List all events
GET /api/event/:id Get event by ID
PUT /api/event/:id Update event
DELETE /api/event/:id Delete event

πŸ“ Event Registration Routes

Method Endpoint Description
POST /api/registerEvent/register Register for an event
GET /api/registerEvent/:eventId/registrations View all registrations for an event

πŸ” Middleware

  • authenticateUser: Protects private routes using JWT.
  • Passport.js for handling Google OAuth2 login.

πŸ“¦ Folder Structure

src/
β”œβ”€β”€ config/             # DB connection, passport strategies
β”œβ”€β”€ controller/         # Business logic for routes
β”œβ”€β”€ middleware/         # JWT auth, request validation, error handlers
β”œβ”€β”€ model/              # Mongoose schemas and models
β”œβ”€β”€ route/              # All route handlers
β”‚   β”œβ”€β”€ auth/           # Auth routes (signup, login, Google)
β”‚   β”œβ”€β”€ category/       # Category CRUD routes
β”‚   β”œβ”€β”€ event/          # Event CRUD routes
β”‚   └── registerEvent/  # Event registration routes
β”œβ”€β”€ util/               # Helper functions (e.g., OTP generator)
β”œβ”€β”€ app.js              # Main Express app
└── server.js           # Server startup

πŸ‘¨β€πŸ’» Created By

Crevmick
GitHub: @crevmick


🌐 Live Demo

Check out the live version of this project:
πŸ‘‰ Event Management App

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published