How burakorkmez/tinder-clone works
Tinder Clone’s main workflow is account access, profile setup, browsing eligible profiles, swiping to create mutual matches, then chatting with matches. The client routes pages and uses Zustand stores for API and socket interactions; the Express server mounts protected routes whose controllers update MongoDB models and emit real-time events. The README also documents image uploads and notifications; source-index references support their subsystem placement, though some implementation details were not excerpted. Dashed socket links mark the client/server event connection where the shown excerpts do not establish the full wiring.
Main entry points: server.js HTTP server · App.jsx App routing · auth.js JWT guard · useAuthStore.js Auth state
Components 27
Client experience
- App routing
client/src/App.jsx - Authentication page
client/src/pages/AuthPage.jsx - Discovery page
client/src/pages/HomePage.jsx - Profile page
client/src/pages/ProfilePage.jsx - Chat page
client/src/pages/ChatPage.jsx
Identity and profiles
- Auth state
client/src/store/useAuthStore.js - Profile state
client/src/store/useUserStore.js - Auth routes
api/routes/authRoutes.js - Auth operations
api/controllers/authController.js - JWT guard
api/middleware/auth.js - User routes
api/routes/userRoutes.js - Profile operations
api/controllers/userController.js - User records
api/models/User.js - Image hosting
api/config/cloudinary.js
Discovery and matching
- Match state
client/src/store/useMatchStore.js - Match routes
api/routes/matchRoutes.js - Match logic
api/controllers/matchController.js
Chat and realtime
- Message state
client/src/store/useMessageStore.js - Message routes
api/routes/messageRoutes.js - Message operations
api/controllers/messageController.js - Message records
api/models/Message.js - Socket client
client/src/socket/socket.client.js - Socket server
api/socket/socket.server.js
Other components
- User
- HTTP server
api/server.js - MongoDB
- Cloudinary service
Connections 41
- User → App routing: uses
- App routing → Auth state: checks session
client/src/App.jsx - App routing → Authentication page: routes to
client/src/App.jsx - App routing → Discovery page: routes to
client/src/App.jsx - App routing → Profile page: routes to
client/src/App.jsx - App routing → Chat page: routes to
client/src/App.jsx - Authentication page → Auth state: submits credentials
client/src/pages/AuthPage.jsx - Discovery page → Match state: loads and swipes
client/src/pages/HomePage.jsx - Profile page → Profile state: updates profile
client/src/pages/ProfilePage.jsx - Chat page → Message state: loads chat
client/src/pages/ChatPage.jsx - Auth state → Socket client: initializes socket
client/src/store/useAuthStore.js - Auth state → Auth routes: calls auth API
client/src/store/useAuthStore.js - Profile state → User routes: calls user API
client/src/store/useUserStore.js - Match state → Match routes: calls match API
client/src/store/useMatchStore.js - Message state → Message routes: calls message API
client/src/store/useMessageStore.js - Message state → Socket client: subscribes to events
client/src/store/useMessageStore.js - Match state → Socket client: subscribes to matches
client/src/store/useMatchStore.js - HTTP server → Auth routes: mounts routes
api/server.js - HTTP server → User routes: mounts routes
api/server.js - HTTP server → Match routes: mounts routes
api/server.js - HTTP server → Message routes: mounts routes
api/server.js - HTTP server → Socket server: initializes socket
api/server.js - HTTP server → MongoDB: connects
api/server.js - Auth routes → Auth operations: dispatches
api/routes/authRoutes.js - Auth routes → JWT guard: protects session route
api/routes/authRoutes.js - User routes → JWT guard: protects routes
api/routes/userRoutes.js - User routes → Profile operations: dispatches
api/routes/userRoutes.js - Match routes → JWT guard: protects routes
api/routes/matchRoutes.js - Match routes → Match logic: dispatches
api/routes/matchRoutes.js - Message routes → JWT guard: protects routes
api/routes/messageRoutes.js - Message routes → Message operations: dispatches
api/routes/messageRoutes.js - JWT guard → User records: loads user
api/middleware/auth.js - Auth operations → User records: reads and writes
api/controllers/authController.js - Profile operations → User records: updates profile
api/controllers/userController.js - Profile operations → Image hosting: uploads image
api/controllers/userController.js - Image hosting → Cloudinary service: stores images
- Match logic → User records: filters and updates
api/controllers/matchController.js - Match logic → Socket server: emits match events
api/controllers/matchController.js - Message operations → Message records: reads and writes
api/controllers/messageController.js - Message operations → Socket server: emits messages
api/controllers/messageController.js - Socket server → Socket client: sends realtime events