A developer networking platform backend API that enables developers to connect, interact, and build professional relationships - think Tinder, but for developers!
- User Authentication: Secure signup/login with JWT tokens and bcrypt password hashing
- Profile Management: Create and update developer profiles with skills, photos, and bio
- Connection System: Send, accept, or reject connection requests between developers
- User Discovery: Browse and discover other developers on the platform
- Payment Integration: Razorpay integration for premium features
- Real-time Chat: Instant messaging between connected users powered by Socket.io
- CORS Enabled: Ready for frontend integration
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB with Mongoose ODM
- Authentication: JWT (JSON Web Tokens) + bcrypt
- Payment: Razorpay
- Validation: Validator.js
- Node.js (v14 or higher)
- MongoDB Atlas account or local MongoDB instance
- Razorpay account (for payment features)
- Clone the repository:
git clone <repository-url>
cd devtinder- Install dependencies:
npm install- Create a
.envfile in the root directory:
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key- Start the development server:
npm run devOr for production:
npm startThe server will run on http://localhost:3000
POST /signup- Register a new userPOST /login- Login user
GET /profile/view- View your profilePATCH /profile/edit- Update profile information
POST /request/send/:status/:userId- Send connection request (interested/ignored)POST /request/review/:status/:requestId- Accept or reject connection request
GET /user/requests/received- View received connection requestsGET /user/connections- View accepted connectionsGET /user/feed- Discover new developers
GET /chat/:targetUserId- Get chat history with a specific user (Supports pagination:?limit=20&before=TIMESTAMP)
POST /payment/create- Create payment order (Placeholder)
joinChat- Join a private chat room- Payload:
{ targetUserId: "..." }
- Payload:
sendMessage- Send a message to a friend- Payload:
{ targetUserId: "...", text: "..." }
- Payload:
messageReceived- Received when a new message comes in- Payload:
{ text: "...", senderId: "...", senderName: "...", timestamp: ... }
- Payload:
{
firstName: String (required, 2-50 chars),
lastName: String,
emailId: String (required, unique, validated),
password: String (required, strong password, 6-100 chars),
age: Number (min: 18),
gender: String (Male/Female/Other),
photoUrl: String (default avatar provided),
about: String (max 80 chars),
skills: [String]
}{
participants: [{ type: ObjectId, ref: 'User' }],
messages: [{
senderId: { type: ObjectId, ref: 'User' },
text: String,
createdAt: Date
}]
}{
fromUserId: ObjectId (ref: User),
toUserId: ObjectId (ref: User),
status: String (ignored/interested/accepted/rejected)
}- Password hashing with bcrypt
- JWT token-based authentication
- Strong password validation
- Email validation
- Protected routes with authentication middleware
The API is configured to accept requests from:
http://localhost:5173(Local Development)https://dev-connect-frontend-theta.vercel.app(Production)
Allowed Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS
Update the CORS settings in src/app.js if your frontend URL changes.
npm run dev # Runs with nodemon for auto-reloadPrarthana Purohit
ISC