# richardtsalwa/hawlast architecture

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

- Interactive diagram: https://gitdiagram.com/richardtsalwa/hawlast
- Repository: https://github.com/richardtsalwa/hawlast

## Overview

Hawlast is a PHP business-services platform for Kenyan customers, combining web hosting and domain registration with an airtime/SMS SaaS, payment handling, and client administration; it also includes a WordPress blog. The domain workflow is the clearest sampled customer journey: search for a domain, proceed to reservation/checkout, and initiate an M-PESA request. Other product areas are preserved from the source tree and documented project description, but many of their runtime connections cannot be verified from the sampled excerpts.

Main entry points: [`domain-registration/reserve.php`](https://github.com/richardtsalwa/hawlast/blob/main/domain-registration/reserve.php) (Domain Reservation), [`saas/domain-search.php`](https://github.com/richardtsalwa/hawlast/blob/main/saas/domain-search.php) (Client Domain Search), [`domain-registration/index.php`](https://github.com/richardtsalwa/hawlast/blob/main/domain-registration/index.php) (Domain Search Landing), [`saas/index.php`](https://github.com/richardtsalwa/hawlast/blob/main/saas/index.php) (SaaS Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public Website"]
  node_site["Marketing Site<br/>[index.php]"]
  node_site_shell["Shared Site Shell<br/>[site_head.php]"]
  node_blog["WordPress Blog<br/>[index.php]"]
end

subgraph group_domains["Domains and Hosting"]
  node_domain_landing["Domain Search Landing<br/>[index.php]"]
  node_domain_lookup["Domain Lookup<br/>[domain.php]"]
  node_domain_reservation["Domain Reservation<br/>[reserve.php]"]
  node_domain_checkout["Checkout Form<br/>[checkout.php]"]
  node_domain_logging["Search Logging<br/>[WriteDomain.php]"]
  node_hosting["Hosting Sales<br/>[hosting.php]"]
end

subgraph group_saas["SaaS Services"]
  node_saas_portal["SaaS Dashboard<br/>[index.php]"]
  node_saas_auth["Session Guard<br/>[auth.php]"]
  node_airtime["Airtime Service<br/>[index.php]"]
  node_sms["SMS Service<br/>[index.php]"]
  node_sms_dispatch["SMS Dispatch<br/>[sendsms.php]"]
  node_saas_domains["Client Domain Search<br/>[domain-search.php]"]
  node_domain_navigation["Domain Navigation<br/>[domain-nav.php]"]
  node_domain_pagination["Domain Pagination"]
end

subgraph group_payments["Payment Processing"]
  node_mpesa_request["M-PESA STK Request<br/>[stk.php]"]
  node_mpesa_confirmation["M-PESA Confirmation<br/>[confirmation.php]"]
  node_mpesa_callback["M-PESA Callback<br/>[stkcallback.php]"]
end

subgraph group_operations["Client Operations"]
  node_admin_dashboard["Admin Dashboard<br/>[index.php]"]
  node_admin_search["Client Search<br/>[search.php]"]
  node_admin_pagination["Admin Pagination"]
  node_client_records[("Client Records")]
  node_shared_helpers["Shared Helpers<br/>[hawlastke.php]"]
end

node_visitor(("Customer"))

node_visitor -->|"opens"| node_site
node_site -->|"loads shell"| node_site_shell
node_visitor -->|"searches domain"| node_domain_landing
node_domain_landing -->|"submits search"| node_domain_lookup
node_domain_landing -->|"starts reservation"| node_domain_reservation
node_domain_reservation -->|"includes form"| node_domain_checkout
node_domain_reservation -->|"records search"| node_domain_logging
node_domain_reservation -->|"posts request"| node_mpesa_request
node_visitor -.->|"views plans"| node_hosting
node_visitor -.->|"uses portal"| node_saas_portal
node_saas_portal -->|"requires guard"| node_saas_auth
node_saas_domains -->|"requires guard"| node_saas_auth
node_saas_domains -->|"includes navigation"| node_domain_navigation
node_saas_domains -->|"uses pagination"| node_domain_pagination
node_visitor -.->|"buys airtime"| node_airtime
node_visitor -.->|"uses SMS"| node_sms
node_sms -.->|"dispatches SMS"| node_sms_dispatch
node_visitor -.->|"administers accounts"| node_admin_dashboard
node_admin_dashboard -.->|"opens search"| node_admin_search
node_admin_search -->|"uses paginator"| node_admin_pagination
node_admin_dashboard -.->|"reads counts"| node_client_records
node_admin_search -.->|"searches records"| node_client_records
node_domain_reservation -->|"loads helpers"| node_shared_helpers
node_saas_portal -->|"loads helpers"| node_shared_helpers
node_mpesa_confirmation -->|"loads helpers"| node_shared_helpers

click node_site "https://github.com/richardtsalwa/hawlast/blob/main/index.php"
click node_site_shell "https://github.com/richardtsalwa/hawlast/blob/main/includes/site_head.php"
click node_blog "https://github.com/richardtsalwa/hawlast/blob/main/blog/wp-content/themes/hawlast/index.php"
click node_domain_landing "https://github.com/richardtsalwa/hawlast/blob/main/domain-registration/index.php"
click node_domain_lookup "https://github.com/richardtsalwa/hawlast/blob/main/domain-registration/domain.php"
click node_domain_reservation "https://github.com/richardtsalwa/hawlast/blob/main/domain-registration/reserve.php"
click node_domain_checkout "https://github.com/richardtsalwa/hawlast/blob/main/domain-registration/includes/checkout.php"
click node_domain_logging "https://github.com/richardtsalwa/hawlast/blob/main/domain-registration/includes/WriteDomain.php"
click node_hosting "https://github.com/richardtsalwa/hawlast/blob/main/domain-registration/hosting.php"
click node_saas_portal "https://github.com/richardtsalwa/hawlast/blob/main/saas/index.php"
click node_saas_auth "https://github.com/richardtsalwa/hawlast/blob/main/saas/auth.php"
click node_airtime "https://github.com/richardtsalwa/hawlast/blob/main/saas/airtime/index.php"
click node_sms "https://github.com/richardtsalwa/hawlast/blob/main/saas/sms/index.php"
click node_sms_dispatch "https://github.com/richardtsalwa/hawlast/blob/main/saas/sms/sendsms.php"
click node_saas_domains "https://github.com/richardtsalwa/hawlast/blob/main/saas/domain-search.php"
click node_domain_navigation "https://github.com/richardtsalwa/hawlast/blob/main/saas/domain-nav.php"
click node_domain_pagination "https://github.com/richardtsalwa/hawlast/blob/main/saas/domain-paginator.php"
click node_mpesa_request "https://github.com/richardtsalwa/hawlast/blob/main/pesa/stk.php"
click node_mpesa_confirmation "https://github.com/richardtsalwa/hawlast/blob/main/pesa/confirmation.php"
click node_mpesa_callback "https://github.com/richardtsalwa/hawlast/blob/main/pesa/stkcallback.php"
click node_admin_dashboard "https://github.com/richardtsalwa/hawlast/blob/main/admin/index.php"
click node_admin_search "https://github.com/richardtsalwa/hawlast/blob/main/admin/search.php"
click node_admin_pagination "https://github.com/richardtsalwa/hawlast/blob/main/admin/classes/paginator.class.php"
click node_shared_helpers "https://github.com/richardtsalwa/hawlast/blob/main/hawlastke.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_site,node_site_shell,node_blog toneBlue
class node_domain_landing,node_domain_lookup,node_domain_reservation,node_domain_checkout,node_domain_logging,node_hosting toneAmber
class node_saas_portal,node_saas_auth,node_airtime,node_sms,node_sms_dispatch,node_saas_domains,node_domain_navigation,node_domain_pagination toneMint
class node_mpesa_request,node_mpesa_confirmation,node_mpesa_callback toneRose
class node_admin_dashboard,node_admin_search,node_admin_pagination,node_client_records,node_shared_helpers,node_visitor toneIndigo
```

## Components

### Public Website

- [Marketing Site](https://github.com/richardtsalwa/hawlast/blob/main/index.php): `index.php`
- [Shared Site Shell](https://github.com/richardtsalwa/hawlast/blob/main/includes/site_head.php): `includes/site_head.php`
- [WordPress Blog](https://github.com/richardtsalwa/hawlast/blob/main/blog/wp-content/themes/hawlast/index.php): `blog/wp-content/themes/hawlast/index.php`

### Domains and Hosting

- [Domain Search Landing](https://github.com/richardtsalwa/hawlast/blob/main/domain-registration/index.php): `domain-registration/index.php`
- [Domain Lookup](https://github.com/richardtsalwa/hawlast/blob/main/domain-registration/domain.php): `domain-registration/domain.php`
- [Domain Reservation](https://github.com/richardtsalwa/hawlast/blob/main/domain-registration/reserve.php): `domain-registration/reserve.php`
- [Checkout Form](https://github.com/richardtsalwa/hawlast/blob/main/domain-registration/includes/checkout.php): `domain-registration/includes/checkout.php`
- [Search Logging](https://github.com/richardtsalwa/hawlast/blob/main/domain-registration/includes/WriteDomain.php): `domain-registration/includes/WriteDomain.php`
- [Hosting Sales](https://github.com/richardtsalwa/hawlast/blob/main/domain-registration/hosting.php): `domain-registration/hosting.php`

### SaaS Services

- [SaaS Dashboard](https://github.com/richardtsalwa/hawlast/blob/main/saas/index.php): `saas/index.php`
- [Session Guard](https://github.com/richardtsalwa/hawlast/blob/main/saas/auth.php): `saas/auth.php`
- [Airtime Service](https://github.com/richardtsalwa/hawlast/blob/main/saas/airtime/index.php): `saas/airtime/index.php`
- [SMS Service](https://github.com/richardtsalwa/hawlast/blob/main/saas/sms/index.php): `saas/sms/index.php`
- [SMS Dispatch](https://github.com/richardtsalwa/hawlast/blob/main/saas/sms/sendsms.php): `saas/sms/sendsms.php`
- [Client Domain Search](https://github.com/richardtsalwa/hawlast/blob/main/saas/domain-search.php): `saas/domain-search.php`
- [Domain Navigation](https://github.com/richardtsalwa/hawlast/blob/main/saas/domain-nav.php): `saas/domain-nav.php`
- [Domain Pagination](https://github.com/richardtsalwa/hawlast/blob/main/saas/domain-paginator.php): `saas/domain-paginator.php`

### Payment Processing

- [M-PESA STK Request](https://github.com/richardtsalwa/hawlast/blob/main/pesa/stk.php): `pesa/stk.php`
- [M-PESA Confirmation](https://github.com/richardtsalwa/hawlast/blob/main/pesa/confirmation.php): `pesa/confirmation.php`
- [M-PESA Callback](https://github.com/richardtsalwa/hawlast/blob/main/pesa/stkcallback.php): `pesa/stkcallback.php`

### Client Operations

- [Admin Dashboard](https://github.com/richardtsalwa/hawlast/blob/main/admin/index.php): `admin/index.php`
- [Client Search](https://github.com/richardtsalwa/hawlast/blob/main/admin/search.php): `admin/search.php`
- [Admin Pagination](https://github.com/richardtsalwa/hawlast/blob/main/admin/classes/paginator.class.php): `admin/classes/paginator.class.php`
- **Client Records**
- [Shared Helpers](https://github.com/richardtsalwa/hawlast/blob/main/hawlastke.php): `hawlastke.php`

### Other components

- **Customer**

## Connections

- Customer → Marketing Site: opens (evidence: `index.php`)
- Marketing Site → Shared Site Shell: loads shell (evidence: `index.php`)
- Customer → Domain Search Landing: searches domain (evidence: `domain-registration/index.php`)
- Domain Search Landing → Domain Lookup: submits search (evidence: `domain-registration/index.php`)
- Domain Search Landing → Domain Reservation: starts reservation (evidence: `domain-registration/index.php`)
- Domain Reservation → Checkout Form: includes form (evidence: `domain-registration/reserve.php`)
- Domain Reservation → Search Logging: records search (evidence: `domain-registration/reserve.php`)
- Domain Reservation → M-PESA STK Request: posts request (evidence: `domain-registration/reserve.php`)
- Customer → Hosting Sales: views plans
- Customer → SaaS Dashboard: uses portal
- SaaS Dashboard → Session Guard: requires guard (evidence: `saas/index.php`)
- Client Domain Search → Session Guard: requires guard (evidence: `saas/domain-search.php`)
- Client Domain Search → Domain Navigation: includes navigation (evidence: `saas/domain-search.php`)
- Client Domain Search → Domain Pagination: uses pagination (evidence: `saas/domain-search.php`)
- Customer → Airtime Service: buys airtime
- Customer → SMS Service: uses SMS
- SMS Service → SMS Dispatch: dispatches SMS
- Customer → Admin Dashboard: administers accounts
- Admin Dashboard → Client Search: opens search
- Client Search → Admin Pagination: uses paginator (evidence: `admin/search.php`)
- Admin Dashboard → Client Records: reads counts
- Client Search → Client Records: searches records
- Domain Reservation → Shared Helpers: loads helpers (evidence: `domain-registration/reserve.php`)
- SaaS Dashboard → Shared Helpers: loads helpers (evidence: `saas/index.php`)
- M-PESA Confirmation → Shared Helpers: loads helpers (evidence: `pesa/confirmation.php`)
