# Content Management System (CMS), Dynamic Pages & SEO Engine

This document details the dynamic content management architecture, zero-code storefront controls, and SEO metadata engines powering **Eniceberny Bakery and Culinary Hub**.

---

## 1. Zero-Code Business Management Philosophy

Eniceberny's storefront is designed so that marketing managers and business operators can manage the site without writing code or editing templates:

```mermaid
graph TD
    A[Admin CMS Console /admin/cms] --> B[Homepage Section Manager]
    A --> C[Marketing Banners & Announcements]
    A --> D[Visual Craftsmanship Lightbox Gallery]
    A --> E[Customer Testimonials & Accolades]
    A --> F[Frequently Asked Questions Accordions]
    A --> G[Custom Informational & Legal Pages]
    B --> H[(Database Models)]
    C --> H
    D --> H
    E --> H
    F --> H
    G --> H
    H --> I[Storefront Home /]
    H --> J[Dynamic Page Routes /page/{slug}]
    H --> K[XML Sitemap /sitemap.xml & Robots /robots.txt]
```

---

## 2. Core CMS Subsystems

### 2.1 Homepage Section Manager (`homepage_sections`)
Administrators can enable/disable, reorder, and configure titles, subtitles, and CTA buttons for all 15 cinematic landing page sections:

| Section Key | Section Name | Configurable Controls |
| :--- | :--- | :--- |
| **`hero`** | Cinematic Hero & Video Loop | Video poster, headline, badge text, primary & secondary CTA URLs |
| **`trust_strip`** | Heritage & Quality Pillars | 4 trust icons: Freshly Prepared, Premium Ingredients, Made With Love, Catering |
| **`departments`** | Signature Departments Grid | 5 culinary collections: Continental, Ghanaian, Pastries, Juices, Baskets |
| **`signature_spotlight`** | Editorial Chef Spotlight | Masterpiece spotlight card + 3 stacked companion dishes with prices |
| **`ghanaian_flavour`** | Ghanaian Authentic Section | Spotlight on Fufu, Banku, Emotuo, and Abete3 with shop links |
| **`bakehouse_studio`** | Bespoke Cake Studio | Spotlight on Red Velvet, Belgian Chocolate Ganache, Citrus Cakes, Parfaits |
| **`catering_events`** | Executive Catering Banner | Headcount badge (up to 500), service highlights, quote request CTA |
| **`breakfast_platters`** | Morning Elegance Platters | Corporate breakfast boxes and family brunch platter offerings |
| **`gift_hampers`** | Thoughtful Food Baskets | Celebration hampers, crates, wine, and personalized gift cards |
| **`brand_story`** | Kumasi Tech Brand Story | Authentic craftsmanship narrative grounded in Ghanaian culinary culture |
| **`gallery_lightbox`** | Visual Craftsmanship Gallery | Interactive Alpine.js lightbox with full-screen zoom and modal details |
| **`testimonials`** | Patron Accolades | Dynamic customer reviews with 5-star ratings and patron attribution |
| **`conversion_cta`** | High-Impact Conversion CTA | *"Something Delicious Is Waiting."* conversion callout |
| **`kitchen_hotlines`** | Direct Desk & Hours Strip | 4-column footer strip with click-to-call, WhatsApp desk, and hours |

---

### 2.2 Visual Craftsmanship Gallery (`gallery_items`)
- **Categories**: Celebration Cakes, Artisan Pastries, Authentic Ghanaian Feasts, Royal Banquets.
- **Lightbox Integration**: Uses an Alpine.js modal component with keyboard `Esc` listener, click-outside dismissal, image title captions, and smooth transitions.
- **Featured Badges**: Flagging an image as "Featured" spotlights it directly on the storefront homepage.

---

### 2.3 Categorized FAQs Accordion (`faqs`)
- Categorized by **General Operations**, **Ordering & Delivery**, **Custom Bespoke Cakes**, and **Corporate Catering**.
- Rendered on the storefront with micro-animations that open/close cleanly without layout shifts.

