Level 2 of 3 This component, complete on its own. Its files, sources and tests are the detail below. Open the detail
Repository
sprayPath
Planning, compliance and records for any agricultural spray drone, whatever the make: the operator plans, checks, records and remembers; the maker's own app flies. White-label: every operation brings its own brand.
The pre-design set the build follows:
docs/: the system spec, the data model, the epic plan (one epic, 16 phases), the requirements approach, the design directive, the design and market research, the decisions, and the additions to the app requirements.
poc/index.html: the proof of concept. Open it in a browser: every screen of the flow, in light and dark, each carrying what that screen must do. It is the brief for the build.
The data SprayPath reads (parcels, crops, soils, water, airspace, obstacles, weather, labels) comes from the Field Twin ingestion platform, a separate product and repository.
Workspace layout
Path
What it holds
apps/api
NestJS api: config and secrets, forward-only SQL migrations, the Field Twin ingestion seam, notifications, tray media
apps/web
The Command Center PWA (React, Vite), served by nginx in the web image
packages/design
@spraypath/design: tokens, the compiler, Radix components, honest-state components, the map stack
workers
Python workers (uv): the freshness watch
tools/eslint-rules
The no-design-literal rule for ESLint and stylelint
e2e
Playwright: shell, screens, axe per screen and theme, performance report, review captures
contracts
The pinned Field Twin OpenAPI and SprayPath's own generated OpenAPI
infra/terraform
Deployment parameters, the RDS/Redis/S3 data tier and the CloudFront CDN in front of the PWA bucket
Phase 1 delivers notifications in the app only: the header's tray, with the unread count asked for every 30 seconds (UNREAD_POLL_MS) and the list read when the tray opens.
Publishing is transport-neutral. Api code calls NotificationPublisher.publish(draft); a worker appends {notification: <draft JSON>} to the Redis stream NOTIFICATIONS_STREAM. The api's NotificationConsumer (group api) validates each entry, stores it for the tenant and then acknowledges it, so an entry is never lost between the two. An entry that fails validation is logged with its problems and acknowledged. A stalled entry is claimed again after 60 seconds.
A draft is {category, title, body, target, metadata, source}:
category is one of compliance, data_freshness, weather, job, record, system, readiness.