How mwahidcodes/shareforgood-fyp works
Share For Good is a donation platform for cash and goods, with account verification, product bidding, and administrator review. Its principal workflow is that donors or people requesting help use the marketplace forms; administrators review verification and requests, while donors can also participate in auctions. Cash donations can use Stripe checkout, and product images are screened by the backend through Sightengine. The README only describes Create React App setup; page-level wiring beyond the sampled routes and source is not fully verified.
Main entry points: App.jsx React app and routes · server.js Express backend · supabaseClient.js Supabase client · BiddingGallery.jsx Bidding gallery
Components 24
Application
- React app and routes
src/App.jsx - Shared layout
src/components/Layout.jsx - Route protection
src/components/ProtectedRoute.jsx - Account and profile
src/pages - Public marketplace
src/pages/HomePage.jsx
Donations and Requests
- Cash requests
src/pages/CashRequestForm.jsx - Product requests
src/pages/ProductRequestForm.jsx - Product donations
src/pages/ProductDonationForm.jsx - Cash donations
src/pages/CashDonationForm.jsx - Browse products
src/pages/ProductBrowse.jsx
Review and Auctions
- Document verification
src/components/VerificationFormModal.jsx - Bidding gallery
src/pages/BiddingGallery.jsx - Admin review
src/pages/AdminPanel.jsx
Backend and Services
- Supabase client
src/supabaseClient.js - Supabase
- Notification utilities
src/utils/notifications.js - Express backend
server.js - Stripe session handler
api/create-stripe-session.js - Stripe
- Sightengine moderation
Other components
- Visitor
- Donor
- Recipient
- Administrator
Connections 25
- Visitor → React app and routes: opens
- Donor → React app and routes: opens
- Recipient → React app and routes: opens
- Administrator → React app and routes: opens
- React app and routes → Shared layout: renders routes
- React app and routes → Public marketplace: routes to
- React app and routes → Route protection: guards routes
- React app and routes → Cash requests: routes to
- React app and routes → Product requests: routes to
- React app and routes → Product donations: routes to
- React app and routes → Browse products: routes to
- React app and routes → Admin review: routes to
- React app and routes → Bidding gallery: routes to
- React app and routes → Account and profile: routes to
- Document verification → Supabase client: uploads and queries
- Supabase client → Supabase: accesses
- Bidding gallery → Supabase client: reads and updates
- Bidding gallery → Notification utilities: creates alerts
- Admin review → Supabase client: reviews records
- Admin review → Notification utilities: notifies users
- Cash donations → Express backend: requests checkout
- Express backend → Stripe session handler: dispatches
- Stripe session handler → Stripe: creates session
- Product donations → Express backend: requests screening
- Express backend → Sightengine moderation: screens image