-
Notifications
You must be signed in to change notification settings - Fork 0
Labels
Phase 0Priority 1bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requestproductionChanges for Production Environment and ConfigurationChanges for Production Environment and Configuration
Description
Objective
Conduct a comprehensive codebase review across Database Schema, API, and UI, focusing on all commits in PR #127 (copilot/identify-improve-slow-code branch). The original PR tasked with identifying slow/inefficient and duplicated code requires a fresh, holistic review under the latest Next.js 16 and shadcn UI practices. Integrate the latest documentation from Next.js and Shadcn UI, mapping APIs to UI, checking for missing or malfunctioning components, and providing a clear implementation plan.
Instructions & Scope
- Branch: All checks and improvements should target branch:
copilot/identify-improve-slow-code(PR Reduce code duplication and optimize database queries using parallel execution across API layer, UI components, and codebase - Complete #127). - Scope:
- Review the entire codebase covering:
- Database Schema (Prisma)
- API (Next.js 16)
- UI (Shadcn UI components)
- Audit each commit in PR Reduce code duplication and optimize database queries using parallel execution across API layer, UI components, and codebase - Complete #127 to re-validate the originally stated goals:
- Identify slow or inefficient code
- Find and refactor duplicated code
- Create a detailed summary report (
audit-summary.md) with the following sections:- Inefficiencies & Duplications: List each issue found, referencing file/line/commit where possible.
- API <-> UI Mapping: Map every API endpoint to its UI consumer. Identify any unconnected/missing UI logic.
- Missing Implementations / Broken UI: Identify UI screens that do not properly connect to APIs or malfunction (e.g., pages loading no data).
- Middleware/Proxy Audit: Review all usages of middleware and proxy patterns. Validate changes made during refactors against latest Next.js 16 docs:
- https://nextjs.org/docs/app/getting-started/proxy
- https://nextjs.org/docs/app/api-reference/file-conventions/proxy
- https://nextjs.org/docs/app/guides/backend-for-frontend
- https://nextjs.org/docs/app/guides/authentication#optimistic-checks-with-proxy-optional
- https://nextjs.org/docs/app/api-reference/config/next-config-js/redirects
Identify any incorrect usage (e.g., moving logic from proxy to middleware incorrectly) and note files and fixes needed.
- Implementation Plan: Detailed, step-by-step list for how to refactor/address everything above, referencing the latest Next.js MCP and Shadcn UI MCP tools.
- Dependency Setup & Local Testing:
- Install dependencies and configure
.env.local(follow README.md for correct credentials for Store Owner at bottom of file) - Run dev server, login as Store Owner, and manually QA all routes (especially
/dashboard/stores) for data integrity and UI bugs - Document any discrepancies (e.g., stores not shown on /dashboard/stores while visible elsewhere)
- Install dependencies and configure
- Review the entire codebase covering:
Special Notes
- Follow Copilot agent instructions for build & validation workflow.
- Lint warnings are okay, errors are not.
- No test suite: do not add tests unless asked.
- All Next.js 16 and Shadcn UI implementations should be guided by the latest documentation (search online if needed; use MCP tools for references).
Getting Started
- Review PR Reduce code duplication and optimize database queries using parallel execution across API layer, UI components, and codebase - Complete #127, codebase, and commit history on branch
copilot/identify-improve-slow-code. - Analyze all middleware and proxy files/configs. Ensure refactors do not incorrectly migrate proxy logic to middleware (refer to documentation links provided).
- Install dependencies, configure
.env.local, and run the dev server. Login as Store Owner (see README for credentials). - QA each route: verify all pages load and data is accurate.
- Complete the summary report as
audit-summary.md. - Write a comprehensive implementation plan as the final section.
- Begin implementing fixes per your plan.
Note: Start the above by reviewing, auditing, and documenting — then proceed to implementations step by step after report/planning.
Copilot
Metadata
Metadata
Assignees
Labels
Phase 0Priority 1bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requestproductionChanges for Production Environment and ConfigurationChanges for Production Environment and Configuration
Type
Projects
Status
Done