Added PlantTouchPoint and IPMSchedule models. Implemented touch-points and IPM controllers/routes. Updated frontend with Dashboard feed and IPM widgets.
2.1 KiB
2.1 KiB
Phase 2: Plant Touch Points & IPM - Implementation Plan
Goal
Implement the "Plant Touch Points" system and "IPM Tracking" as defined in specs/plant-touch-points-ipm.md. We will break this into short, manageable sprints.
🏃 Sprint 1: Core Touch Point Foundation (Current Focus)
Objective: Build the backend and basic UI to allow staff to record simple interactions (Water, Feed, Prune, etc.).
Tasks
- Database:
- Update
schema.prismawithPlantTouchPointmodel andTouchPointTypeenum. - Run database migration.
- Update
- Backend:
- Create
PlantTouchPointcontroller withcreateandlistendpoints. - Register routes.
- Create
- Frontend:
- Create API client functions for touch points.
- Create a "Quick Actions" FAB (Floating Action Button) or Widget on the main dashboard.
- Implement a simple form to record a touch point (Type + Notes).
🏃 Sprint 2: IPM Scheduling Engine
Objective: Implement the 10-day root drench cycle logic and tracking.
Tasks
- Database:
- Update
schema.prismawithIPMSchedulemodel. - Run migration.
- Update
- Backend:
- Create logic to calculate next treatment dates (Day 0, 10, 20...).
- Create endpoints to
getSchedulesandlogTreatment.
- Frontend:
- Create "IPM Status" widget showing active schedules and "Due" badges.
- Implement the "Record Treatment" flow (validating Pyganic 5.0 usage).
🏃 Sprint 3: History & Visualization
Objective: Allow growers to view the history of interactions and style the UI.
Tasks
- Frontend:
- Build "Batch History" view (timeline of touch points).
- Refine UI with 777 Wolfpack branding (Palm Springs aesthetic).
- Add icons/visuals for different touch types.
❓ Clarifications Needed
- Batches: Do we already have a
Batchmodel in the DB? The spec referencesbatchId. If not, we might need a simpleBatchmodel or allowbatchIdto be a loose string/placeholder for now.- Self-correction: I should check
schema.prismanow to see ifBatchexists.
- Self-correction: I should check