Glossary: treetracker-field-data

Generated by .github/scripts/build-glossary.mjs from domain-graph.json (source commit 8ffb53c). Do not edit by hand.

This glossary lists the business terms of treetracker-field-data. Each term links to its domain, which says what the domain does, its rules, and its flows. The estate glossary shows which other repos use the same terms.

Terms

Domains

Raw Capture Ingestion

Receives tree photo captures that the Treetracker app uploads and stores them in the field_data raw_capture table with status 'unprocessed'. Each capture belongs to an existing session and gets reference_id set to the id of a mirrored row in the legacy trees table. The domain also lists, reads, and rejects captures through the /raw-captures routes.

Terms: raw_capture, RawCapture, RawCaptureService, session_id, reference_id, rotation_matrix, rejection_reason, status (unprocessed, approved, rejected)

Rules:

Flows:

Session & Track Tracking

Records field data collection sessions on the /session routes and GPS track uploads on the /track routes. A session row links one device_configuration to the originating wallet_registration and carries target_wallet, check_in_photo_url, track_url, organization, start_time and bulk_pack_version; a track row links a locations_url file to a session.

Terms: session, SessionModel, track, Track, device_configuration_id, originating_wallet_registration_id, organization, organization_id, bulk_pack_version, locations_url

Rules:

Flows:

Device Configuration

Stores the phone and app build that a grower used, as rows in the device_configuration table on the /device-configuration routes. Sessions reference these rows, and capture and session reads join them for device_identifier.

Terms: device_configuration, DeviceConfiguration, device_identifier, app_build, app_version, os_version, sdk_version, logged_at

Rules:

Flows:

Wallet Registration

Stores grower wallet registrations made on a device in the wallet_registration table on the /wallet-registration routes: wallet, grower_account_id, names, phone or email, user_photo_url, location and registered_at. A session names its originating wallet registration, and the wallet value identifies the legacy planter.

Terms: wallet_registration, WalletRegistration, wallet, grower_account_id, phone, email, user_photo_url, v1_legacy_organization

Rules:

Flows:

Legacy Database Bridging

Keeps the legacy treetracker database in step with field data during the monolith migration. At runtime it writes a trees row (and tree_attributes rows when given) for each new capture through a second Knex client on DATABASE_URL_LEGACYDB, and rejects legacy trees through the legacy admin API. One-off ETL scripts in database/etl backfill trees.session_id and field_data.wallet_registration from legacy data.

Terms: trees, tree_attributes, planter, planter_registrations, LegacyTree, LegacySession, knexLegacyDB, TREETRACKER_LEGACY_API_URL

Rules:

Flows:

Schema Migrations & Seed Data

Defines and evolves the field data schema with db-migrate (46 up and down SQL files under database/migrations/sqls) and fills development databases with Knex seeds. The domainEvents migrations create the domain_event table, LIST-partitioned by status, with domain_event_sent and domain_event_handled yearly partitions up to 2026; no runtime code under server/ reads or writes these tables. session_segment and the raw_capture root and root_check_processed_at columns also exist only in the schema at this commit.

Terms: db-migrate migration, raw_capture, session, track, wallet_registration, device_configuration, session_segment, domain_event, knex seed

Rules:

Flows: