How lanczu1/ecobud works
ECOBUD is a sustainability-learning and community-action product: members use the mobile app to authenticate, learn, complete challenges, join events, and exchange items; the API handles domain operations and persistence, while administrators manage content and users through a web dashboard. The README also documents public transparency, offline mobile synchronization, and Supabase-powered realtime presence. The graph preserves these major capabilities; some links are documented at product level because their individual route or screen implementations were not sampled.
Main entry points: index.ts Express API · challengeRoutes.ts Challenges · ecobudApi.ts Mobile API client · EcoBudApp.tsx Mobile app
Components 27
Product clients
- Mobile app
apps/mobile/src/app/EcoBudApp.tsx - Mobile auth
apps/mobile/src/features/auth/AuthView.tsx - Home dashboard
apps/mobile/src/app/hooks/useHomeDashboard.ts - Swap marketplace
apps/mobile/src/features/giveAndGet/swapService.ts - Mobile API client
apps/mobile/src/shared/api/ecobudApi.ts - Offline sync
apps/mobile/src/shared/offline/offlineSyncService.ts - Admin dashboard
apps/web/src/App.tsx - Admin API client
apps/web/src/utils/adminApi.ts - Admin management
apps/web/src/components/admin/pages/Challenges.tsx - Public web app
apps/landing/src/App.tsx
API and domain
- Express API
apps/api/src/index.ts - Authentication
apps/api/src/routes/authRoutes.ts - Token service
apps/api/src/security/tokenService.ts - Challenges
apps/api/src/routes/challengeRoutes.ts - Learning
apps/api/src/services/LearnService.ts - Events
apps/api/src/controllers/eventController.ts - Give and Get
apps/api/src/services/swapService.ts - Transparency
apps/api/src/services/TransparencyLedgerService.ts - Admin operations
apps/api/src/controllers/adminController.ts - Notifications
apps/api/src/services/notificationService.ts - Presence queries
apps/api/src/services/presenceQueryService.ts
Persistence and realtime
- PostgreSQL
- Prisma client
apps/api/src/prismaClient.ts - Supabase realtime
apps/api/src/services/supabaseRealtimeService.ts
External services
- Supabase
- Firebase messaging
Other components
- Member
Connections 30
- Member → Mobile app: uses
- Member → Public web app: visits
- Mobile app → Mobile auth: authenticates
- Mobile app → Home dashboard: shows dashboard
apps/mobile/src/app/hooks/useHomeDashboard.ts - Home dashboard → Mobile API client: requests data
apps/mobile/src/app/hooks/useHomeDashboard.ts - Swap marketplace → Mobile API client: calls API
apps/mobile/src/features/giveAndGet/swapService.ts - Home dashboard → Offline sync: syncs offline work
apps/mobile/src/app/hooks/useHomeDashboard.ts - Mobile API client → Express API: sends API requests
- Admin dashboard → Admin management: routes sections
apps/web/src/App.tsx - Admin dashboard → Admin API client: imports client
apps/web/src/App.tsx - Admin API client → Express API: sends API requests
- Express API → Authentication: routes authentication
- Authentication → Token service: uses tokens
apps/api/src/routes/authRoutes.ts - Express API → Challenges: routes challenges
- Challenges → PostgreSQL: reads and writes
apps/api/src/routes/challengeRoutes.ts - Challenges → Prisma client: uses client
apps/api/src/routes/challengeRoutes.ts - Challenges → Admin operations: admin manages
- Express API → Learning: provides learning
- Express API → Events: provides events
- Express API → Give and Get: provides exchanges
- Express API → Transparency: provides transparency
- Admin management → Admin API client: uses API client
apps/web/src/components/admin/pages/Challenges.tsx - Admin operations → PostgreSQL: reads and writes
apps/api/src/controllers/adminController.ts - Admin operations → Prisma client: uses client
apps/api/src/controllers/adminController.ts - Notifications → Supabase realtime: publishes updates
apps/api/src/services/notificationService.ts - Notifications → Firebase messaging: sends messages
apps/api/src/services/notificationService.ts - Presence queries → PostgreSQL: queries presence
apps/api/src/services/presenceQueryService.ts - Presence queries → Supabase: supports live sync
- Supabase realtime → Supabase: uses realtime layer
- Mobile API client → Supabase: configures realtime