Initial commit of Descrybe v2 without local scratch artifacts.

Drop one-shot tmp/axe scripts and agent i18n scratch so the Gitea tree is deployable.
This commit is contained in:
2026-08-09 22:47:43 +02:00
commit 8580c996c3
1285 changed files with 325780 additions and 0 deletions
+58
View File
@@ -0,0 +1,58 @@
# Descrybe v2 easy expansions
High-value, low-complexity catalog→sell expansions shipped without new DB tables.
## Navigation groupings
Dashboard sidebar (primary + More):
| Area | Links |
|------|--------|
| **Primary** | Dashboard, Products, **Stores** (`/stores`), Export, Billing |
| **More → Marketing** | Campaigns, Calendar, SEO, Brand, Reviews |
| **More → Catalog** | Categories, Attributes, Standard Fields |
| **More → Ops** | Processing, Settings, AI provider, Email sending, Admin |
Stores hub cards: WooCommerce, Shopify (sibling), Feed URL, CSV upload, Export/REST.
Connector contract: [store-connectors.md](store-connectors.md).
## Collision note
Email campaigns own `/campaigns` and `/api/campaigns`. Content calendar uses:
- UI: `/marketing/calendar`
- API: `GET/POST /api/marketing/calendar` (+ `/api/v1/marketing/calendar` for API keys)
Do **not** mount content calendar under `/api/v1/campaigns` or `/campaigns`.
## 1. Content calendar stub
- **UI:** `/marketing/calendar`
- **Presets:** Black Friday (week around BF), Christmas (Dec 126), computed per year
- **Persistence:** Campaign meta is stored on the export feed `template._campaign` JSON (no migration)
- **API:**
- `GET /api/marketing/calendar?year=2026` — presets + prepared campaigns for the company
- `POST /api/marketing/calendar/prepare` — body `{ "preset_id": "black_friday" | "christmas", "year"?, "format"?: "csv"|"xml", "force_new"?: boolean }`
## 2. Product quality score
- **UI:** Quality column on the products list (0100 badge + tooltip of missing SEO/completeness checks)
- **Weights:** title 20, description 20, meta title 15, meta description 15, category 10, attributes 10, image 10
- **Lib:** `apps/api/internal/marketing/quality.go`
- **API:**
- `GET /api/products/quality` (and `/api/v1/products/quality`) — paginated products with `quality_score` / `quality_grade` / `quality_checks`
- Optional `?min_score=60`
- Also exposed on `GET /api/products` (processed) via `quality_score` / `quality_grade` / `quality_checks`
## 3. One-click Prepare Black Friday
- **Dashboard:** “Prepare Black Friday” button creates (or reuses) a CSV export feed named `Black Friday {year}` with Google Shopping-style default mappings and calendar dates in `template._campaign`
- **Also:** Content Calendar cards call the same prepare endpoint
- **Idempotent:** Re-prepare returns the existing feed unless `force_new` is set
## Verification
```bash
cd apps/api && go test ./internal/marketing/ && go build ./...
cd apps/web && npm run check
```