How karishmag83/repack-environment_sustainable_dashboard works
Repack is a sustainable-packaging dashboard: users access order and return views, can choose a return method and follow a return flow, and can view sustainability metrics and manage account preferences. The sampled order hook calculates return counts, CO₂ savings and eco-points while persisting orders locally. The route setup and selected hooks/components are evidenced; page-level wiring for unsampled pages is not assumed.
Main entry points: App.tsx Application routes · AuthContext.tsx Authentication · useLocalStorage.ts Local persistence · useOrders.ts Order state and stats
Components 20
Access and navigation
- Application routes
src/App.tsx - Authentication
src/contexts/AuthContext.tsx - Entry redirect
src/pages/Index.tsx - Login page
src/pages/Login.tsx
Orders and returns
- Orders page
src/pages/Orders.tsx - Order filters
src/components/OrderFilters.tsx - Order card
src/components/OrderCard.tsx - Return flow
src/components/ReturnFlow.tsx - Tracking modal
src/components/TrackingModal.tsx - Order state and stats
src/hooks/useOrders.ts - Order records
src/data/mockOrders.ts - Local persistence
src/hooks/useLocalStorage.ts
Impact dashboard
- Dashboard page
src/pages/Dashboard.tsx - Eco impact chart
src/components/EcoImpactChart.tsx
Account and support
- Profile page
src/pages/Profile.tsx - User settings
src/hooks/useUserSettings.ts - Notification state
src/hooks/useNotifications.ts - Notification panel
src/components/NotificationPanel.tsx - Help page
src/pages/Help.tsx
Other components
- Customer
Connections 14
- Customer → Application routes: opens
- Application routes → Entry redirect: routes
- Application routes → Login page: routes
- Application routes → Orders page: routes
- Application routes → Dashboard page: routes
- Application routes → Profile page: routes
- Application routes → Help page: routes
- Application routes → Authentication: provides auth
- Entry redirect → Authentication: checks session
- Authentication → Customer: stores session
- Order state and stats → Order records: initializes from
- Order state and stats → Local persistence: persists orders
- Notification state → Local persistence: persists notices
- User settings → Local persistence: persists settings