How sudhanshubaberwal/rescrapx works
RescrapX is a vehicle-scrapping marketplace: customers register vehicles and upload information for valuation, partners bid, and accepted offers proceed through pickup, processing documentation, and settlement. The gateway authenticates and routes requests to backend services; the frontend provides customer, partner, and admin portals. The README documents the business workflow and capabilities, while sampled backend excerpts confirm selected controller, service, repository, and notification calls. Several portal and later-stage implementations were not sampled, so those links are documented rather than inferred from module names.
Main entry points: app.ts API gateway · auction.service.ts Auction service · page.tsx Customer portal · auth.service.ts Identity service
Components 27
Marketplace Portals
- Customer portal
frontend/src/app/(protected)/page.tsx - Partner portal
frontend/src/app/(protected)/partner/page.tsx - Admin panel
frontend/src/components/admin/AdminPage.tsx - Auth client
frontend/src/services/auth.service.ts - Vehicle client
frontend/src/services/vehicle.service.ts - Auction client
frontend/src/services/auction/auction.service.ts
Gateway
- API gateway
backend/gateway/src/app.ts - JWT protection
backend/gateway/src/middleware/auth.middleware.ts
Identity
- Auth routes
backend/services/auth/src/routes/auth.route.ts - Auth controller
backend/services/auth/src/controllers/auth.controller.ts - Identity service
backend/services/auth/src/service/auth.service.ts - User repository
backend/services/auth/src/repository/auth.repository.ts - User records
backend/services/auth/src/models/user.model.ts
Vehicle Lifecycle
- Vehicle API
backend/services/vehicle-service/src/routes/vehicle.route.ts - Vehicle controller
backend/services/vehicle-service/src/controllers/vehicle.controller.ts - Vehicle lifecycle
backend/services/vehicle-service/src/services/vehicle.service.ts - Vehicle repository
backend/services/vehicle-service/src/repositories/vehicle.repository.ts - Vehicle records
backend/services/vehicle-service/src/models/vehicle.model.ts
Auctions and Messaging
- Auction API
backend/services/auction-service/src/routes/auction.route.ts - Auction controller
backend/services/auction-service/src/controllers/auction.controller.ts - Auction service
backend/services/auction-service/src/service/auction.service.ts - Auction repository
backend/services/auction-service/src/repositories/auction.repository.ts - Auction records
backend/services/auction-service/src/models/auction.model.ts - Email notifications
backend/services/notification-service/src/controllers/notification.controller.ts
Other components
- Customer
- RVSF partner
- Administrator
Connections 30
- Customer → Customer portal: uses
- RVSF partner → Partner portal: uses
- Administrator → Admin panel: uses
- Customer portal → Auth client: authenticates via
- Customer portal → Vehicle client: registers vehicles
- Partner portal → Auction client: places bids
- Admin panel → API gateway: requests dashboard
- Auth client → API gateway: sends requests
- Vehicle client → API gateway: sends requests
- Auction client → API gateway: sends requests
- API gateway → JWT protection: protects routes
backend/gateway/src/app.ts - API gateway → Auth routes: proxies auth
backend/gateway/src/app.ts - API gateway → Vehicle API: proxies vehicles
backend/gateway/src/app.ts - API gateway → Auction API: proxies auctions
backend/gateway/src/app.ts - Auth routes → Auth controller: routes requests
- Auth controller → Identity service: invokes
backend/services/auth/src/controllers/auth.controller.ts - Identity service → User repository: reads and writes
backend/services/auth/src/service/auth.service.ts - User repository → User records: queries
backend/services/auth/src/repository/auth.repository.ts - Identity service → Email notifications: requests email
backend/services/auth/src/service/auth.service.ts - Vehicle API → Vehicle controller: routes requests
- Vehicle controller → Vehicle lifecycle: invokes
backend/services/vehicle-service/src/controllers/vehicle.controller.ts - Vehicle lifecycle → Vehicle repository: uses
backend/services/vehicle-service/src/services/vehicle.service.ts - Vehicle repository → Vehicle records: reads and writes
backend/services/vehicle-service/src/repositories/vehicle.repository.ts - Vehicle lifecycle → Auction service: auction handoff
- Auction API → Auction controller: routes requests
- Auction controller → Auction service: invokes
backend/services/auction-service/src/controllers/auction.controller.ts - Auction controller → Auction repository: queries
backend/services/auction-service/src/controllers/auction.controller.ts - Auction service → Auction repository: uses
backend/services/auction-service/src/service/auction.service.ts - Auction repository → Auction records: reads and writes
backend/services/auction-service/src/repositories/auction.repository.ts - Auction service → Email notifications: sends alerts