EventManagementSystem is a campus event management application with role-based authentication and dashboards for students, club organizers, and admins.
- Backend: Node.js, Express, MongoDB, JWT authentication, and role-aware signup support
- Frontend: React, Vite, Axios, Tailwind CSS, and reusable notification alerts
- Auth flows for signup and login with JWT token storage
- Role-based dashboard redirect after login
- Student, Club, and Admin accounts
- Secure password hashing with bcrypt
- JWT token generation for authentication
- Club signup and admin code validation
- Form validation, user-friendly alerts, and role-aware redirects
- Backend: Node.js, Express, MongoDB, Mongoose, dotenv, cors
- Frontend: React, Vite, React Router, Axios, Tailwind CSS
- Open a terminal and navigate to the backend folder:
cd backend- Install dependencies:
npm install- Copy the example environment file and update it:
copy .env.example .env- Edit
.envand set the values for:
MONGO_URIJWT_SECRETADMIN_CODEFRONTEND_URL
- Start the backend server:
npm run dev- Open a separate terminal and navigate to the frontend folder:
cd frontend- Install dependencies:
npm install- (Optional) Create a
.envfile for a custom API URL:
VITE_API_URL=http://localhost:5000- Start the frontend server:
npm run devnpm run dev— start the backend with nodemonnpm start— start the backend with Node
npm run dev— start the Vite development servernpm run build— build the frontend for productionnpm run lint— run ESLint checksnpm run preview— preview the built app
POST /api/auth/signup— create a new user accountPOST /api/auth/login— authenticate an existing user
- The backend now runs as an ES module using
type: "module". - The frontend uses
import.meta.env.VITE_API_URLfor API endpoint configuration. - Use the role selector on signup to create student, club, or admin accounts.