# Jomblo Product Guidelines

Standards for ensuring quality and consistency.

## Definition of Done (DoD)
- [ ] Feature implemented as per `spec.md`.
- [ ] UI redesign follows `uncodixfy` and `shadcn` patterns.
- [ ] 100% test coverage (verified via `pnpm test:coverage`).
- [ ] Zero linting (`pnpm run lint`) or type (`pnpm tsc`) errors.
- [ ] Mobile/Responsive check passed on all layouts.
- [ ] Verified via Anti-Mocking E2E (Playwright).

## Validation Scenarios ('What-If')
- **Scenario A**: Database connection fails during a CRUD operation (Graceful degradation).
- **Scenario B**: Malicious input is submitted (Zod sanitization).
- **Scenario C**: Concurrent updates to a single product (Optimistic/Pessimistic locking).
- **Scenario D**: Multi-system sync failure (e.g., Redis fails after Postgres update). Logical atomicity must ensure rollback or eventual consistency.
- **Scenario E**: PII Leakage in Logs. All logging must be rigorously audited to ensure zero exposure of user emails, addresses, or phone numbers.

## Architectural Boundaries
- **UI -> Repository**: Forbidden. UI components must never import from `lib/db/repositories`.
- **UI -> Server Action**: Mandated for data mutations.
- **Domain -> Infrastructure**: Business logic must be agnostic of implementation details.
