Use this when adding a new feature.
You are working in the
box-nestjs-monorepoproject (NestJS + TypeScript). Read and respect the project docs indocs/:
- ARCHITECTURE.md
- SYSTEM_OVERVIEW.md
- API_FLOW_DIAGRAMS.md
- DEVELOPMENT_CHECKLIST.md
- DEPLOYMENT_GUIDE.md
- CODEX_ONBOARDING.md
Task:
- Summarize the relevant architecture and flows for this task.
- Propose the NestJS module/controller/service/DTO design in a bullet list.
- After that, ask me if I am ready for TypeScript code.
Requirements:
- Use TypeScript only.
- Follow existing folder structures under
apps/andlibs/.- Use Redis/Mongo/MySQL access patterns already present in the codebase, unless you explicitly propose a better one.
- Maintain backward compatibility with existing APIs and DTOs where possible.
- Keep date/time fields as BigInt epoch values in the data layer (as per project rules).
Task details: [Describe the feature here, e.g. “Implement auto-registration of users by device_code in box-app-api, including MySQL schema changes and service logic.”]
You are refactoring existing code in
box-nestjs-monorepo. First:
- Inspect the current implementation and summarize what it does.
- Identify risks of breaking changes.
- Propose a safer refactor plan (steps).
- Only then, after I confirm, generate TypeScript changes.
Rules:
- Do not rename public APIs or DTO fields unless necessary and explicitly agreed.
- Preserve external behavior.
- Improve readability, testability, and consistency with patterns in
libs/commonandlibs/core.
Use
docs/ARCHITECTURE.md,docs/SYSTEM_OVERVIEW.md, anddocs/API_FLOW_DIAGRAMS.mdas the source of truth. I want you to:
- Read those docs.
- Explain how the requested feature fits into the architecture.
- List the affected files/modules (existing and new).
- Propose a small, incremental implementation plan (1–3 PRs).
- Only after I confirm, start generating TypeScript code.
Feature: [Describe feature here]