Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 DevTinder

Node.js Express MongoDB

DevTinder is a modern Node.js & Express web application for user registration, authentication, profile management, and connection requests. Built with MongoDB, Mongoose, and a modular architecture for scalability and maintainability.


✨ Features

  • 🔒 Secure user registration & login (JWT authentication)
  • 🛡️ Password hashing with bcrypt
  • 👤 Profile management (view, update, change password, delete)
  • 🤝 Send connection requests
  • 📧 Email & password validation
  • 🍪 Cookie-based session management
  • 🗂️ Modular code structure

📁 Project Structure

├── app.js
├── server.js
├── config/
│   └── conn.js
├── middlewares/
│   └── auth.js
├── models/
│   └── user.model.js
├── routes/
│   ├── auth/
│   │   ├── auth.controller.js
│   │   └── auth.route.js
│   ├── profile/
│   │   ├── profile.controller.js
│   │   └── profile.route.js
│   └── request/
│       ├── request.controller.js
│       └── request.route.js
├── utils/
│   └── helper.js
└── README.md

⚡️ Quick Start

  1. Clone the repository:
    git clone https://github.com/psbcg433/devtinder.git
    cd devtinder
  2. Install dependencies:
    npm install
  3. Configure environment: Create a .env file:
    PORT=3000
    MONGO_URI=mongodb://localhost:27017
    DB_NAME=devtinder
    JWT_SECRET=your_jwt_secret
    JWT_EXPIRES_IN=1d
  4. Start the server:
    npm start

📚 API Endpoints

�️ API Endpoints

Method Endpoint Description Auth Required
POST /api/v1/auth/register Register a new user ❌
POST /api/v1/auth/login Login and receive JWT token ❌
POST /api/v1/auth/logout Logout user ✅
GET /api/v1/profile/getProfile Get user profile ✅
PATCH /api/v1/profile/setProfile Update user profile ✅
PATCH /api/v1/profile/setPassword Change password ✅
DELETE /api/v1/profile/deleteProfile Delete user profile ✅
POST /api/v1/request/send/:status/:toUserId Send a connection request (status: interested/ignored) ✅
POST /api/v1/request/review/:status/:requestId Review a connection request (status: accepted/rejected) ✅
GET /api/v1/user/getRequest Get pending connection requests ✅
GET /api/v1/user/getConnections Get accepted connections ✅
GET /api/v1/user/getFeed Get user feed (suggested users) ✅

🎨 Technologies Used


📝 Example .env

PORT=3000
MONGO_URI=mongodb://localhost:27017
DB_NAME=devtinder
JWT_SECRET=your_jwt_secret
JWT_EXPIRES_IN=1d

💡 Tips

  • All endpoints requiring authentication expect a valid JWT token in cookies.
  • Use tools like Postman or Insomnia for API testing.
  • Modular structure makes it easy to extend features.


🛠️ Technologies Used

  • Node.js
  • Express.js
  • MongoDB & Mongoose
  • bcrypt (password hashing)
  • validator (input validation)
  • jsonwebtoken (JWT)
  • cookie-parser

About

DevTinder is a modern Node.js & Express web application for user registration, authentication, profile management, and connection requests. Built with MongoDB, Mongoose, and a modular architecture for scalability and maintainability.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages