Commit graph

6 commits

Author SHA1 Message Date
fullsizemalt
e538227458 feat: Daily Walkthrough Backend API Complete
 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
2025-12-09 14:10:14 -08:00
fullsizemalt
9dc0586d67 feat: Sprint 2 Phase 1 - Auth Core Complete
 Implemented:
- Password hashing with bcrypt (salt rounds = 10)
- JWT token generation (access 15m, refresh 7d)
- Updated login endpoint to return access + refresh tokens
- Added refresh and logout endpoints
- Updated seed script with hashed passwords
- Added test users for all roles (OWNER, MANAGER, GROWER, STAFF)

📝 Files Added/Modified:
- backend/src/utils/password.ts (NEW)
- backend/src/utils/jwt.ts (NEW)
- backend/src/controllers/auth.controller.ts (UPDATED)
- backend/src/routes/auth.routes.ts (UPDATED)
- backend/prisma/seed.js (UPDATED - now hashes passwords)
- CREDENTIALS.md (UPDATED - all test users documented)

🔐 Test Users:
- admin@runfoo.run (OWNER)
- manager@runfoo.run (MANAGER)
- grower@runfoo.run (GROWER)
- staff@runfoo.run (STAFF)
All passwords: password123

⏭️ Next: Auth middleware + RBAC
2025-12-09 13:52:54 -08:00
fullsizemalt
5890732667 fix: Align health check path with Nginx proxy 2025-12-09 11:56:04 -08:00
fullsizemalt
d06bf0defa fix: Switch to @fastify/jwt for proper types
Some checks failed
Deploy to Production / deploy (push) Failing after 0s
Test / backend-test (push) Failing after 0s
Test / frontend-test (push) Failing after 0s
2025-12-09 10:57:54 -08:00
fullsizemalt
6b724386ba feat: Phase 1 Complete (Backend + Frontend)
Some checks failed
Deploy to Production / deploy (push) Failing after 0s
Test / backend-test (push) Failing after 0s
Test / frontend-test (push) Failing after 0s
2025-12-09 09:24:00 -08:00
fullsizemalt
9c5ffec28d fix: Add missing project files for backend/frontend build
Some checks failed
Deploy to Production / deploy (push) Failing after 0s
Test / backend-test (push) Failing after 0s
Test / frontend-test (push) Failing after 0s
2025-12-09 00:23:28 -08:00