- Add Capacitor core, CLI, and Android platform
- Install plugins: camera, push-notifications, splash-screen, status-bar
- Configure capacitor.config.ts with app ID run.runfoo.veridian
- Update vite.config.ts with base: './' for Capacitor compatibility
- Update api.ts and SessionTimeoutWarning.tsx to detect Capacitor and use production API URL
- Generate Android project structure with Gradle build files
- Added /walkthroughs/today API endpoint
- Show clear status when walkthrough is already completed
- Show 'Continue Walkthrough' for in-progress ones
- Added facility-3d-viewer.md spec
- Installed React Three Fiber dependencies
- Room cards now have colored header backgrounds per type (VEG=green, FLOWER=purple, DRY=amber, CURE=orange, etc.)
- Cards are clickable, linking to /rooms/:id
- New RoomDetailPage with gradient header, sensor metrics with sparklines, active batches list
- Backend: GET /rooms/:id endpoint returns room with batches
Backend:
- Add getBatchById controller with touch points and IPM schedule
- Add GET /batches/:id route
Frontend:
- Update Batch interface to include touchPoints
- BatchDetailPage now uses real touch points from API
- Better error handling on batch load failure
- Removed global onRequest jwtVerify hook
- Added explicit auth check to secure routes (revoke, report)
- Kiosk check-in/out and create visitor are now public
- Added public /badges/:id route with BadgePage component
- Updated VisitorKiosk to display QR code upon check-in
- Backend now returns visitId in check-in response
- Added qrcode.react dependency
- Added ceilingHeight and defaultTiers to FacilityFloor model
- Updated API routes and frontend client
- Updated AddFloorModal with new fields and clearer labels
- Added bi-directional relation between Batch and FacilityPlant in schema.prisma
- Fixed logic in insights.routes.ts to use simplified plant count query
- Fixed duplicate property in messaging.routes.ts findMany filter
- Fixed null/undefined type mismatch in audit.routes.ts extractClientInfo
Photo Management (per specs/photo-management.md):
- Sharp integration for 3-size compression (thumb/medium/full)
- WebP output with 80-90% quality
- Client-side compression with browser-image-compression
- PhotoUpload component with camera/drag-drop support
- Upload API with bulk support and stats endpoint
Testing:
- Backend: Jest tests for all major API endpoints
- Frontend: Vitest tests for utilities and API clients
- CI: Updated Forgejo workflow for test execution
Specs (100% coverage):
- visitor-management.md (Phase 8)
- messaging.md (Phase 9)
- audit-and-documents.md (Phase 10)
- accessibility-i18n.md (Phase 11)
- hardware-integration.md (Phase 12)
- advanced-features.md (Phase 13)
Documentation:
- OpenAPI 3.0 spec (docs/openapi.yaml)
- All endpoints documented with schemas
Added PlantTouchPoint and IPMSchedule models. Implemented touch-points and IPM controllers/routes. Updated frontend with Dashboard feed and IPM widgets.
✅ Backend API Implementation (Phase 1.5)
📁 Files Created:
- backend/src/controllers/walkthrough.controller.ts
- backend/src/routes/walkthrough.routes.ts
🔌 API Endpoints:
- POST /api/walkthroughs - Start new walkthrough
- GET /api/walkthroughs - List walkthroughs (with filters)
- GET /api/walkthroughs/:id - Get walkthrough detail
- POST /api/walkthroughs/:id/complete - Mark complete
- POST /api/walkthroughs/:id/reservoir-checks - Add reservoir check
- POST /api/walkthroughs/:id/irrigation-checks - Add irrigation check
- POST /api/walkthroughs/:id/plant-health-checks - Add plant health check
✨ Features:
- Full CRUD for walkthroughs
- Nested check creation
- User authentication required
- Query filters (status, date range, user)
- Includes related data (user, all checks)
- Error handling
- TypeScript types
🔐 Security:
- Requires authentication (userId from JWT)
- User attribution on creation
- Proper error responses
📊 Response Format:
- Includes user details (name, email, role)
- Includes all checks (reservoir, irrigation, plant health)
- Ordered by date (desc)
⏭️ Next: Frontend UI (4-5 hours)
Build: ✅ Successful