How mxthor34/rbf-daily-production works
RBF Daily Production collects farm reports in an offline-capable PWA, stores submissions and server-side audit events in Supabase, mirrors them to local CSVs, and renders a Rogue Branch Farm dashboard section. The graph preserves submission, polling, audit, and reporting stages. Source excerpts show the app’s API submission and service-worker registration, the poller’s fetch/merge/write behavior, and dashboard CSV processing; other links rely on the README’s documented architecture.
Main entry points: poll_submissions.py Submission poller · app.js Entry PWA · sw.js Offline app shell · production_section.py Production section
Components 12
Field capture
- Entry PWA
web/app.js - Offline app shell
web/sw.js - Browser local storage
Cloud records
- Supabase
- Production schema
supabase/migrations/20261202000000_create_production_tables.sql
Local bridge
- Submission poller
bridge/poll_submissions.py - Daily production CSV
- Production audit CSV
- Poll state file
Dashboard reporting
- Production section
dashboard/production_section.py - RBF dashboard
Other components
- Farm employee
Connections 14
- Farm employee → Entry PWA: enters reports
README.md - Entry PWA → Browser local storage: queues locally
web/app.js - Entry PWA → Supabase: submits records
web/app.js - Entry PWA → Offline app shell: registers worker
web/app.js - Offline app shell → Offline app shell: caches app shell
web/sw.js - Production schema → Supabase: defines tables
README.md - Supabase → Submission poller: serves submissions
README.md - Submission poller → Supabase: fetches records
bridge/poll_submissions.py - Submission poller → Daily production CSV: writes updates
bridge/poll_submissions.py - Submission poller → Production audit CSV: writes events
bridge/poll_submissions.py - Submission poller → Poll state file: saves polling state
bridge/poll_submissions.py - Daily production CSV → Production section: provides records
dashboard/production_section.py - Production section → RBF dashboard: renders section
README.md - Supabase → Supabase: audit-logs edits
README.md