Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
BarhateManthan authored Feb 18, 2024
1 parent 7748bbc commit bc8d9e1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,50 +36,50 @@

This project is an event management system built using Node.js, Express.js, and MongoDB. It facilitates user authentication, event creation, and management, and includes features such as user signup, login, event creation, updating, and deletion. The system is designed to handle a global list of all events created by any user, providing a centralized repository.

# User Authentication:
1. User Authentication:

The project includes user signup and login functionality.
When a user signs up, their information is stored in the MongoDB database after checking for existing usernames.
JWT is used to generate a token upon successful signup or login, which is sent back to the client for subsequent authenticated requests.

# User and Event Schemas:
2. User and Event Schemas:

User data is stored in MongoDB using a user schema, including fields such as username, password, city, phone, and arrays for joined and created events.
Event data is stored in MongoDB using an event schema, including details like name, date, location, description, and the user who created it.

# Event Management:
3. Event Management:

The system allows users to create new events by providing event details.
Created events are associated with the user who initiated them and stored in the database.
Events can be retrieved, updated, and deleted by the user who created them.

# All Events:
4. All Events:

There is a global list of all events stored in the AllEvents schema, associated with the user who created them. This allows for a centralized collection of all events created by any user.

# Authorization and Access Control:
5. Authorization and Access Control:

Routes are protected using middleware (authenticateJwt) to ensure that only authenticated users can access certain endpoints.
Authorization checks are implemented, ensuring that users can only perform actions on events they have created.

# Error Handling:
6. Error Handling:

The project includes error handling for various scenarios, such as database errors, unauthorized access, and general server errors.

# Express Router:
7. Express Router:

The project uses Express Router to modularize the code and separate the routes related to user management and event management.

# CORS and JSON Parsing:
8. CORS and JSON Parsing:

CORS is enabled to handle cross-origin requests.
JSON parsing middleware is used to handle JSON data in requests and responses.

# MongoDB Connection:
9. MongoDB Connection:

The server connects to a MongoDB Atlas cluster for storing and retrieving data.

# Project Structure:
10. Project Structure:

The code is structured into multiple files, including user.js for user-related routes, index.js for the main server setup, and index.js in the db folder for defining Mongoose schemas.

Expand Down

0 comments on commit bc8d9e1

Please sign in to comment.