# barodillah/atekatehnik architecture

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

- Interactive diagram: https://gitdiagram.com/barodillah/atekatehnik
- Repository: https://github.com/barodillah/atekatehnik

## Overview

This is Ateka Tehnik’s public manufacturing website and its PHP-backed administration application. Visitors browse product, portfolio and educational content, then contact sales through WhatsApp or inquiries; administrators manage content, leads, analytics and quotations, with a separate salary-management area. The sampled code confirms routing, authentication, WhatsApp rotation, quotation access and salary synchronization. Several API relationships and unsampled feature internals are therefore left unconnected rather than inferred.

Main entry points: [`src/App.jsx`](https://github.com/barodillah/atekatehnik/blob/main/src/App.jsx) (Application routes), [`public/api`](https://github.com/barodillah/atekatehnik/tree/main/public/api) (PHP API endpoints), [`src/context/LanguageContext.jsx`](https://github.com/barodillah/atekatehnik/blob/main/src/context/LanguageContext.jsx) (Language context), [`src/components/ChatbotWidget.jsx`](https://github.com/barodillah/atekatehnik/blob/main/src/components/ChatbotWidget.jsx) (Chatbot)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Public website"]
  node_app["Application routes<br/>[App.jsx]"]
  node_catalog["Product catalog<br/>[Products.jsx]"]
  node_product["Product details<br/>[ProductDetail.jsx]"]
  node_articles["Articles<br/>[Post.jsx]"]
  node_content["Public content"]
  node_language["Language context"]
  node_translations["Translations<br/>[translations.js]"]
end

subgraph group_engagement["Visitor engagement"]
  node_chat["Chatbot<br/>[ChatbotWidget.jsx]"]
  node_wa["WhatsApp rotation<br/>[whatsappRotator.js]"]
  node_wa_tracking["Click tracking<br/>[trackWaClick.js]"]
end

subgraph group_admin["Administration"]
  node_admin_layout["Admin dashboard"]
  node_auth["Authentication<br/>[useAuth.jsx]"]
  node_leads["Lead management<br/>[Leads.jsx]"]
  node_posts["Post editor<br/>[PostForm.jsx]"]
  node_gallery["Gallery management<br/>[AdminGallery.jsx]"]
  node_analytics["Analytics<br/>[Analytics.jsx]"]
  node_campaigns["Campaign analytics"]
end

subgraph group_business["Business operations"]
  node_rab["Quotation builder<br/>[RabBuilder.jsx]"]
  node_preview["Quotation preview"]
  node_salary_ui["Salary management"]
  node_salary_storage["Salary storage<br/>[salaryStorage.js]"]
  node_salary_api["Salary API client<br/>[salaryApi.js]"]
end

subgraph group_backend["PHP services"]
  node_api["PHP API endpoints"]
  node_chat_router["AI intent router<br/>[ai_router.php]"]
  node_database[("Database connection<br/>[db.php]")]
  node_mail["Mail library<br/>[PHPMailer.php]"]
end

node_visitor(("Visitor"))

node_visitor -->|"browses"| node_app
node_app -->|"routes to"| node_catalog
node_app -->|"routes to"| node_product
node_app -->|"routes to"| node_admin_layout
node_app -->|"renders"| node_chat
node_app -->|"provides context"| node_language
node_language -->|"reads"| node_translations
node_app -->|"initializes"| node_wa
node_wa -->|"records clicks"| node_wa_tracking
node_admin_layout -->|"uses"| node_auth
node_app -->|"routes to"| node_leads
node_app -->|"routes to"| node_posts
node_app -->|"routes to"| node_gallery
node_app -->|"routes to"| node_analytics
node_app -->|"routes to"| node_campaigns
node_app -->|"routes to"| node_rab
node_app -->|"routes to"| node_preview
node_preview -->|"requests quotations"| node_api
node_salary_storage -->|"synchronizes through"| node_salary_api
node_salary_ui -.->|"uses"| node_salary_storage
node_chat -.->|"requests routing"| node_chat_router
node_chat_router -->|"loads connection"| node_database
node_api -.->|"uses"| node_database
node_api -.->|"may send mail"| node_mail

click node_app "https://github.com/barodillah/atekatehnik/blob/main/src/App.jsx"
click node_catalog "https://github.com/barodillah/atekatehnik/blob/main/src/pages/Products.jsx"
click node_product "https://github.com/barodillah/atekatehnik/blob/main/src/pages/ProductDetail.jsx"
click node_articles "https://github.com/barodillah/atekatehnik/blob/main/src/pages/Post.jsx"
click node_content "https://github.com/barodillah/atekatehnik/tree/main/src/pages"
click node_language "https://github.com/barodillah/atekatehnik/blob/main/src/context/LanguageContext.jsx"
click node_translations "https://github.com/barodillah/atekatehnik/blob/main/src/i18n/translations.js"
click node_chat "https://github.com/barodillah/atekatehnik/blob/main/src/components/ChatbotWidget.jsx"
click node_wa "https://github.com/barodillah/atekatehnik/blob/main/src/utils/whatsappRotator.js"
click node_wa_tracking "https://github.com/barodillah/atekatehnik/blob/main/src/utils/trackWaClick.js"
click node_admin_layout "https://github.com/barodillah/atekatehnik/blob/main/src/components/dashboard/DashboardLayout.jsx"
click node_auth "https://github.com/barodillah/atekatehnik/blob/main/src/hooks/useAuth.jsx"
click node_leads "https://github.com/barodillah/atekatehnik/blob/main/src/pages/dashboard/Leads.jsx"
click node_posts "https://github.com/barodillah/atekatehnik/blob/main/src/pages/dashboard/PostForm.jsx"
click node_gallery "https://github.com/barodillah/atekatehnik/blob/main/src/pages/dashboard/AdminGallery.jsx"
click node_analytics "https://github.com/barodillah/atekatehnik/blob/main/src/pages/dashboard/Analytics.jsx"
click node_campaigns "https://github.com/barodillah/atekatehnik/blob/main/src/pages/dashboard/CampaignAnalytics.jsx"
click node_rab "https://github.com/barodillah/atekatehnik/blob/main/src/pages/dashboard/rab/RabBuilder.jsx"
click node_preview "https://github.com/barodillah/atekatehnik/blob/main/src/pages/dashboard/rab/RabDocumentPreview.jsx"
click node_salary_ui "https://github.com/barodillah/atekatehnik/tree/main/src/pages/dashboard/salary"
click node_salary_storage "https://github.com/barodillah/atekatehnik/blob/main/src/services/salaryStorage.js"
click node_salary_api "https://github.com/barodillah/atekatehnik/blob/main/src/services/salaryApi.js"
click node_api "https://github.com/barodillah/atekatehnik/tree/main/public/api"
click node_chat_router "https://github.com/barodillah/atekatehnik/blob/main/public/api/ai_router.php"
click node_database "https://github.com/barodillah/atekatehnik/blob/main/public/api/db.php"
click node_mail "https://github.com/barodillah/atekatehnik/blob/main/public/api/PHPMailer/PHPMailer.php"

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_catalog,node_product,node_articles,node_content,node_language,node_translations toneBlue
class node_chat,node_wa,node_wa_tracking toneAmber
class node_admin_layout,node_auth,node_leads,node_posts,node_gallery,node_analytics,node_campaigns toneMint
class node_rab,node_preview,node_salary_ui,node_salary_storage,node_salary_api toneRose
class node_api,node_chat_router,node_database,node_mail,node_visitor toneIndigo
```

## Components

### Public website

- [Application routes](https://github.com/barodillah/atekatehnik/blob/main/src/App.jsx): `src/App.jsx`
- [Product catalog](https://github.com/barodillah/atekatehnik/blob/main/src/pages/Products.jsx): `src/pages/Products.jsx`
- [Product details](https://github.com/barodillah/atekatehnik/blob/main/src/pages/ProductDetail.jsx): `src/pages/ProductDetail.jsx`
- [Articles](https://github.com/barodillah/atekatehnik/blob/main/src/pages/Post.jsx): `src/pages/Post.jsx`
- [Public content](https://github.com/barodillah/atekatehnik/tree/main/src/pages): `src/pages`
- [Language context](https://github.com/barodillah/atekatehnik/blob/main/src/context/LanguageContext.jsx): `src/context/LanguageContext.jsx`
- [Translations](https://github.com/barodillah/atekatehnik/blob/main/src/i18n/translations.js): `src/i18n/translations.js`

### Visitor engagement

- [Chatbot](https://github.com/barodillah/atekatehnik/blob/main/src/components/ChatbotWidget.jsx): `src/components/ChatbotWidget.jsx`
- [WhatsApp rotation](https://github.com/barodillah/atekatehnik/blob/main/src/utils/whatsappRotator.js): `src/utils/whatsappRotator.js`
- [Click tracking](https://github.com/barodillah/atekatehnik/blob/main/src/utils/trackWaClick.js): `src/utils/trackWaClick.js`

### Administration

- [Admin dashboard](https://github.com/barodillah/atekatehnik/blob/main/src/components/dashboard/DashboardLayout.jsx): `src/components/dashboard/DashboardLayout.jsx`
- [Authentication](https://github.com/barodillah/atekatehnik/blob/main/src/hooks/useAuth.jsx): `src/hooks/useAuth.jsx`
- [Lead management](https://github.com/barodillah/atekatehnik/blob/main/src/pages/dashboard/Leads.jsx): `src/pages/dashboard/Leads.jsx`
- [Post editor](https://github.com/barodillah/atekatehnik/blob/main/src/pages/dashboard/PostForm.jsx): `src/pages/dashboard/PostForm.jsx`
- [Gallery management](https://github.com/barodillah/atekatehnik/blob/main/src/pages/dashboard/AdminGallery.jsx): `src/pages/dashboard/AdminGallery.jsx`
- [Analytics](https://github.com/barodillah/atekatehnik/blob/main/src/pages/dashboard/Analytics.jsx): `src/pages/dashboard/Analytics.jsx`
- [Campaign analytics](https://github.com/barodillah/atekatehnik/blob/main/src/pages/dashboard/CampaignAnalytics.jsx): `src/pages/dashboard/CampaignAnalytics.jsx`

### Business operations

- [Quotation builder](https://github.com/barodillah/atekatehnik/blob/main/src/pages/dashboard/rab/RabBuilder.jsx): `src/pages/dashboard/rab/RabBuilder.jsx`
- [Quotation preview](https://github.com/barodillah/atekatehnik/blob/main/src/pages/dashboard/rab/RabDocumentPreview.jsx): `src/pages/dashboard/rab/RabDocumentPreview.jsx`
- [Salary management](https://github.com/barodillah/atekatehnik/tree/main/src/pages/dashboard/salary): `src/pages/dashboard/salary`
- [Salary storage](https://github.com/barodillah/atekatehnik/blob/main/src/services/salaryStorage.js): `src/services/salaryStorage.js`
- [Salary API client](https://github.com/barodillah/atekatehnik/blob/main/src/services/salaryApi.js): `src/services/salaryApi.js`

### PHP services

- [PHP API endpoints](https://github.com/barodillah/atekatehnik/tree/main/public/api): `public/api`
- [AI intent router](https://github.com/barodillah/atekatehnik/blob/main/public/api/ai_router.php): `public/api/ai_router.php`
- [Database connection](https://github.com/barodillah/atekatehnik/blob/main/public/api/db.php): `public/api/db.php`
- [Mail library](https://github.com/barodillah/atekatehnik/blob/main/public/api/PHPMailer/PHPMailer.php): `public/api/PHPMailer/PHPMailer.php`

### Other components

- **Visitor**

## Connections

- Visitor → Application routes: browses
- Application routes → Product catalog: routes to (evidence: `src/App.jsx`)
- Application routes → Product details: routes to (evidence: `src/App.jsx`)
- Application routes → Admin dashboard: routes to (evidence: `src/App.jsx`)
- Application routes → Chatbot: renders (evidence: `src/App.jsx`)
- Application routes → Language context: provides context (evidence: `src/App.jsx`)
- Language context → Translations: reads (evidence: `src/context/LanguageContext.jsx`)
- Application routes → WhatsApp rotation: initializes (evidence: `src/App.jsx`)
- WhatsApp rotation → Click tracking: records clicks (evidence: `src/utils/whatsappRotator.js`)
- Admin dashboard → Authentication: uses (evidence: `src/components/dashboard/DashboardLayout.jsx`)
- Application routes → Lead management: routes to (evidence: `src/App.jsx`)
- Application routes → Post editor: routes to (evidence: `src/App.jsx`)
- Application routes → Gallery management: routes to (evidence: `src/App.jsx`)
- Application routes → Analytics: routes to (evidence: `src/App.jsx`)
- Application routes → Campaign analytics: routes to (evidence: `src/App.jsx`)
- Application routes → Quotation builder: routes to (evidence: `src/App.jsx`)
- Application routes → Quotation preview: routes to (evidence: `src/App.jsx`)
- Quotation preview → PHP API endpoints: requests quotations (evidence: `src/pages/dashboard/rab/RabDocumentPreview.jsx`)
- Salary storage → Salary API client: synchronizes through (evidence: `src/services/salaryStorage.js`)
- Salary management → Salary storage: uses
- Chatbot → AI intent router: requests routing
- AI intent router → Database connection: loads connection (evidence: `public/api/ai_router.php`)
- PHP API endpoints → Database connection: uses (evidence: `public/api/ai_router.php`)
- PHP API endpoints → Mail library: may send mail (evidence: `public/api/PHPMailer/Exception.php`)
