How thuenen-forest-ecosystems/tfm-server works
TFM Server is a self-hosted Supabase/Postgres backend with PowerSync for local development and data synchronization. The main documented workflow is deploying the services, applying database migrations, and exposing the resulting schema through the REST API. The tree indicates distinct records, inventory, derived-data, and workflow domains, plus authentication and sync configuration. The excerpts do not show most service wiring or SQL behavior, so those relationships are omitted or marked unverified; the migration-classification tool is included as a substantial indexed module, not as runtime application flow.
Main entry points: db Postgres database · config.toml Supabase services · migrations Database migrations · Dockerfile.auth Authentication
Components 16
Backend platform
- Supabase services
supabase/config.toml - Postgres database
volumes/db - Authentication
Dockerfile.auth - REST API
volumes/api
Data domains
- Records
supabase/migrations/20260206000000_records_messages.sql - Inventory archive
supabase/migrations/20250115140817_inventory_archive.sql - Derived calculations
supabase/migrations/20260401000000_derived_calculations.sql - Record workflow
supabase/migrations/20260825000000_workflow_code.sql - Plausibility validation
supabase/TFM/ci2027_plausability_0.0.1.js
Sync and access
- PowerSync
config/powersync.yaml - Sync rules
config/sync_rules.yaml - Auth hook
hook/pull.js - Connection pooler
volumes/pooler/pooler.exs
Schema operations
- Database migrations
supabase/migrations - Migration classifier
scripts/classify-migrations.py
Other components
- Developer
Connections 14
- Developer → Supabase services: starts locally
README.md - Developer → Database migrations: applies migrations
README.md - Database migrations → Postgres database: changes schema
README.md - Postgres database → REST API: serves schema
README.md - Supabase services → PowerSync: starts alongside
README.md - Migration classifier → Database migrations: classifies files
- Records → Postgres database: defines data
- Inventory archive → Postgres database: defines data
- Derived calculations → Postgres database: defines calculations
- Record workflow → Postgres database: defines workflow
- Sync rules → PowerSync: configures sync
- Authentication → Supabase services: integrates with
- Auth hook → Authentication: supports auth
- Connection pooler → Postgres database: pools connections