How vanaiyan/thrifting.lk works
This repository implements a marketplace-style web application with a React frontend and Express/Mongoose backend. The visible user workflow is browsing the home and product views, and registering or logging in; the backend also provides product-management, account-recovery, profile, and user-search endpoints, plus a chat interface and user-search endpoint. The backend route-to-controller and controller-to-model links are supported by the source index; unsampled frontend networking and chat behavior are not inferred.
Main entry points: App.js Page routing · authController.js Account workflows · app.js HTTP application · ProductRow1.js Product displays
Components 28
Web application
- Page routing
frontend/src/App.js - Marketplace home
frontend/src/Pages/User/HomePage.js - Product displays
frontend/src/Components/Home/ProductRow1.js - Product cards
frontend/src/Components/Cards/ProductCardsm.js - Product listing
frontend/src/Components/Products.js - Chat interface
frontend/src/Pages/User/ChatPage.js - Chat conversation
frontend/src/Pages/User/Chat.js - Chat actions
frontend/src/Actions/chatActions.js
Accounts and identity
- Login and signup
frontend/src/Pages/User/LoginMain.js - Login forms
frontend/src/Components/Login/LoginDesk.js - Signup forms
frontend/src/Components/Sign-up/SignUpDesk.js - User actions
frontend/src/Actions/userAction.js - Account routes
backend/routes/auth.js - Account workflows
backend/controllers/authController.js - Authentication
backend/middlewares/authenticate.js - User records
backend/models/userModel.js - Token helper
backend/utils/jwt.js - Email helper
backend/utils/email.js
Product catalog
- Product routes
backend/routes/product.js - Product workflows
backend/controllers/productController.js - Product records
backend/models/productModel.js
API and persistence
- HTTP application
backend/app.js - Search and paging
backend/utils/apiFeatures.js - Chat user routes
backend/routes/chat.js - User search
backend/controllers/chatController.js - Database connection
backend/config/database.js - Server startup
backend/server.js
Other components
- Visitor
Connections 30
- Visitor → Page routing: opens
frontend/src/App.js - Page routing → Marketplace home: routes to
frontend/src/App.js - Page routing → Login and signup: routes to
frontend/src/App.js - Page routing → Chat interface: routes to
frontend/src/App.js - Marketplace home → Product displays: renders
frontend/src/Pages/User/HomePage.js - Product displays → Product cards: renders
frontend/src/Components/Home/ProductRow1.js - Product displays → Product listing: uses
frontend/src/Components/Home/ProductRow1.js - Login and signup → Login forms: renders
frontend/src/Pages/User/LoginMain.js - Login and signup → Signup forms: renders
- Login forms → User actions: dispatches
frontend/src/Components/Login/LoginDesk.js - Chat interface → Chat conversation: renders
frontend/src/Pages/User/ChatPage.js - Chat interface → Chat actions: uses
frontend/src/Pages/User/ChatPage.js - HTTP application → Account routes: mounts
backend/app.js - HTTP application → Product routes: mounts
backend/app.js - HTTP application → Chat user routes: mounts
backend/app.js - Account routes → Account workflows: dispatches
backend/routes/auth.js - Account routes → Authentication: guards
backend/routes/auth.js - Account workflows → User records: reads and writes
backend/controllers/authController.js - Account workflows → Token helper: issues token
backend/controllers/authController.js - Account workflows → Email helper: sends recovery email
backend/controllers/authController.js - Authentication → User records: loads user
backend/middlewares/authenticate.js - Product routes → Product workflows: dispatches
backend/routes/product.js - Product routes → Authentication: guards
backend/routes/product.js - Product workflows → Product records: queries
backend/controllers/productController.js - Product workflows → Search and paging: filters results
backend/controllers/productController.js - Chat user routes → User search: dispatches
backend/routes/chat.js - User search → User records: searches users
backend/controllers/chatController.js - User search → Search and paging: searches with
backend/controllers/chatController.js - Server startup → HTTP application: starts
backend/server.js - Server startup → Database connection: connects database
backend/server.js