How charankumarreddyb/foodconnect works
FoodConnect connects donors, recipient organizations, volunteers, and administrators through a location-based food redistribution platform. The user workflow runs from role-based sign-in through finding or posting food, requesting and coordinating delivery, and check-in; administrators also manage platform activity. The graph includes the React client, REST backend, business services, and Firebase integrations. Several domain screens and services are represented by their exact tree paths but were not sampled, so only README-documented links are shown for those areas.
Main entry points: api.ts API client · firebase.ts Firebase client setup · App.tsx Screen router · Auth.tsx Sign-in screen
Components 24
Web client
- Screen router
frontend/src/App.tsx - Sign-in screen
frontend/src/screens/Auth.tsx - Role dashboards
frontend/src/screens - API client
frontend/src/services/api.ts - Notification client
frontend/src/services/notificationService.ts
REST API
- Auth endpoints
backend/src/main/java/com/foodconnect/controller/AuthController.java - Donation endpoints
backend/src/main/java/com/foodconnect/controller/DonationController.java - Domain endpoints
backend/src/main/java/com/foodconnect/controller
Redistribution operations
- Donation logic
backend/src/main/java/com/foodconnect/service/DonationService.java - Request and delivery logic
backend/src/main/java/com/foodconnect/service - Administration
backend/src/main/java/com/foodconnect/service/AdminService.java - Check-in operations
backend/src/main/java/com/foodconnect/service/CheckInService.java - Data repositories
backend/src/main/java/com/foodconnect/repository - Proximity matching
backend/src/main/java/com/foodconnect/util/LocationUtils.java
Identity and security
- Authentication logic
backend/src/main/java/com/foodconnect/service/impl/AuthServiceImpl.java - JWT security
backend/src/main/java/com/foodconnect/security - User lookup
backend/src/main/java/com/foodconnect/security/CustomUserDetailsService.java - SMS provider
Firebase services
- Firebase client setup
frontend/src/config/firebase.ts - Cloud Firestore
- Firebase Authentication
- Push messaging
backend/src/main/java/com/foodconnect/service/FcmService.java - Firebase Storage
Other components
- Platform participants
Connections 22
- Platform participants → Screen router: uses
README.md - Screen router → Sign-in screen: routes to
frontend/src/App.tsx - Screen router → Role dashboards: routes to
frontend/src/App.tsx - Sign-in screen → API client: calls
frontend/src/screens/Auth.tsx - Sign-in screen → Firebase client setup: uses
frontend/src/screens/Auth.tsx - API client → Auth endpoints: REST requests
README.md - API client → Donation endpoints: REST requests
README.md - API client → Domain endpoints: REST requests
README.md - Auth endpoints → Authentication logic: delegates to
backend/src/main/java/com/foodconnect/controller/AuthController.java - Donation endpoints → Donation logic: delegates to
backend/src/main/java/com/foodconnect/controller/DonationController.java - Donation endpoints → JWT security: gets user identity
backend/src/main/java/com/foodconnect/controller/DonationController.java - User lookup → Data repositories: loads user
backend/src/main/java/com/foodconnect/security/CustomUserDetailsService.java - Authentication logic → JWT security: issues JWT
backend/src/main/java/com/foodconnect/service/impl/AuthServiceImpl.java - Authentication logic → SMS provider: sends OTP
backend/src/main/java/com/foodconnect/service/impl/AuthServiceImpl.java - Firebase client setup → Firebase Authentication: authenticates
frontend/src/config/firebase.ts - Firebase client setup → Cloud Firestore: syncs user
frontend/src/config/firebase.ts - Notification client → Firebase client setup: writes notifications
frontend/src/services/notificationService.ts - Request and delivery logic → Cloud Firestore: uses repositories
README.md - Request and delivery logic → Push messaging: dispatches alerts
README.md - Role dashboards → Notification client: uses notifications
- Donation logic → Proximity matching: matches nearby food
README.md - Role dashboards → Firebase Storage: uploads images
README.md