How kritika8006/rewear works
ReWear is a sustainable clothing exchange platform. Its main workflow is users registering or signing in, listing clothing, browsing available items, and requesting or responding to swaps. The backend exposes authentication, item, and swap APIs backed by user, item, and swap records; it also offers image-based clothing category suggestions through a separate CLIP service. The graph reflects sampled routing and controller behavior; frontend page-to-API wiring and unsampled integrations are not asserted.
Main entry points: App.jsx App router · server.js API server · itemRoutes.js Item routes · swapRoutes.js Swap routes
Components 23
Web application
- App router
frontend/src/App.jsx - Browse items
frontend/src/pages/BrowseItems.jsx - My listings
frontend/src/pages/MyListings.jsx - Product design
frontend/src/pages/ProductDesign.jsx - Swap requests
frontend/src/pages/SwapRequests.jsx - Sign in
frontend/src/pages/LoginPage.jsx - Sign up
frontend/src/pages/SignupPage.jsx - API client
frontend/src/api/axios.js
Backend API
- API server
backend/server.js - Auth routes
backend/routes/authRoutes.js - Item routes
backend/routes/itemRoutes.js - Swap routes
backend/routes/swapRoutes.js - Suggestion route
backend/routes/clipRoutes.js
Exchange domain
- Authentication
backend/controllers/authController.js - Item management
backend/controllers/itemController.js - Swap management
backend/controllers/swapController.js - Access control
backend/middlewares/authMiddleware.js - Users
backend/models/User.js - Items
backend/models/Item.js - Swap records
backend/models/Swap.js
Image suggestions
- CLIP classifier
backend/clip_service/app.py
Other components
- Platform user
- Image URL source
Connections 23
- Platform user → App router: uses
- App router → Browse items: routes to
- App router → My listings: routes to
- App router → Product design: routes to
- App router → Swap requests: routes to
- App router → Sign in: routes to
- App router → Sign up: routes to
- API server → Auth routes: mounts
- API server → Item routes: mounts
- API server → Swap routes: mounts
- API server → Suggestion route: mounts
- Auth routes → Authentication: dispatches
- Item routes → Access control: guards
- Item routes → Item management: dispatches
- Swap routes → Access control: guards
- Swap routes → Swap management: dispatches
- Authentication → Users: reads/writes
- Access control → Users: loads user
- Item management → Items: reads/writes
- Swap management → Items: loads items
- Swap management → Swap records: reads/writes
- Suggestion route → CLIP classifier: requests suggestion
- CLIP classifier → Image URL source: fetches image