# ilyas-sahara/moroccan-desert architecture

> Architecture diagram of the GitHub repository ilyas-sahara/moroccan-desert, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ilyas-sahara/moroccan-desert
- Repository: https://github.com/ilyas-sahara/moroccan-desert

## Overview

Sahara Vacation is a multilingual marketing and trip-planning site for Moroccan desert journeys. Visitors enter through the React router, browse tours, experiences, and editorial pages, or use the custom-journey and contact pages to inquire. Site content is also editable through the Decap CMS admin, whose GitHub OAuth proxy supports editor authentication. The source excerpts establish the router, locale/SEO behavior, custom-journey content loading, and worker integrations; unsampled page-to-service wiring is omitted.

Main entry points: [`src/App.tsx`](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/App.tsx) (App router), [`src/hooks/useSeo.ts`](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/hooks/useSeo.ts) (SEO metadata), [`public/admin/config.js`](https://github.com/ilyas-sahara/moroccan-desert/blob/master/public/admin/config.js) (Decap admin), [`src/pages/Tours.tsx`](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/Tours.tsx) (Tour pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Visitor site"]
  node_app["App router<br/>[App.tsx]"]
  node_home["Home<br/>[Home.tsx]"]
  node_tour_pages["Tour pages<br/>[Tours.tsx]"]
  node_tour_detail["Tour detail<br/>[TourDetail.tsx]"]
  node_experiences["Experiences<br/>[Experiences.tsx]"]
  node_blog["Blog pages<br/>[Blog.tsx]"]
  node_blog_detail["Blog detail<br/>[BlogDetail.tsx]"]
  node_about["About page<br/>[About.tsx]"]
  node_contact["Contact page<br/>[Contact.tsx]"]
  node_journey["Custom journey<br/>[CustomJourney.tsx]"]
  node_legal["Legal pages<br/>[LegalPage.tsx]"]
  node_navigation["Site navigation<br/>[Navbar.tsx]"]
  node_seo["SEO metadata<br/>[useSeo.ts]"]
end

subgraph group_content["Content and localization"]
  node_locale["Locale provider<br/>[index.tsx]"]
  node_cms_data["CMS content access<br/>[cms.ts]"]
  node_static_content["Tour content<br/>[content.ts]"]
end

subgraph group_editor["CMS editing"]
  node_editor(("Content editor"))
  node_admin["Decap admin<br/>[config.js]"]
  node_preview["CMS previews<br/>[preview.js]"]
end

subgraph group_services["Inquiry and authentication"]
  node_oauth["OAuth proxy<br/>[worker.js]"]
  node_contact_worker["Contact worker<br/>[worker.js]"]
end

node_visitor(("Traveler"))
node_github[("GitHub")]
node_smtp{{"Gmail SMTP"}}

node_visitor -->|"opens pages"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_tour_pages
node_app -->|"routes to"| node_tour_detail
node_app -->|"routes to"| node_experiences
node_app -->|"routes to"| node_blog
node_app -->|"routes to"| node_blog_detail
node_app -->|"routes to"| node_about
node_app -->|"routes to"| node_contact
node_app -->|"routes to"| node_journey
node_app -->|"routes to"| node_legal
node_app -->|"renders"| node_navigation
node_app -->|"provides locale"| node_locale
node_home -->|"sets metadata"| node_seo
node_tour_pages -->|"sets metadata"| node_seo
node_tour_detail -->|"sets metadata"| node_seo
node_blog -->|"sets metadata"| node_seo
node_blog_detail -->|"sets metadata"| node_seo
node_journey -->|"loads content"| node_cms_data
node_tour_pages -.->|"reads tour data"| node_static_content
node_tour_detail -.->|"reads tour data"| node_static_content
node_editor -->|"edits content"| node_admin
node_admin -->|"renders previews"| node_preview
node_admin -->|"authenticates via"| node_oauth
node_oauth -->|"requests OAuth"| node_github
node_admin -->|"commits content"| node_github
node_contact_worker -->|"sends inquiry email"| node_smtp

click node_app "https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/App.tsx"
click node_home "https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/Home.tsx"
click node_tour_pages "https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/Tours.tsx"
click node_tour_detail "https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/TourDetail.tsx"
click node_experiences "https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/Experiences.tsx"
click node_blog "https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/Blog.tsx"
click node_blog_detail "https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/BlogDetail.tsx"
click node_about "https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/About.tsx"
click node_contact "https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/Contact.tsx"
click node_journey "https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/CustomJourney.tsx"
click node_legal "https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/components/LegalPage.tsx"
click node_navigation "https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/components/Navbar.tsx"
click node_seo "https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/hooks/useSeo.ts"
click node_locale "https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/i18n/index.tsx"
click node_cms_data "https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/data/cms.ts"
click node_static_content "https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/data/content.ts"
click node_admin "https://github.com/ilyas-sahara/moroccan-desert/blob/master/public/admin/config.js"
click node_preview "https://github.com/ilyas-sahara/moroccan-desert/blob/master/public/admin/preview.js"
click node_oauth "https://github.com/ilyas-sahara/moroccan-desert/blob/master/oauth-proxy/worker.js"
click node_contact_worker "https://github.com/ilyas-sahara/moroccan-desert/blob/master/contact-form/src/worker.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_home,node_tour_pages,node_tour_detail,node_experiences,node_blog,node_blog_detail,node_about,node_contact,node_journey,node_legal,node_navigation,node_seo toneBlue
class node_locale,node_cms_data,node_static_content,node_github toneAmber
class node_editor,node_admin,node_preview toneMint
class node_oauth,node_contact_worker toneRose
class node_visitor,node_smtp toneIndigo
```

## Components

### Visitor site

- [App router](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/App.tsx): `src/App.tsx`
- [Home](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/Home.tsx): `src/pages/Home.tsx`
- [Tour pages](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/Tours.tsx): `src/pages/Tours.tsx`
- [Tour detail](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/TourDetail.tsx): `src/pages/TourDetail.tsx`
- [Experiences](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/Experiences.tsx): `src/pages/Experiences.tsx`
- [Blog pages](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/Blog.tsx): `src/pages/Blog.tsx`
- [Blog detail](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/BlogDetail.tsx): `src/pages/BlogDetail.tsx`
- [About page](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/About.tsx): `src/pages/About.tsx`
- [Contact page](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/Contact.tsx): `src/pages/Contact.tsx`
- [Custom journey](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/pages/CustomJourney.tsx): `src/pages/CustomJourney.tsx`
- [Legal pages](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/components/LegalPage.tsx): `src/components/LegalPage.tsx`
- [Site navigation](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/components/Navbar.tsx): `src/components/Navbar.tsx`
- [SEO metadata](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/hooks/useSeo.ts): `src/hooks/useSeo.ts`

### Content and localization

- [Locale provider](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/i18n/index.tsx): `src/i18n/index.tsx`
- [CMS content access](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/data/cms.ts): `src/data/cms.ts`
- [Tour content](https://github.com/ilyas-sahara/moroccan-desert/blob/master/src/data/content.ts): `src/data/content.ts`

### CMS editing

- **Content editor**
- [Decap admin](https://github.com/ilyas-sahara/moroccan-desert/blob/master/public/admin/config.js): `public/admin/config.js`
- [CMS previews](https://github.com/ilyas-sahara/moroccan-desert/blob/master/public/admin/preview.js): `public/admin/preview.js`

### Inquiry and authentication

- [OAuth proxy](https://github.com/ilyas-sahara/moroccan-desert/blob/master/oauth-proxy/worker.js): `oauth-proxy/worker.js`
- [Contact worker](https://github.com/ilyas-sahara/moroccan-desert/blob/master/contact-form/src/worker.js): `contact-form/src/worker.js`

### Other components

- **Traveler**
- **GitHub**
- **Gmail SMTP**

## Connections

- Traveler → App router: opens pages
- App router → Home: routes to
- App router → Tour pages: routes to
- App router → Tour detail: routes to
- App router → Experiences: routes to
- App router → Blog pages: routes to
- App router → Blog detail: routes to
- App router → About page: routes to
- App router → Contact page: routes to
- App router → Custom journey: routes to
- App router → Legal pages: routes to
- App router → Site navigation: renders
- App router → Locale provider: provides locale
- Home → SEO metadata: sets metadata
- Tour pages → SEO metadata: sets metadata
- Tour detail → SEO metadata: sets metadata
- Blog pages → SEO metadata: sets metadata
- Blog detail → SEO metadata: sets metadata
- Custom journey → CMS content access: loads content
- Tour pages → Tour content: reads tour data
- Tour detail → Tour content: reads tour data
- Content editor → Decap admin: edits content
- Decap admin → CMS previews: renders previews
- Decap admin → OAuth proxy: authenticates via
- OAuth proxy → GitHub: requests OAuth
- Decap admin → GitHub: commits content
- Contact worker → Gmail SMTP: sends inquiry email
