All 42 projects

42 Project brief

matcha

A dating web app built with a teammate at 42 Paris. People find matches by distance, shared interests and popularity, then chat in real time. I built accounts and sign-in, profiles and location, the chat and the notifications.

My role
Full-stack: auth, profiles, chat
Team
2 developers
Timeline
Jan — Feb 2025
Result
Passed with bonus · 98 h

The project

matcha is the 42 web project about building a dating site. The subject bans ORMs, validation libraries and ready-made user account managers, so the queries, the validation and the account logic are all written by hand.

The app covers sign-up with email verification, profiles with photos and interests, GPS location, suggestions sorted by distance, common interests and fame rating, likes and matches, blocking and reporting, real-time chat and notifications.

The team’s stack

  • React
  • TypeScript
  • Vite
  • Tailwind CSS
  • Material UI
  • Express
  • Socket.io
  • Neo4j
  • Docker

My part

I wrote more than 200 of the 238 commits, full stack for my features, from the Cypher queries to the React screens. My teammate built browsing and the matching logic.

01

Accounts & security

Registration, login and account recovery, written without a user account library.

  • Passwords hashed with Argon2, and accounts verified through a one-time link sent by email before the first login
  • The session is a JWT in an httpOnly, SameSite=Strict cookie that lasts one hour
  • Password reset through a 10-minute signed link; email changes need the password and are confirmed on the new address
02

Sign in with Google, Discord or 42

OAuth sign-in with three providers, built with Passport.

  • New users are created on their first sign-in
  • Every provider ends with the same session cookie as a regular login
  • Users are sent to the setup step until their profile is complete, then to Discover
03

Profiles, photos & location

Everything a profile needs before it can be matched.

  • A setup step that must be completed first: gender, preferences, biography, interests and photos
  • Interests stored as shared tag nodes in the graph, so people with the same interest point to the same node
  • Photos limited to JPEG or PNG under 5 MB and stored on Cloudinary
  • GPS position reverse-geocoded with OpenStreetMap and saved as a Neo4j spatial point, with an IP-based fallback when the user refuses GPS
04

Real-time chat

Socket.io messaging between people who matched.

  • Socket connections are authenticated with the session cookie on the handshake, and each user has a personal room
  • Only matched users can write to each other, and messages are limited to 300 characters
  • Messages are stored in the graph as sender → message → receiver and pushed to both users at once
05

Notifications

Live alerts that are also kept for later.

  • New messages, likes and unlikes create a notification for the other user
  • Notifications are stored as graph nodes and pushed live through Socket.io
  • Endpoints to list them, dismiss one, or clear them all
06

Graph database & validation

Neo4j with hand-written Cypher, and my own input validation.

  • Every query written in Cypher with the official driver, no ORM, as the subject requires
  • A seed script that uses Faker to create 500 realistic profiles with interests, photos and locations
  • My own validators for passwords, emails, usernames, names, age, biography and interests, replacing express-validator

How a message travels

  1. 1

    Send

    The client emits the message on its socket, already authenticated by the session cookie.

  2. 2

    Check

    The server rejects empty or overlong messages and checks that the two users matched.

  3. 3

    Store

    The message becomes a node linked to the sender and the receiver in Neo4j.

  4. 4

    Deliver

    It is pushed to both users’ rooms, so every open tab updates instantly.

  5. 5

    Notify

    A notification is saved for the receiver and pushed to them live.

What I used

  • Node.js
  • Express
  • TypeScript
  • Neo4j (Cypher)
  • Socket.io
  • React
  • Tailwind CSS
  • JWT
  • Argon2
  • Passport (OAuth)
  • Nodemailer
  • Cloudinary
  • Docker