DevTinder is a developer networking platform where tech enthusiasts can connect, chat, and collaborate based on mutual interest. Inspired by Tinder, it lets users swipe left to ignore and right to connect, with real-time chat powered by Socket.io.
π Live Demo: https://devtinder-remo.vercel.app π GitHub Repository: DevTinder Repo
- β JWT + httpOnly Cookie Authentication β Secure signup, login and logout.
- β Swipeable Feed β Browse developer profiles and swipe to connect (paginated).
- β Connection Requests β Send interest, accept or reject incoming requests.
- β Real-time Chat β Socket.io messaging (authenticated) with notification sounds.
- β Profile Management β Edit your profile, skills and photo; change your password.
- β Hardened Backend β Helmet, CORS, rate limiting, request validation and structured logging.
Frontend: React 18, TypeScript, Vite, Zustand, React Router, React Hook Form + Yup, Axios, Tailwind CSS + DaisyUI, Socket.io Client, react-tinder-card, react-hot-toast
Backend: Node.js, Express 5, TypeScript, MongoDB + Mongoose, Socket.io, JWT, bcrypt, Yup, Helmet, express-rate-limit, Morgan + Winston
Tooling: Bun (package manager), ESLint, Prettier
devtinder/
βββ backend/ # Express + Socket.io API (TypeScript)
β βββ src/
β βββ config/ # env + MongoDB connection
β βββ controllers/ # auth, profile, user, request, chat
β βββ middlewares/ # auth, error, rate limit, logging, 404
β βββ models/ # User, ConnectionRequest, Chat, Message
β βββ routes/ # /api/v1 route definitions
β βββ utils/ # socket, handlers, logger
β βββ validations/ # Yup schemas
βββ frontend/ # React + Vite SPA (TypeScript)
β βββ src/
β βββ components/ # UI components
β βββ hooks/ # data-fetching / action hooks
β βββ pages/ # route pages
β βββ store/ # Zustand global store
β βββ schemas/ # Yup form schemas
β βββ utils/ # axios instance, helpers
βββ README.md- Bun (recommended β the repo ships a
bun.lock) or Node.js 18+ with npm - A MongoDB database (local instance or MongoDB Atlas)
git clone https://github.com/sharadindudas/devtinder.git
cd devtinderCopy the sample files and fill in your values:
cp backend/.env.sample backend/.env
cp frontend/.env.sample frontend/.envBackend (backend/.env)
| Variable | Description | Example |
|---|---|---|
PORT |
Port the API listens on | 6565 |
NODE_ENV |
development or production (controls cookie security) |
development |
SERVER_URL |
Public URL of the API (used in logs) | http://localhost:6565 |
MONGODB_URL |
MongoDB connection string (db name devtinder) |
mongodb://localhost:27017 |
JWT_SECRET |
Secret used to sign JWTs | a_long_random_secret |
FRONTEND_URL |
Allowed CORS origin (the frontend URL) | http://localhost:5173 |
Frontend (frontend/.env)
| Variable | Description | Example |
|---|---|---|
VITE_BACKEND_URL |
Backend origin (REST calls append /api/v1; Socket.io uses it directly) |
http://localhost:6565 |
In development (
NODE_ENVunset ordevelopment) auth cookies useSameSite=Lax+ non-secure so they work overhttp://localhost. In production they switch toSameSite=None+Secure.
Backend
cd backend
bun install
bun run dev # ts-node-dev with hot reloadFrontend (in a second terminal)
cd frontend
bun install
bun run dev # Vite dev server on http://localhost:5173Using npm instead of Bun?
npm install && npm run devworks too, but Bun is the committed lockfile.
Backend
| Script | Description |
|---|---|
bun run dev |
Start the API in watch mode |
bun run build |
Compile TypeScript to dist/ |
bun run start |
Run the compiled server (dist/) |
bun run lint:fix |
Lint and auto-fix |
bun run format |
Format with Prettier |
Frontend
| Script | Description |
|---|---|
bun run dev |
Start the Vite dev server |
bun run build |
Type-check and build for production |
bun run preview |
Preview the production build |
bun run lint |
Lint the project |
bun run format |
Format with Prettier |
Base URL: /api/v1 β protected routes require the devtinderToken httpOnly cookie.
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /health |
β | Health check |
| POST | /auth/signup |
β | Register a new user |
| POST | /auth/login |
β | Log in (sets the auth cookie) |
| POST | /auth/logout |
β | Log out (clears the cookie) |
| GET | /profile/view |
β | Get the logged-in user's profile |
| PATCH | /profile/edit |
β | Update profile details |
| PUT | /profile/password |
β | Change password |
| GET | /user/feed |
β | Paginated feed of users to swipe |
| GET | /user/requests/received |
β | Incoming connection requests |
| GET | /user/connections |
β | Accepted connections |
| POST | /request/send/:status/:userId |
β | Send request (interested / ignored) |
| POST | /request/review/:status/:requestId |
β | Review request (accepted / rejected) |
| GET | /chat/:userId |
β | Paginated message history with a user |
Socket.io events (handshake authenticated via the auth cookie):
| Event | Direction | Payload | Description |
|---|---|---|---|
joinChat |
client β server | { receiverId } |
Join a chat room with a connection |
sendMessage |
client β server | { message, receiverId } |
Send a message to a connection |
messageReceived |
server β client | message object | New message broadcast to the room |
error |
server β client | string | Auth / validation error |
- User β name, email (unique), password (hashed), age, gender, about, skills, photoUrl
- ConnectionRequest β
senderId,receiverId,status(interested/ignored/accepted/rejected) - Chat β
roomId(unique),participants - Message β
chatId(indexed),senderId,messageβ stored in its own collection for scalable, paginated history
- π§ Online/Offline Status β Show when a user is online or last seen.
- π¬ Typing Indicator β Show when the other user is typing.
- π File Attachments in Chat β Send images, PDFs or code snippets.
- π― Personalized Recommendation Feed β Rank the feed by relevance using skills, interests, experience, "looking for" and location instead of a plain listing.
- π‘οΈ Reporting & Blocking β Report or block inappropriate behavior.
- π Push Notifications β Real-time alerts for messages and requests.
- π± Mobile Responsiveness / PWA β Installable, mobile-friendly experience.
- π₯ Unit & Integration Tests β Improve stability and reliability.
Contributions are welcome! Fork the repository, create a feature branch, and open a pull request. Please run bun run lint:fix and bun run format before submitting.
π¨βπ» Author: Sharadindu Das π§ Email: sharadindudas774@gmail.com