How yvonnegat/wastelink works
WasteLink is a React marketplace frontend connecting waste sellers with recyclers. Users authenticate, then enter role-based dashboards and can create a waste listing through type selection, image verification, and pricing; recyclers can discover listings and manage matches. Other major areas cover recycler locations, profiles, transactions, notifications, and administration. The app shell routes between these screens, while hooks and services handle authentication, listings, location data, pricing, and vision requests. Edges reflect the supplied source excerpts, SOURCE INDEX references, or README; unsampled features are included, but uncertain internal calls are omitted.
Main entry points: App.jsx App shell · WasteListing.jsx Waste listing wizard · apiClient.js HTTP and tokens · AuthPage.jsx Sign in and register
Components 30
Application and access
- App shell
src/App.jsx - Sign in and register
src/components/auth/AuthPage.jsx - Session and user state
src/context/AuthContext.jsx - Role dashboards
src/components/dashboard/Dashboard.jsx - How it works
src/components/HowItWorks.jsx
Marketplace workflow
- Waste listing wizard
src/components/listing/WasteListing.jsx - Listing feed
src/components/listings/Listingfeed.jsx - AI verification UI
src/components/vision/VisionModule.jsx - Vision analysis state
src/hooks/useVision.js - Dynamic pricing
src/components/pricing/PricingModule.jsx - Recycler matches
src/components/matches/MatchesPage.jsx - Transactions
src/components/transactions/Transactions.jsx
Recycler discovery
- Recycler map
src/components/map/MapModule.jsx - Location lookup
src/hooks/useMapLocations.js - User profiles
src/components/profile/ProfilePage.jsx - Administration
src/components/admin/AdminPanel.jsx - Notifications
src/components/notifications/NotificationsPanel.jsx
Shared services
- Listing operations
src/services/ListingService.js - HTTP and tokens
src/services/apiClient.js - Authentication API
src/services/authService.js - User API
src/services/userService.js - Vision API
src/services/visionService.js - Pricing API
src/services/pricingService.js - Location data service
src/services/locationService.js - Supabase client
src/services/supabaseClient.js - SVG icons
src/components/common/Icon.jsx - Toast notices
src/components/common/Toast.jsx
Other components
- Seller / recycler
- WasteLink API
- Supabase
Connections 36
- Seller / recycler → App shell: uses
- App shell → Sign in and register: routes to
src/App.jsx - App shell → Role dashboards: routes to
src/App.jsx - App shell → Waste listing wizard: routes to
src/App.jsx - App shell → Listing feed: routes to
src/App.jsx - App shell → Recycler matches: routes to
src/App.jsx - App shell → User profiles: routes to
src/App.jsx - App shell → Administration: routes to
src/App.jsx - App shell → AI verification UI: routes to
src/App.jsx - App shell → Dynamic pricing: routes to
src/App.jsx - App shell → Recycler map: routes to
src/App.jsx - App shell → Transactions: routes to
src/App.jsx - App shell → How it works: opens
src/App.jsx - Sign in and register → Session and user state: authenticates via
src/components/auth/AuthPage.jsx - Sign in and register → Authentication API: requests reset
src/components/auth/AuthPage.jsx - Session and user state → Authentication API: logs in via
src/context/AuthContext.jsx - Session and user state → User API: loads user
src/context/AuthContext.jsx - Authentication API → HTTP and tokens: sends requests
src/services/authService.js - User API → HTTP and tokens: sends requests
src/services/userService.js - HTTP and tokens → WasteLink API: calls API
src/services/apiClient.js - Waste listing wizard → Listing operations: creates listing
src/components/listing/WasteListing.jsx - Waste listing wizard → Vision analysis state: analyses images
src/components/listing/WasteListing.jsx - Vision analysis state → Vision API: requests analysis
src/hooks/useVision.js - AI verification UI → Vision analysis state: uses analysis state
src/components/vision/VisionModule.jsx - Vision API → WasteLink API: calls API
- Waste listing wizard → Pricing API: gets estimate
src/components/listing/WasteListing.jsx - Dynamic pricing → WasteLink API: requests pricing
- Listing operations → HTTP and tokens: sends requests
src/services/ListingService.js - Recycler map → Location lookup: loads locations
src/components/map/MapModule.jsx - Location lookup → Location data service: queries locations
src/hooks/useMapLocations.js - Location data service → Supabase client: reads and writes
src/services/locationService.js - Supabase client → Supabase: connects to
- Recycler matches → WasteLink API: manages matches
- Transactions → WasteLink API: loads history
- Seller / recycler → Recycler map: finds recyclers
- Seller / recycler → Waste listing wizard: lists waste