# paulmburu-034/microtech architecture

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

- Interactive diagram: https://gitdiagram.com/paulmburu-034/microtech
- Repository: https://github.com/paulmburu-034/microtech

## Overview

This is a Yii web application for civil birth and death registration, with certificate lookup/production, registration-center and geographic administration, reporting, accounts, and role-based administration. The main workflow is a user entering through the web front controller, then using registration controllers to validate and persist records; certificate lookup and reporting are separate user-facing branches. Controller excerpts support some record and certificate interactions, while the README identifies only the Yii template baseline. Several branches are represented from the tree and menu; their internal calls were not sampled, so those links are omitted.

Main entry points: [`controllers/DeathDetailsController.php`](https://github.com/paulmburu-034/microtech/blob/master/controllers/DeathDetailsController.php) (Death registration), [`models/User.php`](https://github.com/paulmburu-034/microtech/blob/master/models/User.php) (User identity), [`controllers/SiteController.php`](https://github.com/paulmburu-034/microtech/blob/master/controllers/SiteController.php) (Site and account pages), [`controllers/BirthDetailsController.php`](https://github.com/paulmburu-034/microtech/blob/master/controllers/BirthDetailsController.php) (Birth registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry"]
  node_front["Web front controller<br/>[index.php]"]
  node_web_config["Web configuration<br/>[web.php]"]
end

subgraph group_identity["Accounts and access"]
  node_site["Site and account pages<br/>[SiteController.php]"]
  node_login["Login form<br/>[LoginForm.php]"]
  node_signup["Signup form<br/>[SignupForm.php]"]
  node_contact["Contact form<br/>[ContactForm.php]"]
  node_user_model["User identity<br/>[User.php]"]
  node_profiles["User profiles<br/>[Profiles.php]"]
  node_auth_controller["Authorization management"]
  node_auth_items["Authorization items<br/>[AuthItem.php]"]
  node_auth_children["Authorization hierarchy<br/>[AuthItemChild.php]"]
  node_auth_assignments["User role assignments<br/>[AuthAssignment.php]"]
end

subgraph group_registration["Civil registration"]
  node_birth_controller["Birth registration"]
  node_birth_records["Birth records<br/>[BirthDetails.php]"]
  node_death_controller["Death registration"]
  node_death_records["Death records<br/>[DeathDetails.php]"]
  node_certificates["Certificate search and issue"]
  node_certificate_model["Certificate model<br/>[Certificates.php]"]
end

subgraph group_admin["Administration and reporting"]
  node_center_controller["Center management"]
  node_centers["Registration centers"]
  node_number_series["Certificate number series<br/>[NumberSeries.php]"]
  node_county["County administration<br/>[County.php]"]
  node_constituency["Constituency administration<br/>[Constituency.php]"]
  node_analysis["Registration analysis"]
end

node_user_actor(("User"))
node_database[("Application database")]

node_user_actor -->|"requests pages"| node_front
node_front -->|"loads configuration"| node_web_config
node_web_config -->|"configures identity"| node_user_model
node_web_config -->|"configures connection"| node_database
node_site -->|"uses form"| node_login
node_site -->|"uses form"| node_signup
node_site -->|"uses form"| node_contact
node_login -->|"looks up users"| node_user_model
node_signup -->|"creates users"| node_user_model
node_signup -->|"creates profiles"| node_profiles
node_auth_items -->|"relates assignments"| node_auth_assignments
node_auth_items -->|"relates hierarchy"| node_auth_children
node_birth_controller -->|"queries and saves"| node_birth_records
node_birth_controller -->|"uses numbering"| node_number_series
node_birth_controller -->|"looks up center"| node_centers
node_death_controller -->|"queries and saves"| node_death_records
node_death_controller -->|"checks birth record"| node_birth_records
node_death_controller -->|"looks up center"| node_centers
node_death_controller -.->|"uses numbering"| node_number_series
node_certificates -->|"queries records"| node_birth_records
node_certificates -->|"queries records"| node_death_records
node_certificates -->|"uses model"| node_certificate_model
node_center_controller -->|"queries and saves"| node_centers
node_center_controller -->|"uses user identity"| node_user_model
node_center_controller -->|"uses constituency"| node_constituency
node_constituency -->|"relates county"| node_county

click node_front "https://github.com/paulmburu-034/microtech/blob/master/web/index.php"
click node_web_config "https://github.com/paulmburu-034/microtech/blob/master/config/web.php"
click node_site "https://github.com/paulmburu-034/microtech/blob/master/controllers/SiteController.php"
click node_login "https://github.com/paulmburu-034/microtech/blob/master/models/LoginForm.php"
click node_signup "https://github.com/paulmburu-034/microtech/blob/master/models/SignupForm.php"
click node_contact "https://github.com/paulmburu-034/microtech/blob/master/models/ContactForm.php"
click node_user_model "https://github.com/paulmburu-034/microtech/blob/master/models/User.php"
click node_profiles "https://github.com/paulmburu-034/microtech/blob/master/models/Profiles.php"
click node_auth_controller "https://github.com/paulmburu-034/microtech/blob/master/controllers/AuthItemController.php"
click node_auth_items "https://github.com/paulmburu-034/microtech/blob/master/models/AuthItem.php"
click node_auth_children "https://github.com/paulmburu-034/microtech/blob/master/models/AuthItemChild.php"
click node_auth_assignments "https://github.com/paulmburu-034/microtech/blob/master/models/AuthAssignment.php"
click node_birth_controller "https://github.com/paulmburu-034/microtech/blob/master/controllers/BirthDetailsController.php"
click node_birth_records "https://github.com/paulmburu-034/microtech/blob/master/models/BirthDetails.php"
click node_death_controller "https://github.com/paulmburu-034/microtech/blob/master/controllers/DeathDetailsController.php"
click node_death_records "https://github.com/paulmburu-034/microtech/blob/master/models/DeathDetails.php"
click node_certificates "https://github.com/paulmburu-034/microtech/blob/master/controllers/CertificatesController.php"
click node_certificate_model "https://github.com/paulmburu-034/microtech/blob/master/models/Certificates.php"
click node_center_controller "https://github.com/paulmburu-034/microtech/blob/master/controllers/RegistrationCenterController.php"
click node_centers "https://github.com/paulmburu-034/microtech/blob/master/models/RegistrationCenter.php"
click node_number_series "https://github.com/paulmburu-034/microtech/blob/master/models/NumberSeries.php"
click node_county "https://github.com/paulmburu-034/microtech/blob/master/models/County.php"
click node_constituency "https://github.com/paulmburu-034/microtech/blob/master/models/Constituency.php"
click node_analysis "https://github.com/paulmburu-034/microtech/blob/master/controllers/AnalysisController.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_front,node_web_config,node_user_actor toneBlue
class node_site,node_login,node_signup,node_contact,node_user_model,node_profiles,node_auth_controller,node_auth_items,node_auth_children,node_auth_assignments,node_database toneAmber
class node_birth_controller,node_birth_records,node_death_controller,node_death_records,node_certificates,node_certificate_model toneMint
class node_center_controller,node_centers,node_number_series,node_county,node_constituency,node_analysis toneRose
```

## Components

### Web entry

- [Web front controller](https://github.com/paulmburu-034/microtech/blob/master/web/index.php): `web/index.php`
- [Web configuration](https://github.com/paulmburu-034/microtech/blob/master/config/web.php): `config/web.php`

### Accounts and access

- [Site and account pages](https://github.com/paulmburu-034/microtech/blob/master/controllers/SiteController.php): `controllers/SiteController.php`
- [Login form](https://github.com/paulmburu-034/microtech/blob/master/models/LoginForm.php): `models/LoginForm.php`
- [Signup form](https://github.com/paulmburu-034/microtech/blob/master/models/SignupForm.php): `models/SignupForm.php`
- [Contact form](https://github.com/paulmburu-034/microtech/blob/master/models/ContactForm.php): `models/ContactForm.php`
- [User identity](https://github.com/paulmburu-034/microtech/blob/master/models/User.php): `models/User.php`
- [User profiles](https://github.com/paulmburu-034/microtech/blob/master/models/Profiles.php): `models/Profiles.php`
- [Authorization management](https://github.com/paulmburu-034/microtech/blob/master/controllers/AuthItemController.php): `controllers/AuthItemController.php`
- [Authorization items](https://github.com/paulmburu-034/microtech/blob/master/models/AuthItem.php): `models/AuthItem.php`
- [Authorization hierarchy](https://github.com/paulmburu-034/microtech/blob/master/models/AuthItemChild.php): `models/AuthItemChild.php`
- [User role assignments](https://github.com/paulmburu-034/microtech/blob/master/models/AuthAssignment.php): `models/AuthAssignment.php`

### Civil registration

- [Birth registration](https://github.com/paulmburu-034/microtech/blob/master/controllers/BirthDetailsController.php): `controllers/BirthDetailsController.php`
- [Birth records](https://github.com/paulmburu-034/microtech/blob/master/models/BirthDetails.php): `models/BirthDetails.php`
- [Death registration](https://github.com/paulmburu-034/microtech/blob/master/controllers/DeathDetailsController.php): `controllers/DeathDetailsController.php`
- [Death records](https://github.com/paulmburu-034/microtech/blob/master/models/DeathDetails.php): `models/DeathDetails.php`
- [Certificate search and issue](https://github.com/paulmburu-034/microtech/blob/master/controllers/CertificatesController.php): `controllers/CertificatesController.php`
- [Certificate model](https://github.com/paulmburu-034/microtech/blob/master/models/Certificates.php): `models/Certificates.php`

### Administration and reporting

- [Center management](https://github.com/paulmburu-034/microtech/blob/master/controllers/RegistrationCenterController.php): `controllers/RegistrationCenterController.php`
- [Registration centers](https://github.com/paulmburu-034/microtech/blob/master/models/RegistrationCenter.php): `models/RegistrationCenter.php`
- [Certificate number series](https://github.com/paulmburu-034/microtech/blob/master/models/NumberSeries.php): `models/NumberSeries.php`
- [County administration](https://github.com/paulmburu-034/microtech/blob/master/models/County.php): `models/County.php`
- [Constituency administration](https://github.com/paulmburu-034/microtech/blob/master/models/Constituency.php): `models/Constituency.php`
- [Registration analysis](https://github.com/paulmburu-034/microtech/blob/master/controllers/AnalysisController.php): `controllers/AnalysisController.php`

### Other components

- **User**
- **Application database**

## Connections

- User → Web front controller: requests pages
- Web front controller → Web configuration: loads configuration (evidence: `web/index.php`)
- Web configuration → User identity: configures identity (evidence: `config/web.php`)
- Web configuration → Application database: configures connection
- Site and account pages → Login form: uses form (evidence: `controllers/SiteController.php`)
- Site and account pages → Signup form: uses form (evidence: `controllers/SiteController.php`)
- Site and account pages → Contact form: uses form (evidence: `controllers/SiteController.php`)
- Login form → User identity: looks up users (evidence: `models/LoginForm.php`)
- Signup form → User identity: creates users (evidence: `models/SignupForm.php`)
- Signup form → User profiles: creates profiles (evidence: `models/SignupForm.php`)
- Authorization items → User role assignments: relates assignments (evidence: `models/AuthItem.php`)
- Authorization items → Authorization hierarchy: relates hierarchy (evidence: `models/AuthItem.php`)
- Birth registration → Birth records: queries and saves (evidence: `controllers/BirthDetailsController.php`)
- Birth registration → Certificate number series: uses numbering (evidence: `controllers/BirthDetailsController.php`)
- Birth registration → Registration centers: looks up center (evidence: `controllers/BirthDetailsController.php`)
- Death registration → Death records: queries and saves (evidence: `controllers/DeathDetailsController.php`)
- Death registration → Birth records: checks birth record (evidence: `controllers/DeathDetailsController.php`)
- Death registration → Registration centers: looks up center (evidence: `controllers/DeathDetailsController.php`)
- Death registration → Certificate number series: uses numbering (evidence: `controllers/DeathDetailsController.php`)
- Certificate search and issue → Birth records: queries records (evidence: `controllers/CertificatesController.php`)
- Certificate search and issue → Death records: queries records (evidence: `controllers/CertificatesController.php`)
- Certificate search and issue → Certificate model: uses model (evidence: `controllers/CertificatesController.php`)
- Center management → Registration centers: queries and saves (evidence: `controllers/RegistrationCenterController.php`)
- Center management → User identity: uses user identity (evidence: `controllers/RegistrationCenterController.php`)
- Center management → Constituency administration: uses constituency (evidence: `controllers/RegistrationCenterController.php`)
- Constituency administration → County administration: relates county (evidence: `models/Constituency.php`)
