Boxmatch is a lightweight surplus-food matching app for exhibitions. Enterprises can post leftover lunchboxes or drinks, and nearby users can reserve for pickup.
- Listing feed + map view (OpenStreetMap) for curated exhibition venues.
- Enterprise posting flow with minimal public profile fields.
- No-login enterprise edit flow using secure tokenized edit links.
- Recipient reserve flow with disclaimer confirmation and 4-digit pickup code.
- Spark-friendly expiry handling: realtime updates + 30-minute client reconciliation.
- Donation-first model (
price = 0) with schema ready for low-price offers later.
Collections used:
venueslistingsreservationsabuse_signalskpi_dailykpi_summarykpi_events(optional, controlled by backend env)
See firestore.rules and firestore.indexes.json for starter Firebase config.
flutter pub get
flutter runThe app attempts Firebase initialization first. If Firebase is not configured in the current environment, it automatically falls back to local in-memory demo mode so development can continue.
To enable Firebase mode in production:
- Create a Firebase project.
- Add platform configs (
google-services.json,GoogleService-Info.plist, etc.). - Deploy Firestore rules/indexes.
This project now uses a standalone Node API in server/ (Render deploy) instead of Firebase Functions, so you can stay on Firebase Spark plan.
Set your API URL when building/running Flutter:
flutter run --dart-define=BOXMATCH_API_BASE_URL=https://<your-render-service>.onrender.comWeb app deploy is automated by:
.github/workflows/deploy-pages.yml
On every push to main, CI builds Flutter web and deploys to GitHub Pages.
One-time setup in GitHub:
- Repo
Settings->Pages Build and deployment->Source=GitHub Actions- (Optional) add repo secret
BOXMATCH_API_BASE_URLif you want a non-default API URL in web build
From repo root:
cd server
npm run export:kpi:7d
npm run export:kpi:30dflutter analyze
flutter test- CI workflow:
.github/workflows/flutter-ci.yml - Rule: overall coverage is calculated from
coverage/lcov.info. - Fail condition: CI fails when overall coverage is below 80%.
- CI workflow:
.github/workflows/backend-ci.yml - Job:
Backend Tests (Jest) - Fail condition: any backend lint/test failure blocks this check.
To enforce merge blocking in GitHub:
Settings->Rules-> create/edit ruleset formain- Enable
Require status checks to pass - Add required checks:
test-and-coverage(from Flutter CI)Backend Tests (Jest)(from Backend CI)
- Keep
Require branches to be up to date before mergingenabled
Production deploy gate workflow:
.github/workflows/release-checklist-gate.yml- checklist doc:
docs/ops/release-checklist.md
Generate multiple demo listings/reservations via backend API Optional knobs:
SEED_LISTING_COUNT(default6)SEED_RESERVE_COUNT(default3)SEED_CONFIRM_COUNT(default1)
- 30-day POC board for GitHub Wiki:
Recommended run order in collection:
HealthEnterprise - Create listingEnterprise - Validate tokenRecipient - Reserve listingRecipient - Reserve replay (same idempotency key)Recipient - List my reservationsRecipient - Cancel reservationEnterprise - List reservationsEnterprise - Update listingEnterprise - Confirm pickupEnterprise - Rotate tokenEnterprise - Revoke token
Collection tests auto-save listingId, token, reservationId, pickupCode for downstream requests.