Boxmatch is a Flutter-first surplus food matching platform for exhibition scenarios.
- Enterprise can post leftover food/drinks.
- Recipients can reserve and complete pickup with a 4-digit code.
- Backend is Node.js API deployed on Render.
- Data is stored in Firebase Firestore, with Spark-plan-friendly architecture.
You asked to include analysis for vite.config.ts and src/ core components.
Current repository status:
vite.config.ts: not found in this repo.src/: not found in this repo.- Main app code is under Flutter structure
lib/.
So this context documents the actual structure that exists now.
-
Root app bootstrap and routing:
lib/main.dartlib/app/app.dartlib/app/app_bootstrap.dartlib/app/app_router.dartlib/core/layout/app_shell.dart
-
Feature modules:
lib/features/surplus/presentation/*lib/features/surplus/data/*lib/features/surplus/domain/*
-
Key runtime behavior:
- Firebase init attempted first.
- If Firebase unavailable, app falls back to
InMemorySurplusRepositoryfor local demo mode.
-
API service:
server/index.jsserver/package.json
-
Core endpoints:
GET /healthPOST /enterprise/listings/createPOST /enterprise/listings/:listingId/updatePOST /enterprise/listings/:listingId/validate-tokenPOST /enterprise/listings/:listingId/rotate-tokenPOST /enterprise/listings/:listingId/revoke-tokenPOST /enterprise/listings/:listingId/reservationsPOST /recipient/listings/:listingId/reservePOST /enterprise/listings/:listingId/confirm-pickup
- Render blueprint/service definition:
render.yaml
Current render.yaml highlights:
rootDir: serverbuildCommand: npm cistartCommand: npm starthealthCheckPath: /healthautoDeploy: true
Environment variables expected by backend:
FIREBASE_PROJECT_IDFIREBASE_CLIENT_EMAILFIREBASE_PRIVATE_KEY- Optional:
ENABLE_KPI_EVENT_LOGS
Main collections in active use:
venueslistingsreservationsabuse_signalsidempotency_keyskpi_dailykpi_summary- Optional:
kpi_events(if enabled)
- Product/readme baseline:
README.md
- Ops docs:
docs/ops/environment-matrix.mddocs/ops/deploy-runbook.mddocs/ops/logging-taxonomy.mddocs/ops/release-checklist.mddocs/ops/smoke-test.mddocs/ops/uptime-monitor-setup.md
- Execution tracking:
docs/wiki/30-day-poc-board.md
- Unit/domain/data/widget tests under
test/. - Smoke script for live backend validation:
scripts/smoke_test.sh
- Coverage generated by
flutter test --coverage. - Current workflow now enforces threshold in CI:
.github/workflows/flutter-ci.yml
- Gate rule:
- overall coverage
< 80%=> CI fail.
- overall coverage
Current workflows:
deploy-render.yml- Trigger Render deploy hook on
mainchanges in backend/deploy files.
- Trigger Render deploy hook on
health-probe.yml- Scheduled
/healthprobing.
- Scheduled
release-checklist-gate.yml- Manual release gate with checklist inputs.
flutter-ci.yml- Analyze + tests + coverage threshold enforcement.
-
Render runtime behavior cannot be guaranteed by local code edits only.
- Backend changes must be deployed to Render to validate real behavior.
-
Spark plan limitations still apply.
- Firebase Functions/infra requiring Blaze cannot be used without plan upgrade.
-
Flutter widget test network constraints.
- HTTP in widget tests is mocked and can return error behavior.
- Map tile network rendering is not stable/representative in widget tests.
-
Pilot-day outputs (Day 27-30) need real event data.
- Without real KPI + incidents, final pilot reports and decision memo remain placeholders.
- Deployed backend may drift from local backend code (version mismatch risk).
- No server-side automated migration/compat checks for data shape changes.
- Map/testing behavior differs between local widget tests and real environment.
- Keep
flutter-ci.ymlrequired in branch protection. - Add a backend CI smoke job against staging URL before production deploy.
- Add a short release note template that records deployed backend commit SHA.
- Continue adding high-value tests for enterprise flow edge cases.