# div0011/mowglai architecture

> Architecture diagram of the GitHub repository div0011/mowglai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/div0011/mowglai
- Repository: https://github.com/div0011/mowglai

## Overview

Mowglai is an agency and digital-services website with template discovery, project inquiries, AI-assisted analysis/onboarding, website audits, and investment/subscription offerings. A typical visitor discovers services or templates, then proceeds toward a project inquiry; separate tools provide analysis and audit results. The graph includes documented capabilities and sampled frontend-to-module relationships. Most PHP endpoints and several routes were not inspected, so their internal connections are left unspecified.

Main entry points: [`app/investment/page.tsx`](https://github.com/div0011/mowglai/blob/main/app/investment/page.tsx) (Investment Plans), [`src/components/PageLayout.tsx`](https://github.com/div0011/mowglai/blob/main/src/components/PageLayout.tsx) (Page Layout), [`app/ai-analyze/page.tsx`](https://github.com/div0011/mowglai/blob/main/app/ai-analyze/page.tsx) (AI Website Analysis), [`app/audit/page.tsx`](https://github.com/div0011/mowglai/blob/main/app/audit/page.tsx) (Website Audit)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Visitor Discovery"]
  node_landing["Landing Pages<br/>[page.tsx]"]
  node_template_browse["Template Discovery"]
  node_template_catalogue["Template Catalogue<br/>[page.tsx]"]
end

subgraph group_services["Agency Services"]
  node_service_index["Services Index<br/>[Services.tsx]"]
  node_web_design["Web Design"]
  node_web_development["Web Development"]
  node_ecommerce_service["E-commerce Service"]
  node_project_inquiry["Project Inquiry"]
end

subgraph group_tools["Analysis Tools"]
  node_ai_analysis["AI Website Analysis<br/>[page.tsx]"]
  node_ai_analyzer["Analysis Logic<br/>[analyzer.ts]"]
  node_ai_onboarding["AI Onboarding<br/>[page.tsx]"]
  node_ai_matcher["Template Matcher<br/>[matcher.ts]"]
  node_website_audit["Website Audit<br/>[page.tsx]"]
  node_audit_actions["Audit Actions<br/>[actions.ts]"]
  node_audit_report["Audit Report<br/>[AuditReport.tsx]"]
end

subgraph group_business["Commerce and Leads"]
  node_investment["Investment Plans<br/>[page.tsx]"]
  node_php_api["PHP API Endpoints"]
  node_referral["Referral Program<br/>[page.tsx]"]
  node_email_sender["Email Sender<br/>[emailSender.ts]"]
  node_purchases["User Purchases"]
end

subgraph group_shared["Shared UI and Logic"]
  node_page_layout["Page Layout<br/>[PageLayout.tsx]"]
  node_original_layout["Original Layout<br/>[Layout.tsx]"]
  node_language["Language Context"]
  node_currency["Currency Context"]
end

node_visitor(("Visitor"))

node_visitor -->|"visits"| node_landing
node_landing -.->|"explores templates"| node_template_browse
node_visitor -->|"browses"| node_template_browse
node_visitor -->|"reviews services"| node_service_index
node_service_index -->|"renders with"| node_page_layout
node_web_design -->|"renders with"| node_page_layout
node_web_development -->|"renders with"| node_page_layout
node_visitor -->|"requests a project"| node_project_inquiry
node_visitor -.->|"submits a site"| node_ai_analysis
node_ai_analysis -->|"calls analysis"| node_ai_analyzer
node_ai_analysis -->|"renders with"| node_page_layout
node_visitor -.->|"starts onboarding"| node_ai_onboarding
node_ai_onboarding -->|"matches templates"| node_ai_matcher
node_visitor -.->|"submits a site"| node_website_audit
node_website_audit -->|"runs audit"| node_audit_actions
node_website_audit -->|"displays report"| node_audit_report
node_visitor -.->|"views plans"| node_investment
node_investment -->|"renders with"| node_page_layout
node_investment -->|"uses currency context"| node_currency
node_investment -->|"uses language context"| node_language
node_investment -->|"shows purchases"| node_purchases
node_investment -.->|"creates subscriptions"| node_php_api
node_visitor -.->|"submits referral"| node_referral
node_referral -->|"sends referral email"| node_email_sender
node_page_layout -->|"wraps content"| node_original_layout

click node_landing "https://github.com/div0011/mowglai/blob/main/app/page.tsx"
click node_template_browse "https://github.com/div0011/mowglai/tree/main/app/explore"
click node_template_catalogue "https://github.com/div0011/mowglai/blob/main/app/catalogue/page.tsx"
click node_service_index "https://github.com/div0011/mowglai/blob/main/src/styles/original/Services.tsx"
click node_web_design "https://github.com/div0011/mowglai/blob/main/app/services/web-design/WebDesignClient.tsx"
click node_web_development "https://github.com/div0011/mowglai/blob/main/app/services/web-development/WebDevelopmentClient.tsx"
click node_ecommerce_service "https://github.com/div0011/mowglai/blob/main/src/components/EcommerceServiceSection.tsx"
click node_project_inquiry "https://github.com/div0011/mowglai/tree/main/app/start-project"
click node_ai_analysis "https://github.com/div0011/mowglai/blob/main/app/ai-analyze/page.tsx"
click node_ai_analyzer "https://github.com/div0011/mowglai/blob/main/src/lib/ai/analyzer.ts"
click node_ai_onboarding "https://github.com/div0011/mowglai/blob/main/app/ai-onboard/page.tsx"
click node_ai_matcher "https://github.com/div0011/mowglai/blob/main/src/lib/ai/matcher.ts"
click node_website_audit "https://github.com/div0011/mowglai/blob/main/app/audit/page.tsx"
click node_audit_actions "https://github.com/div0011/mowglai/blob/main/app/audit/actions.ts"
click node_audit_report "https://github.com/div0011/mowglai/blob/main/app/audit/AuditReport.tsx"
click node_investment "https://github.com/div0011/mowglai/blob/main/app/investment/page.tsx"
click node_php_api "https://github.com/div0011/mowglai/tree/main/public/api"
click node_referral "https://github.com/div0011/mowglai/blob/main/app/referral/page.tsx"
click node_email_sender "https://github.com/div0011/mowglai/blob/main/src/utils/emailSender.ts"
click node_page_layout "https://github.com/div0011/mowglai/blob/main/src/components/PageLayout.tsx"
click node_original_layout "https://github.com/div0011/mowglai/blob/main/src/styles/original/Layout.tsx"
click node_language "https://github.com/div0011/mowglai/blob/main/src/context/LanguageContext.tsx"
click node_currency "https://github.com/div0011/mowglai/blob/main/src/context/CurrencyContext.tsx"
click node_purchases "https://github.com/div0011/mowglai/blob/main/src/components/UserPurchasesSection.tsx"

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_landing,node_template_browse,node_template_catalogue toneBlue
class node_service_index,node_web_design,node_web_development,node_ecommerce_service,node_project_inquiry toneAmber
class node_ai_analysis,node_ai_analyzer,node_ai_onboarding,node_ai_matcher,node_website_audit,node_audit_actions,node_audit_report toneMint
class node_investment,node_php_api,node_referral,node_email_sender,node_purchases toneRose
class node_page_layout,node_original_layout,node_language,node_currency,node_visitor toneIndigo
```

## Components

### Visitor Discovery

- [Landing Pages](https://github.com/div0011/mowglai/blob/main/app/page.tsx): `app/page.tsx`
- [Template Discovery](https://github.com/div0011/mowglai/tree/main/app/explore): `app/explore`
- [Template Catalogue](https://github.com/div0011/mowglai/blob/main/app/catalogue/page.tsx): `app/catalogue/page.tsx`

### Agency Services

- [Services Index](https://github.com/div0011/mowglai/blob/main/src/styles/original/Services.tsx): `src/styles/original/Services.tsx`
- [Web Design](https://github.com/div0011/mowglai/blob/main/app/services/web-design/WebDesignClient.tsx): `app/services/web-design/WebDesignClient.tsx`
- [Web Development](https://github.com/div0011/mowglai/blob/main/app/services/web-development/WebDevelopmentClient.tsx): `app/services/web-development/WebDevelopmentClient.tsx`
- [E-commerce Service](https://github.com/div0011/mowglai/blob/main/src/components/EcommerceServiceSection.tsx): `src/components/EcommerceServiceSection.tsx`
- [Project Inquiry](https://github.com/div0011/mowglai/tree/main/app/start-project): `app/start-project`

### Analysis Tools

- [AI Website Analysis](https://github.com/div0011/mowglai/blob/main/app/ai-analyze/page.tsx): `app/ai-analyze/page.tsx`
- [Analysis Logic](https://github.com/div0011/mowglai/blob/main/src/lib/ai/analyzer.ts): `src/lib/ai/analyzer.ts`
- [AI Onboarding](https://github.com/div0011/mowglai/blob/main/app/ai-onboard/page.tsx): `app/ai-onboard/page.tsx`
- [Template Matcher](https://github.com/div0011/mowglai/blob/main/src/lib/ai/matcher.ts): `src/lib/ai/matcher.ts`
- [Website Audit](https://github.com/div0011/mowglai/blob/main/app/audit/page.tsx): `app/audit/page.tsx`
- [Audit Actions](https://github.com/div0011/mowglai/blob/main/app/audit/actions.ts): `app/audit/actions.ts`
- [Audit Report](https://github.com/div0011/mowglai/blob/main/app/audit/AuditReport.tsx): `app/audit/AuditReport.tsx`

### Commerce and Leads

- [Investment Plans](https://github.com/div0011/mowglai/blob/main/app/investment/page.tsx): `app/investment/page.tsx`
- [PHP API Endpoints](https://github.com/div0011/mowglai/tree/main/public/api): `public/api`
- [Referral Program](https://github.com/div0011/mowglai/blob/main/app/referral/page.tsx): `app/referral/page.tsx`
- [Email Sender](https://github.com/div0011/mowglai/blob/main/src/utils/emailSender.ts): `src/utils/emailSender.ts`
- [User Purchases](https://github.com/div0011/mowglai/blob/main/src/components/UserPurchasesSection.tsx): `src/components/UserPurchasesSection.tsx`

### Shared UI and Logic

- [Page Layout](https://github.com/div0011/mowglai/blob/main/src/components/PageLayout.tsx): `src/components/PageLayout.tsx`
- [Original Layout](https://github.com/div0011/mowglai/blob/main/src/styles/original/Layout.tsx): `src/styles/original/Layout.tsx`
- [Language Context](https://github.com/div0011/mowglai/blob/main/src/context/LanguageContext.tsx): `src/context/LanguageContext.tsx`
- [Currency Context](https://github.com/div0011/mowglai/blob/main/src/context/CurrencyContext.tsx): `src/context/CurrencyContext.tsx`

### Other components

- **Visitor**

## Connections

- Visitor → Landing Pages: visits (evidence: `README.md`)
- Landing Pages → Template Discovery: explores templates
- Visitor → Template Discovery: browses (evidence: `README.md`)
- Visitor → Services Index: reviews services (evidence: `README.md`)
- Services Index → Page Layout: renders with (evidence: `src/styles/original/Services.tsx`)
- Web Design → Page Layout: renders with (evidence: `app/services/web-design/WebDesignClient.tsx`)
- Web Development → Page Layout: renders with (evidence: `app/services/web-development/WebDevelopmentClient.tsx`)
- Visitor → Project Inquiry: requests a project (evidence: `README.md`)
- Visitor → AI Website Analysis: submits a site
- AI Website Analysis → Analysis Logic: calls analysis (evidence: `app/ai-analyze/page.tsx`)
- AI Website Analysis → Page Layout: renders with (evidence: `app/ai-analyze/page.tsx`)
- Visitor → AI Onboarding: starts onboarding
- AI Onboarding → Template Matcher: matches templates (evidence: `app/ai-onboard/page.tsx`)
- Visitor → Website Audit: submits a site
- Website Audit → Audit Actions: runs audit (evidence: `app/audit/page.tsx`)
- Website Audit → Audit Report: displays report (evidence: `app/audit/page.tsx`)
- Visitor → Investment Plans: views plans
- Investment Plans → Page Layout: renders with (evidence: `app/investment/page.tsx`)
- Investment Plans → Currency Context: uses currency context (evidence: `app/investment/page.tsx`)
- Investment Plans → Language Context: uses language context (evidence: `app/investment/page.tsx`)
- Investment Plans → User Purchases: shows purchases (evidence: `app/investment/page.tsx`)
- Investment Plans → PHP API Endpoints: creates subscriptions
- Visitor → Referral Program: submits referral
- Referral Program → Email Sender: sends referral email (evidence: `app/referral/page.tsx`)
- Page Layout → Original Layout: wraps content (evidence: `src/components/PageLayout.tsx`)
