This project implements a comprehensive RESTful API built with Node.js (backend server), ExpressJS (web framework), and MongoDB (NoSQL database). It offers a rich set of functionalities for user management, data interaction, and social networking capabilities (details about functionalities are included in the Core Functionalities section below).
-
User Authentication:
- Secure user signup, login, and logout for platform access control.
-
Post Management:
- CRUD (Create, Read, Update, Delete) operations for posts, empowering users to:
- Create posts with captions and image URLs.
- Edit and delete posts, with ownership checks for security.
- CRUD (Create, Read, Update, Delete) operations for posts, empowering users to:
-
Comment System:
- Allows users to add, update, and delete comments on posts.
- Implements access control for comment editing/deletion (post owner or commenter).
-
Like Functionality:
- Creates a like system for posts, seamlessly integrating with MongoDB.
- Populates documents and displays like counts to enhance user engagement.
-
Friendship Features:
- Users can send, accept, reject, and cancel friend requests.
- Enables management of friend lists and pending requests.
-
User Profile Updates:
- Users can modify their profiles with essential fields for personalization (e.g., name, gender).
-
OTP-Based Password Reset:
- Strengthens security by enabling password resets using One-Time Passwords (OTPs) sent via email.
- Clone the GitHub repository.
- Update the
.env
file with appropriate configurations for:- Database connection details
- JWT Secret Key
- Email configurations (e.g., email server credentials)
- Run
npm install
to install project dependencies. - Refer to the
Routes
file for API endpoints and use a tool like Postman to test them. - For routes requiring user authentication, generate a token through the login functionality and include it in the headers column of your request (as an authorization header).