{"message":"API Migration Roadmap","version":"2.0.0","architecture":"Domain-Driven Architecture","domains":{"auth":{"description":"Authentication and user management","endpoints":["GET /api/check-auth","POST /api/register","POST /api/refresh-token","POST /api/logout","POST /api/login","GET /api/user","POST /api/user/update"]},"sensors":{"description":"Sensor data management and analytics","endpoints":["POST /api/data","GET /api/data/:sensorId","GET /api/registered-sensors","PUT /api/sensors/:sensorId/update","GET /api/pending-sensors","POST /api/register-sensor"]},"relays":{"description":"Relay control and automation","endpoints":["POST /api/relay/status","GET /api/relay/:device_id/status","PUT /api/relay/:relayId/config","POST /api/relay/register","GET /api/relays/pending","POST /api/relays/:relayId/associate","PUT /api/relay/:relayId"]},"alerts":{"description":"Alert management and notifications","endpoints":["GET /api/rooms/:roomId/alerts","GET /api/projects/:projectId/alerts"]},"projects":{"description":"Project management and collaboration","endpoints":["PUT /api/projects/:id/settings","GET /api/projects/:id/settings","GET /api/projects/:projectId/sensors","POST /api/project","GET /api/projects/:userId","GET /api/projects","POST /api/project","DELETE /api/project/:projectId","GET /api/projects/:projectId/relays","GET /api/projects/:projectId/harvests","POST /api/projects/:id/invite","GET /api/projects/:id/invitations","PUT /api/projects/:id/invitations/:invitationId","POST /api/projects/:projectId/badge-customizations","GET /api/projects/:projectId/badge-customizations","POST /api/projects/:projectId/visitors/register","GET /api/projects/:projectId/visitors","PUT /api/projects/:projectId/visitors/:visitorId","DELETE /api/projects/:projectId/visitors/:visitorId","POST /api/projects/:projectId/visitors/reuse"]},"rooms":{"description":"Room management and environmental control","endpoints":["GET /api/rooms/:roomId/latest","POST /api/room","GET /api/rooms/:projectId","PUT /api/room/:id","DELETE /api/room/:roomId","GET /api/rooms/:id/config","PUT /api/rooms/:id/config","GET /api/rooms/:id/status"]},"utility":{"description":"Utility and maintenance operations","endpoints":["GET /api/update-db","GET /api/available-actions","GET /api/utility/health"]},"admin":{"description":"Administrative operations and user management","endpoints":["PUT /api/admin/update-role","GET /api/admin/users","POST /api/admin/create-user","DELETE /api/admin/delete-user/:userId","GET /api/admin/assignable-roles"]},"harvests":{"description":"Harvest cycle management and tracking","endpoints":["GET /api/harvests","POST /api/harvests","PUT /api/harvests/:harvestId/varieties/:varietyId","PUT /api/harvests/:harvestId","GET /api/projects/:projectId/harvests"]},"employees":{"description":"Employee management and access control","endpoints":["POST /api/projects/:projectId/employees/register","GET /api/projects/:projectId/employees","PUT /api/projects/:projectId/employees/:employeeId","DELETE /api/projects/:projectId/employees/:employeeId","GET /api/projects/:projectId/employees/:employeeId/card","GET /api/employees/:employeeId/schedule"]},"accessControl":{"description":"Access control, entry/exit management, and workstation time tracking","endpoints":["POST /api/register-entry","POST /api/register-exit","POST /api/validate-qr","POST /api/validate-phone","GET /api/access-logs","GET /api/access-logs-paginated","POST /api/access-logs","GET /api/access-logs/:id","PUT /api/access-logs/:id","DELETE /api/access-logs/:id","GET /api/export-access-logs","POST /api/justify-late-entry","POST /api/register-workstation-entry","POST /api/register-break","POST /api/register-workday-end","GET /api/available-actions"]},"unifi":{"description":"UniFi management and integration","endpoints":["POST /api/unifi/register","GET /api/unifi/devices","PUT /api/unifi/devices/:deviceId","DELETE /api/unifi/devices/:deviceId"]}},"migration":{"status":"Nearly Complete","migratedEndpoints":81,"totalEndpoints":83,"remainingEndpoints":2,"progress":"97.6%","remainingWork":["PUT /api/rooms/:roomId/restart-cycle - Room cycle restart","PUT /api/rooms/:id/restart - Room restart"],"description":"This API is nearly fully migrated from legacy monolithic structure to domain-driven architecture. Only 2 room restart endpoints remain to be migrated."},"documentation":{"api":"/api/docs","health":"/api/utility/health","migration":"/api/migration-status"}}