# Implementation Plan: Jomblo 2-Wochen GO-LIVE & Qualitäts-Sprint

## Phase 1: Scout & Fix (The "All-Scan" Phase) [Day 1-3]

### Task 1: TypeScript & Linting Audit (Day 1) [checkpoint: 7e4a557] [Skills: Strictness-Auditor] [MCP: Shell]
- [x] **[Scout]** Run `pnpm run lint` and `tsc --noEmit` to gather all current errors/warnings.
- [x] **[Scout]** Check `eslint.config.mjs` and `tsconfig.json` for strictness settings.
- [x] Fix all TypeScript errors (automated batch fixing where possible).
- [x] Fix all ESLint warnings/errors (focus on React Hooks and Imports).
- [x] **[Quality Gate]** Verify zero errors in `pnpm run lint` and `tsc --noEmit`.

### Task 2: Architecture & Pattern Audit (Day 2) [Skills: Repository-Pattern-Enforcer] [MCP: FileSystem]
- [x] **[Scout]** Scan `app/` for any server action that does not use `createServerAction`.
- [x] **[Scout]** Scan `actions/` and `app/` for raw SQL queries or direct DB access (not using repositories).
- [x] Refactor non-standard Server Actions to use the standard wrapper.
- [x] Refactor raw SQL calls into the appropriate repository classes in `lib/db/repositories/`.
- [x] **[Scout]** Check Zod schemas for numeric coercion issues (`z.coerce.number()`).
- [x] **[Quality Gate]** Verify that all actions pass validation and return standardized responses.

### Task 3: UI/UX & Mobile Responsiveness Audit (Day 3) [Skills: Optimizing-Mobile-UX] [MCP: Browser]
- [x] **[Scout]** Scan dashboard and shop views on 320px, 768px, and 1024px widths using Playwright/DevTools.
- [x] Identify and fix layout overflows or missing `flex-wrap` in sidebars.
- [x] **[Scout]** Check for "mounted" status in components with dynamic IDs (e.g., Radix UI) to prevent hydration mismatches.
- [x] Verify skeletons are displayed during all async data fetches.
- [x] **[Quality Gate]** Pass visual verification on mobile and tablet emulators.

## Phase 2: Quality & Security (Week 1) [Day 4-7]

### Task 4: Anti-Mocking Test Sprint (Admin Product CRUD) [Skills: Testing-Code] [MCP: Shell]
- [x] **[Scout]** Locate existing tests for product CRUD in `tests/` or `app/api/`.
- [x] **[Write Failing Tests]** Create integration tests for Product creation, update, and deletion using real DB instances.
- [x] Implement `resetPool()` in `lib/db.ts` to allow isolated test environments.
- [x] **[Implement]** Ensure 100% coverage for the product management flow.
- [x] **[Quality Gate]** Run `pnpm test` and verify coverage reports.

### Task 5: Performance & UI State Optimization [Skills: Applying-DRY-Principles] [MCP: FileSystem]
- [x] **[Scout]** Audit `hooks/` and `components/` for missing `useMemo` or `useCallback` in complex state syncs.
- [x] Wrap charts and BI summaries in `Suspense` with high-quality Skeletons.
- [x] **[Quality Gate]** Measure P95 load times for the main dashboard (target <1s).

### Task 6: Security Audit & Dependency Check [Skills: Securing-Applications] [MCP: Shell]
- [x] **[Scout]** Run `pnpm audit` to identify vulnerable dependencies.
- [x] Verify that all API routes and Server Actions have proper authorization checks.
- [x] **[Quality Gate]** Resolve all High/Critical audit findings.

## Phase 3: Final Polish & Go-Live (Week 2) [Day 8-14]

### Task 7: Aesthetic Refinement & Final Verification [Skills: Styling-UI-UX] [MCP: Browser]
- [x] Apply `Uncodixfy` standards to all new or modified UI elements.
- [x] Final end-to-end "Go-Live" walkthrough.
- [x] **[Quality Gate]** Final user manual verification for Phase 3.