---

### 2.4 Informational & Policy Pages (`cms_pages`)
- Create arbitrary informational and legal pages (e.g. `/privacy-policy`, `/terms-of-service`, `/about-us`, `/page/delivery-zones`).
- Dynamic fallback route: `GET /page/{slug}`.
- Individual page-level SEO overrides (`meta_title`, `meta_description`, `canonical_url`).

---

## 3. Search Engine Optimization (SEO) & Structured Data Engine

To dominate search engine rankings (Google, Bing, Yahoo, DuckDuckGo) across Kumasi, Greater Ashanti, and nationwide Ghana, Eniceberny features a multi-tiered SEO architecture:

### 3.1 Local SEO & Geographic Positioning
Injected directly into `<head>` across all pages:
```html
<meta name="geo.region" content="GH-AH">
<meta name="geo.placename" content="Kumasi">
<meta name="geo.position" content="6.6745;-1.5716">
<meta name="ICBM" content="6.6745, -1.5716">
```

### 3.2 Dynamic XML Sitemap with Google Image Extensions (`/sitemap.xml`)
The sitemap is computed dynamically and cached for performance via `SeoController::sitemap`:
- **Image Extensions**: Adheres to `xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"`, indexing all menu product photography, cakes, and category banners into **Google Images** and visual search engines.
- **Priority Scaling**:
  - Homepage: `1.0` (daily)
  - Shop & Catering: `0.9` (daily)
  - Categories & Products: `0.8` (weekly)
  - Documentation: `0.8` (weekly)
  - About, Contact & Invoices: `0.7` (monthly)
  - Dynamic Pages: `0.6` (monthly)

### 3.3 Dynamic Robots.txt Directives (`/robots.txt` & `public/robots.txt`)
Explicitly permits search crawlers (`Googlebot`, `Googlebot-Image`, `Bingbot`, `Applebot`, `DuckDuckBot`) to index public pages and visual assets while shielding private administration, checkout, and webhook endpoints:
```text
User-agent: *
Disallow: /admin/
Disallow: /checkout
Disallow: /account/
Disallow: /cart
Disallow: /webhooks/
Disallow: /api/
Allow: /images/
Allow: /storage/
Allow: /build/
Allow: /docs

Sitemap: https://enicebakerygh.com/sitemap.xml
```

### 3.4 Schema.org JSON-LD Structured Data
Eniceberny injects rich structured data to trigger Google rich results:
1. **`Bakery` & `Restaurant` & `LocalBusiness`**:
   - Geocoordinates: `6.6745, -1.5716`.
   - Contact phone, address, and opening hours.
   - Cuisine types: Bakery, Celebration Cakes, Ghanaian Cuisine, Event Catering.
   - Aggregate rating: 4.9 stars based on verified patron reviews.
2. **`WebSite` with Sitelinks `SearchAction`**:
   - Allows search engines to render an interactive search box directly within Google search results.
3. **`FAQPage` Schema (Homepage)**:
   - Renders expandable question-and-answer drop-downs directly on Google SERPs.
4. **`Product` Schema (Menu Item Pages)**:
   - Renders pricing (`GHS`), availability (`InStock`), SKU, and aggregate review stars.
5. **`BreadcrumbList`**:
   - Emits hierarchical breadcrumbs for navigation (e.g. `Home > Shop > Celebration Cakes > Red Velvet`).

### 3.5 Immediate Search Engine Indexing (`php artisan seo:ping`)
Whenever catalog products or pages are updated, administrators or CI pipelines can trigger immediate crawler notifications:
```bash
php artisan seo:ping
```
Or via HTTP GET: `/seo/ping`. This sends automated sitemap pings to Google and Bing crawler endpoints.

---

*For technical architecture or catalog details, refer to the [System Architecture Guide](architecture.md) and [REST API Guide](api.md).*
