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.
- 🔒 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
├── 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
- Clone the repository:
git clone https://github.com/psbcg433/devtinder.git cd devtinder - Install dependencies:
npm install
- Configure environment:
Create a
.envfile:PORT=3000 MONGO_URI=mongodb://localhost:27017 DB_NAME=devtinder JWT_SECRET=your_jwt_secret JWT_EXPIRES_IN=1d
- Start the server:
npm start
| 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) | ✅ |
PORT=3000
MONGO_URI=mongodb://localhost:27017
DB_NAME=devtinder
JWT_SECRET=your_jwt_secret
JWT_EXPIRES_IN=1d- 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.
- Node.js
- Express.js
- MongoDB & Mongoose
- bcrypt (password hashing)
- validator (input validation)
- jsonwebtoken (JWT)
- cookie-parser