Skip to main content
All Projects

DevTinder

Real-time developer networking — matching, chat, presence, and payments across a two-repo MERN system.

Full-stack build across two repositories — modular Express + MongoDB backend, React + Redux Toolkit frontend, Socket.io realtime layer.

React.jsRedux ToolkitNode.jsExpress.jsMongoDBSocket.ioJWTRazorpay

The Problem

Developers looking for collaborators have no focused space to find people with aligned project interests — generic social platforms bury the signal behind feeds and follower counts, and a networking product only works if matching, chat, and presence all feel instant.

The Approach

Split into two deployable apps. A Node.js/Express backend with modular routers (auth, profile, connections, users, chat, payments), JWT auth in secure cookies, and indexed MongoDB schemas. A React + Vite + Redux Toolkit frontend on top. Socket.io carries realtime chat and presence; Razorpay handles premium memberships; a documented AWS EC2 + PM2 + Nginx path covers deployment.

Architecture

  1. 01

    Connection request engine

    Send/review flows with enum-validated statuses; Mongoose .pre middleware blocks self-requests and MongoDB validation prevents duplicate requests between the same pair of users.

  2. 02

    Feed API with pagination

    Suggested developers exclude self, existing connections, ignored users, and pending requests via $nin/$ne operators — skip/limit pagination over compound-indexed fields.

  3. 03

    Auth & security

    JWT issued in secure HTTP-only cookies, bcryptjs password hashing, auth middleware protecting private routes, centralized error handling, and email-based password reset.

  4. 04

    Realtime chat

    Socket.io with socket-level authentication validating users before messaging; chat history persisted to MongoDB on indexed, timestamped schemas.

  5. 05

    Presence tracking

    Online/offline status and last-seen driven by socket connect/disconnect events with online-user broadcasting — kept out of hot database paths.

  6. 06

    Payments

    Razorpay premium memberships end to end: order creation, webhook handling, payment verification, and payment history tracking.

  7. 07

    Deployment path

    Documented AWS deployment: PM2 process manager, Nginx reverse proxy (SPA try_files routing + /api proxy), and MongoDB Atlas IP allow-listing.

Stack & Trade-offs

Two repos, modular routers

Auth, profile, connections, users, chat, and payments live as separate Express routers — the backend stays navigable and each concern can scale independently.

Socket.io over polling

Presence and instant messaging demand persistent connections; broadcast events for online users avoid per-keystroke database reads.

Redux Toolkit for shared state

The logged-in user, feed, connections, and chat state are read across many routes — slices with a single store beat prop drilling at this size.

Vite for the frontend

Instant HMR and lean builds for the React client, keeping the edit-test loop tight across two codebases.

Key Highlights

  • Socket.io chat with online/offline presence and last-seen — socket-level auth validation, status kept off hot DB paths
  • Compound-indexed MongoDB: paginated feed via $nin/$ne and duplicate-proof connection requests via .pre middleware
  • Razorpay payments end to end — order creation, webhook handling, verification, and history

Screenshots

DevTinder application interface
Feed and connection flows across the React + Redux Toolkit frontend.

What I Learned

  • Realtime features are mostly data-modeling problems — presence and last-seen are cheap when sockets carry the state and indexes are designed for the query patterns.
  • Modular routers and two deployable repos made the growing MERN codebase navigable — and let backend changes ship without touching the frontend.
  • Writing down the EC2 + PM2 + Nginx deployment path turned ops from a scramble into a checklist — deployment is design, not an afterthought.