2.3 KiB
2026-06-28T21:21:36Z
You are the Worker for Milestone 2: Backend & DB. Your working directory is /home/ti/git/homaroma/.agents/worker_m2_1. Your task is to implement the backend and database changes for the Premium Mega Menu.
Please perform the following steps:
- Update
apps/backend/prisma/schema.prisma:- Add
rootImage String?to theMenumodel. - Add
columnImage String?andhoverImage String?to theMenuItemmodel.
- Add
- Run database migration:
- Run
bunx prisma migrate dev --name add_menu_image_fieldsinsideapps/backend/. - Ensure the Prisma client is regenerated.
- Run
- Update
packages/types/index.ts:- Update the
MenuIteminterface to include optionalcolumnImage?: string | nullandhoverImage?: string | null. - Update the
Menuinterface to include optionalrootImage?: string | null.
- Update the
- Update
apps/backend/src/routes/menus.ts:- Modify the request schema validation (using Elysia TypeBox validator
t) and payload parsing in both the POST/and PUT/:nameroutes to supportrootImage,columnImage, andhoverImagefields. - Modify database transaction block in PUT
/:nameto insert/update the new fields (columnImage,hoverImage) for menu items, and updaterootImagefor the menu.
- Modify the request schema validation (using Elysia TypeBox validator
- Update MCP Server files if needed:
- Check and update
apps/mcp-server/menu-tools.tshelper functionvalidateMenuItemsto supportcolumnImageandhoverImage(both string or null). - Check and update
apps/mcp-server/menu-toolkit.tsto addrootImage,columnImage, andhoverImageto theupsert_menutool schema definition, pass them in case "upsert_menu" handler to backend request, and displayrootImagein dryRun preview.
- Check and update
- Verify backend compilation:
- Run typechecks and builds for backend, types, and mcp-server. Ensure no errors.
Write a progress report outlining exactly what files were modified, and the build results to /home/ti/git/homaroma/.agents/worker_m2_1/handoff.md.
MANDATORY INTEGRITY WARNING: DO NOT CHEAT. All implementations must be genuine. DO NOT hardcode test results, create dummy/facade implementations, or circumvent the intended task. A Forensic Auditor will independently verify your work. Integrity violations WILL be detected and your work WILL be rejected.
Once finished, send a message back with the path to your handoff.md and a summary of your results.