How harishb0401/ecolink works
Eco-Link is a circular e-waste marketplace and regulatory-compliance platform. Collectors register waste lots; recyclers browse matched lots and submit bids; collectors accept offers, creating escrow-style transactions and traceability records. Administrators oversee recycler verification and platform activity. The README documents the main API and database capabilities; sampled source confirms key routing, lot-matching, authentication, and offline-sync links. Some controller and page internals were not sampled, so those relationships rely on README descriptions or are omitted.
Main entry points: AppRoutes.jsx Role-based pages · App.jsx Client application · wasteController.js Lot management · syncManager.js Queued synchronization
Components 27
Marketplace client
- Client application
src/App.jsx - Role-based pages
src/routes/AppRoutes.jsx - Waste registration
src/pages/collector/RegisterWaste.jsx - Recycle guide
src/pages/public/RecycleGuide.jsx - English and Tamil
src/i18n/index.jsx
Offline capability
- Network status
src/services/offline/networkStatus.js - Offline reference content
src/services/offline/offlineContentService.js - Local database
src/services/offline/offlineDatabase.js - Offline collector session
src/services/offline/offlineSession.js - Queued synchronization
src/services/offline/syncManager.js
API and domain services
- REST client
src/services/api.js - Waste client service
src/services/wasteService.js - Authentication client
src/services/authService.js - Express API
server/app.js - Waste routes
server/routes/wasteRoutes.js - Lot management
server/controllers/wasteController.js - Recycler matching
server/services/matchingService.js - Pricing rules
server/services/pricingService.js - Offers and acceptance
server/controllers/offerController.js - Escrow transactions
server/services/transactionService.js - JWT authentication
server/middleware/authMiddleware.js
Compliance and oversight
- Administration
server/controllers/adminController.js - Recycler verification
server/services/verificationService.js
Persistence
- Supabase PostgreSQL
Other components
- Collector
- Recycler
- Environmental authority
Connections 36
- Collector → Role-based pages: uses
src/routes/AppRoutes.jsx - Recycler → Role-based pages: uses
src/routes/AppRoutes.jsx - Environmental authority → Role-based pages: uses
README.md - Client application → Role-based pages: renders
src/App.jsx - Role-based pages → Waste registration: routes to
src/routes/AppRoutes.jsx - Role-based pages → Recycle guide: routes to
src/routes/AppRoutes.jsx - Waste registration → Pricing rules: checks pricing
src/pages/collector/RegisterWaste.jsx - Client application → English and Tamil: provides language
src/App.jsx - English and Tamil → Recycle guide: localizes
src/pages/public/RecycleGuide.jsx - Client application → Waste client service: loads lot data
src/App.jsx - Waste client service → REST client: calls
src/services/wasteService.js - Authentication client → REST client: calls
src/services/authService.js - Authentication client → Network status: checks connectivity
src/services/authService.js - Authentication client → Offline collector session: reads and saves
src/services/authService.js - Offline collector session → Local database: stores session
src/services/offline/offlineSession.js - Offline reference content → Local database: stores content
src/services/offline/offlineContentService.js - Offline reference content → Supabase PostgreSQL: uses price reference
src/services/offline/offlineContentService.js - Queued synchronization → Local database: reads queue
src/services/offline/syncManager.js - Queued synchronization → Network status: checks network
src/services/offline/syncManager.js - Queued synchronization → REST client: syncs lots
src/services/offline/syncManager.js - Client application → Queued synchronization: refreshes after sync
src/App.jsx - REST client → Express API: sends REST requests
README.md - Express API → Waste routes: mounts routes
server/app.js - Waste routes → JWT authentication: authenticates
server/routes/wasteRoutes.js - Waste routes → Lot management: dispatches
server/routes/wasteRoutes.js - Lot management → Recycler matching: matches lots
server/controllers/wasteController.js - Lot management → Supabase PostgreSQL: reads and writes lots
server/controllers/wasteController.js - Lot management → Pricing rules: classifies and prices
server/controllers/wasteController.js - Recycler → Recycler matching: receives eligible lots
README.md - Recycler → Offers and acceptance: submits bids
README.md - Collector → Offers and acceptance: accepts bid
README.md - Offers and acceptance → Escrow transactions: creates transaction
server/controllers/offerController.js - Escrow transactions → Supabase PostgreSQL: records escrow
README.md - Environmental authority → Administration: oversees platform
README.md - Administration → Recycler verification: processes approvals
server/controllers/adminController.js - Recycler verification → Supabase PostgreSQL: records audit
README.md