Skip to content

Dipika-Gandash/Connectify_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”— Connectify API

A mini social networking backend built with Node.js, Express, MongoDB, and JWT Auth. Features include user authentication, sending/accepting connection requests, managing profiles, and a personalized user feed with pagination.

🧠 Features

πŸ‘€ User Signup & Login (JWT + Cookies)

πŸ›‘οΈ Protected routes with middleware

πŸ”„ Send/Accept/Reject Connection Requests

πŸ§‘β€πŸ€β€πŸ§‘ View list of accepted connections

πŸ“‘ User Feed showing non-connected users (with pagination)

✏️ Edit user profile and update password securely

πŸ§ͺ Validations using validator & custom Mongoose validations

βš™οΈ Tech Stack

Backend: Node.js, Express.js

Database: MongoDB (Mongoose)

Auth: JWT (stored in HTTP-only cookies)

Validation: validator, bcrypt

Environment: dotenv

πŸ“‚ Project Structure

β”œβ”€β”€ config/ β”‚ └── database.js β”œβ”€β”€ modals/ β”‚ β”œβ”€β”€ userSchema.js β”‚ └── connectionReq.js β”œβ”€β”€ routes/ β”‚ β”œβ”€β”€ auth.js β”‚ β”œβ”€β”€ profile.js β”‚ β”œβ”€β”€ request.js β”‚ └── connections.js β”œβ”€β”€ middlewares/ β”‚ └── auth.js β”œβ”€β”€ utils/ β”‚ └── validation.js β”œβ”€β”€ .env β”œβ”€β”€ app.js └── README.md

πŸ” Environment Setup

Create a .env file in the root directory: PORT=3000 MONGODB_URL=your_mongodb_connection_string JWT_SECRET_KEY=your_jwt_secret

#▢️ Getting Started

1. Clone the repository

git clone https://github.com/Dipika-Gandash/Connectify_API cd Connectify_API

2. Install dependencies

npm install

3. Start the server

npm start Server will start on: http://localhost:3000

βœ… Validations & Security

Passwords are hashed using bcrypt

Strong password rules enforced (min 8 chars, 1 upper, 1 lower, 1 symbol, 1 number)

Token is verified in userAuth middleware before protected routes

Input data is validated using validator.js and Mongoose rules

Users can't send duplicate or self-requests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors