MJEvents is a web application designed to streamline event management within a college campus. It provides a centralized platform for students and faculty to discover, register for, and manage college events. The application is built with Node.js, Express, and MongoDB, featuring user authentication, event creation, and a searchable event directory.
- Event Directory: Browse a comprehensive list of all upcoming and past college events.
- Event Details: View detailed information for each event, including date, time, location, organizer, and a full description.
- User Authentication: Secure sign-up and login system restricted to college members with an official email domain (
@mjcollege.ac.in). - Event Creation: Authenticated users can add new events to the directory.
- Event Registration: Seamlessly register for events via a direct link to a registration form (e.g., Google Forms).
- Search Functionality: Quickly find events by searching for keywords in the event name or organizer.
- Authorization: Users can only delete events they have organized.
- Dark Mode: A user-friendly toggle for a comfortable viewing experience in low-light conditions.
- Backend: Node.js, Express.js
- Database: MongoDB with Mongoose
- Templating Engine: EJS (Embedded JavaScript) with
ejs-matefor layouts. - Authentication: Passport.js with
passport-localandpassport-local-mongoose. - Middleware:
express-session,method-override,multer.
To run this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/your-username/MJEvents.git cd MJEvents -
Install dependencies:
npm install
-
Set up your environment:
- Make sure you have MongoDB installed and running.
- The application connects to
mongodb://127.0.0.1:27017/Project1by default. You can change this inapp.js.
-
Start the server:
node app.js
The application will be running at
http://localhost:3000.
- Home Page: Visit
http://localhost:3000to see the list of all events. - Sign Up: Create a new account using an email ending in
@mjcollege.ac.in. - Login: Log in to your account to access features like adding events.
- Add an Event: Navigate to the "Add Event" page to create a new event listing.
- Search: Use the search bar to find specific events.
- Toggle Dark Mode: Click the dark mode toggle to switch between light and dark themes.
| Method | Path | Description |
|---|---|---|
| GET | / |
Display all events. |
| GET | /search |
Search for events. |
| GET | /events/add |
Display the form to add a new event. |
| POST | /events/add |
Create a new event. |
| GET | /details/:id |
Display details for a specific event. |
| DELETE | /details/:id |
Delete a specific event. |
| POST | /register/:id |
Redirect to the event's registration link. |
| GET | /users/login |
Display the login page. |
| POST | /login |
Authenticate and log in a user. |
| GET | /users/signup |
Display the signup page. |
| POST | /signup |
Register a new user. |
| GET | /toggle-dark-mode |
Toggle the dark mode session setting. |
Contributions are welcome! If you have suggestions for improvements, please feel free to fork the repository and submit a pull request.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request