13 KiB
BRAND MIGRATION — TASKS.md
Phase 1: Asset Extraction
BRAND-FE-001
ID: BRAND-FE-001 Title: Extract legacy CSS and brand colors Goal: Get exact hex values from mercadodevida.es stylesheet Why: Do not approximate brand colors Dependencies: None Applications: Frontend, Admin Modules: Design tokens Database impact: None API contracts: None Permissions: N/A Implementation: Inspect legacy site CSS via DevTools or curl; compare with current tokens; update @theme if needed Tests: Visual comparison of legacy vs new site colors Expected blast radius: Low — purely visual Definition of Done: Extracted colors documented in BRAND_INVENTORY.md; any divergence from current tokens identified
BRAND-FE-002
ID: BRAND-FE-002 Title: Download official logo Goal: Get highest quality logo from legacy site Why: No AI reconstruction or approximation allowed Dependencies: BRAND-FE-001 Applications: Frontend, Admin Modules: Public assets Database impact: None API contracts: None Permissions: N/A Implementation: Find logo image URL from legacy HTML; download SVG/PNG; save to /public/images/; generate favicon variants Tests: Logo renders at correct size in Header and Footer; favicon loads Expected blast radius: Low Definition of Done: Logo file exists in /public/images/; renders in Header, Footer, and Admin sidebar
Phase 2: Business Configuration
BRAND-FE-003
ID: BRAND-FE-003
Title: Create businessConfig constant
Goal: Single source of truth for company information
Why: No duplicate address/phone/email strings
Dependencies: BRAND-FE-001
Applications: Frontend (all pages)
Modules: frontend/src/lib/businessConfig.ts
Database impact: None
API contracts: None
Permissions: N/A
Implementation: Create businessConfig.ts with all known company info; use as const for type safety; mark social URLs as null pending extraction
Tests: businessConfig type check; usage in Footer, Header, Contact, About, Checkout confirmation
Expected blast radius: Frontend text content
Definition of Done: All company info references businessConfig; no hardcoded strings in components
Phase 3: Storefront Brand Application
BRAND-FE-004
ID: BRAND-FE-004 Title: Update Header with logo + business config Goal: Header reflects official brand identity Why: Primary brand touchpoint Dependencies: BRAND-FE-002, BRAND-FE-003 Applications: Frontend Modules: Header component Database impact: None API contracts: None Permissions: N/A Implementation: Replace inline SVG logo with actual logo file; use businessConfig for nav text; verify no hardcoded strings remain Tests: Logo renders; nav links correct; business name in correct places Expected blast radius: Low Definition of Done: Header matches brand; logo correct size and quality
BRAND-FE-005
ID: BRAND-FE-005 Title: Update Footer with full business info + social Goal: Footer contains all business contact information Why: Trust and legal requirement (company info on all pages) Dependencies: BRAND-FE-002, BRAND-FE-003 Applications: Frontend Modules: Footer component Database impact: None API contracts: None Permissions: N/A Implementation: Use businessConfig for all footer data; add social links; add company registration info; verify copyright year is dynamic Tests: All footer fields populated from businessConfig; no placeholder text Expected blast radius: Low Definition of Done: Footer contains address, phone, email, WhatsApp, hours, social, legal links, dynamic copyright
BRAND-FE-006
ID: BRAND-FE-006 Title: Migrate About page content Goal: Faithful migration of /quienes-somos content Why: Preserve founder story and brand voice Dependencies: BRAND-FE-003 Applications: Frontend Modules: /about page Database impact: None API contracts: None Permissions: N/A Implementation: Replace current /about content with migrated content from BRAND_INVENTORY.md; use ContentPage component; add legal flag comment Tests: Page renders migrated content correctly; text fidelity verified Expected blast radius: Low Definition of Done: About page matches legacy /quienes-somos; founders' story preserved; noted as needing legal review if claims made
BRAND-FE-007
ID: BRAND-FE-007 Title: Update Contact page Goal: Contact information from businessConfig + contact form Why: Customer trust; functional contact channel Dependencies: BRAND-FE-003 Applications: Frontend Modules: /contact page Database impact: None API contracts: None Permissions: N/A Implementation: Use businessConfig for all contact info; add functional contact form (mailto or API endpoint); include map/location if feasible; hours from businessConfig Tests: All contact methods displayed; form submits successfully Expected blast radius: Low Definition of Done: Phone, email, WhatsApp, address, hours all correct and functional
BRAND-FE-008
ID: BRAND-FE-008 Title: Migrate/create legal pages (Terms, Privacy, Cookies) Goal: Legal pages exist with migrated or new content Why: Legal compliance; customer trust Dependencies: None (can run parallel) Applications: Frontend Modules: /terms, /privacy, /cookies pages Database impact: None API contracts: None Permissions: N/A Implementation: For Terms: migrate from legacy (see BRAND_INVENTORY.md); for Privacy/Cookies: create RGPD-compliant templates; add ⚠️LEGAL_REVIEW flag to all; use ContentPage component Tests: All three pages accessible at correct routes; content renders; links in footer correct Expected blast radius: Low Definition of Done: Pages exist and are accessible; flagged as needing legal review; legal links work
BRAND-FE-009
ID: BRAND-FE-009 Title: Migrate/create Shipping page Goal: Shipping policy accessible Why: Customer information requirement Dependencies: BRAND-FE-003 Applications: Frontend Modules: /shipping page Database impact: None API contracts: None Permissions: N/A Implementation: Review existing /shipping page; enhance with additional shipping methods, costs, estimated delivery times, geographical coverage (Spain peninsular); use businessConfig for company info Tests: Shipping page complete with all delivery options; pricing included if applicable Expected blast radius: Low Definition of Done: Shipping page reflects current shipping policy; clear geographic scope stated
Phase 4: SEO Redirects
BRAND-FE-010
ID: BRAND-FE-010
Title: Implement legacy URL redirects in next.config.ts
Goal: Preserve SEO equity; no broken links for indexed URLs
Why: Indexed legacy URLs must not 404
Dependencies: Complete LEGACY_REDIRECT_MAP.md
Applications: Frontend (Next.js config)
Modules: next.config.ts
Database impact: None
API contracts: None
Permissions: N/A
Implementation: Add redirects() async function in next.config.ts; implement all confirmed 308 redirects from LEGACY_REDIRECT_MAP.md; handle OpenCart route patterns with 410
Tests: curl each legacy URL → correct redirect or target page
Expected blast radius: Low — purely routing
Definition of Done: All legacy static page URLs redirect correctly; OpenCart query-string routes return 404
BRAND-FE-011
ID: BRAND-FE-011 Title: Product slug redirects Goal: Redirect legacy product URLs to new product pages Why: Preserve SEO on indexed product pages Dependencies: BRAND-FE-010 (part of same config update) Applications: Frontend Modules: next.config.ts Database impact: None API contracts: None Permissions: N/A Implementation: Evaluate Option A vs B from LEGACY_REDIRECT_MAP.md; implement accordingly Tests: At least 5 legacy product URLs from sitemap → correct redirect Expected blast radius: Low Definition of Done: Legacy product slugs handled (either redirect to matching slug or to /products)
Phase 5: Admin
BRAND-ADM-001
ID: BRAND-ADM-001 Title: Admin sidebar logo Goal: Admin sidebar uses real logo instead of inline SVG Why: Brand consistency Dependencies: BRAND-FE-002 Applications: Admin Modules: DashboardLayout sidebar Database impact: None API contracts: None Permissions: N/A Implementation: Copy logo to apps/admin/public/; update sidebar to use instead of inline SVG Tests: Logo visible in admin sidebar Expected blast radius: Low Definition of Done: Admin sidebar shows actual logo; correct size
SEO
BRAND-SEO-001
ID: BRAND-SEO-001 Title: Sitemap update after migration Goal: New sitemap reflects migrated routes Why: Search engine indexing Dependencies: BRAND-FE-006, BRAND-FE-007, BRAND-FE-008, BRAND-FE-009, BRAND-FE-010 Applications: Frontend Modules: sitemap.ts Database impact: None API contracts: None Permissions: N/A Implementation: Update frontend/src/app/sitemap.ts to include /about, /contact, /shipping, /terms, /privacy, /cookies; verify /products and /categories still included Tests: sitemap.xml accessible; contains all expected routes Expected blast radius: Low Definition of Done: Sitemap valid XML; includes all public routes
BRAND-SEO-002
ID: BRAND-SEO-002 Title: robots.txt update Goal: Allow crawlers for new routes; block legacy OpenCart routes Why: SEO and security Dependencies: BRAND-FE-010 Applications: Frontend Modules: robots.ts Database impact: None API contracts: None Permissions: N/A Implementation: Update robots.ts to reflect new site structure; add Sitemap directive pointing to new sitemap Tests: /robots.txt accessible; correct directives present Expected blast radius: Low Definition of Done: robots.txt allows crawling of all public pages; blocks admin and legacy internals
QA
BRAND-QA-001
ID: BRAND-QA-001 Title: Visual regression and route tests Goal: Brand elements render correctly; redirects work Why: Quality assurance Dependencies: All FE/ADM tasks Applications: QA Modules: E2E or visual tests Tests:
- Logo renders on Header, Footer, Admin sidebar
- Footer contains all business contact info from businessConfig
- About page renders migrated content
- Legacy redirects: /quienes-somos → /about (308), /contacto → /contact (308)
- Sitemap contains all public routes
- No hardcoded company info outside businessConfig Expected blast radius: N/A Definition of Done: All tests pass; visual QA sign-off
Task Summary Table
| Task | Layer | Feature | Depends On | Risk | Parallel |
|---|---|---|---|---|---|
| BRAND-FE-001 | FE | Extract legacy CSS | — | Low | * |
| BRAND-FE-002 | FE | Download logo | BRAND-FE-001 | Low | * |
| BRAND-FE-003 | FE | businessConfig | BRAND-FE-001 | Low | * |
| BRAND-FE-004 | FE | Header update | BRAND-FE-002, BRAND-FE-003 | Low | * |
| BRAND-FE-005 | FE | Footer update | BRAND-FE-002, BRAND-FE-003 | Low | * |
| BRAND-FE-006 | FE | About page | BRAND-FE-003 | Low | * |
| BRAND-FE-007 | FE | Contact page | BRAND-FE-003 | Low | * |
| BRAND-FE-008 | FE | Legal pages | — | Medium | * |
| BRAND-FE-009 | FE | Shipping page | BRAND-FE-003 | Low | * |
| BRAND-FE-010 | FE | Static page redirects | BRAND-FE-001 | Low | BRAND-FE-006..009 |
| BRAND-FE-011 | FE | Product slug redirects | BRAND-FE-010 | Medium | * |
| BRAND-ADM-001 | Admin | Admin logo | BRAND-FE-002 | Low | * |
| BRAND-SEO-001 | SEO | Sitemap update | BRAND-FE-006..009 | Low | * |
| BRAND-SEO-002 | SEO | robots.txt update | BRAND-FE-010 | Low | * |
| BRAND-QA-001 | QA | Visual + route tests | All above | Low | After FE tasks |
Parallel group: BRAND-FE-001 through BRAND-FE-003 can run in parallel. BRAND-FE-004 through BRAND-FE-009 can run in parallel after FE-003. BRAND-FE-010 depends on BRAND-FE-001 (extract URLs). BRAND-SEO-001 and BRAND-SEO-002 depend on content pages being done.
Recommended order:
- BRAND-FE-001, BRAND-FE-002, BRAND-FE-003 (parallel)
- BRAND-FE-004, BRAND-FE-005, BRAND-FE-006, BRAND-FE-007, BRAND-FE-008, BRAND-FE-009 (parallel)
- BRAND-FE-010 + BRAND-FE-011 (after FE-001)
- BRAND-ADM-001 (after FE-002)
- BRAND-SEO-001 + BRAND-SEO-002 (after content pages)
- BRAND-QA-001 (after everything)
High-risk tasks:
- BRAND-FE-008 (legal pages — requires human review, cannot be auto-approved)
- BRAND-FE-011 (product redirects — wrong option could lose SEO equity)
Migration risks:
- Legal text is legacy and may not comply with current RGPD — must be reviewed by human before publishing
- Legacy site may still be actively used — coordinate go-live date
- Legacy product slugs may not match new platform slug format — requires slug mapping