DevTinder is a backend API service designed to help developers find and connect with potential hackathon teammates. Built with Node.js, Express, and MongoDB, it provides user authentication, profile management, connection requests, and a user feed to discover new teammates.
- User registration and authentication (JWT-based)
- Profile creation, viewing, and editing
- Send and review connection requests (interested, ignored, accepted, rejected)
- View pending requests and existing connections
- User feed to discover new users
- Secure endpoints with authentication middleware
- Node.js
- Express.js
- MongoDB (Mongoose ODM)
- JWT for authentication
- bcrypt for password hashing
- cookie-parser for cookie management
- Clone the repository
- Install dependencies:
npm install - Set up your MongoDB connection in
src/config/database.js - Start the server:
npm run dev
Register a new user. Body:
{
"firstName": "John",
"lastName": "Doe",
"emailId": "john@example.com",
"about": "",
"photoURL": "",
"password": "yourpassword",
"gender": "male|female",
"skills": ["JavaScript", "React"]
}
Response: user created successfully or error message.
Login user and receive JWT token in a cookie. Body:
{
"emailId": "john@example.com",
"password": "yourpassword"
}
Response: Sets token cookie, returns user info.
Logout user (clears token cookie).
All profile routes require authentication (token cookie).
Get the logged-in user's profile.
Edit the logged-in user's profile. Body:
{
"about": "New about info",
"skills": ["Node.js", "MongoDB"]
}
All request routes require authentication.
Send a connection request to another user.
status:intrestedorignoredtoUserId: MongoDB ObjectId of the user to connect with
Review a received connection request.
status:acceptedorrejectedrequestId: ID of the connection request
All user routes require authentication.
Get all pending ("intrested") connection requests received by the logged-in user.
Get all users with whom the logged-in user has an accepted connection.
Get a paginated list of users the logged-in user has not interacted with.
- Query params:
page(default 1),limit(default 10, max 50)
- firstName, lastName, emailId, about, PhotoURL, gender, skills, password
- fromUserId, toUserId, status (
intrested,ignored,accepted,rejected)
All protected routes require a valid JWT token sent as a cookie named token.
ISC