# gichukikelvin67/construction-company-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/gichukikelvin67/construction-company-frontend
- Repository: https://github.com/gichukikelvin67/construction-company-frontend

## Overview

Aesthetics is a construction project-management frontend. Users can sign in, view an operations summary, and create or browse projects; the sampled code shows these screens calling service modules that use a shared API client. The README does not document additional product capabilities. Evidence is limited to the supplied excerpts and SOURCE INDEX references, so unsampled connections and backend internals are not inferred.

Main entry points: [`src/lib/api.ts`](https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/lib/api.ts) (HTTP API client), [`src/services/authService.ts`](https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/services/authService.ts) (Auth service), [`src/app/dashboard/page.tsx`](https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/app/dashboard/page.tsx) (Operations dashboard), [`src/app/login/page.tsx`](https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/app/login/page.tsx) (Sign in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_dashlayout["Dashboard layout<br/>[layout.tsx]"]
  node_home["Home route<br/>[page.tsx]"]
  node_rootlayout["Root layout<br/>[layout.tsx]"]
  node_theme["Theme provider<br/>[ThemeProvider.tsx]"]
end

subgraph group_identity["Identity"]
  node_login["Sign in<br/>[page.tsx]"]
  node_auth["Auth service<br/>[authService.ts]"]
  node_authstate["Auth context<br/>[AuthContext.tsx]"]
  node_authtypes["User and login types<br/>[auth.ts]"]
end

subgraph group_operations["Operations"]
  node_dashboard["Operations dashboard<br/>[page.tsx]"]
  node_dashservice["Dashboard service"]
  node_projects["Project list and creation<br/>[page.tsx]"]
  node_projectservice["Project service<br/>[projectService.ts]"]
  node_projectdetail["Project detail route<br/>[page.tsx]"]
  node_api["HTTP API client<br/>[api.ts]"]
end

node_user(("Company user"))
node_backend["Application API"]

node_user -->|"submits credentials"| node_login
node_login -->|"calls login"| node_auth
node_auth -->|"posts credentials"| node_api
node_auth -->|"uses response type"| node_authtypes
node_authstate -->|"uses user type"| node_authtypes
node_dashboard -->|"loads summary"| node_dashservice
node_projects -->|"loads and creates"| node_projectservice
node_dashservice -->|"requests summary"| node_api
node_projectservice -->|"requests projects"| node_api
node_api -->|"sends API requests"| node_backend
node_rootlayout -->|"wraps app"| node_theme
node_dashboard -->|"links to"| node_projects

click node_login "https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/app/login/page.tsx"
click node_auth "https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/services/authService.ts"
click node_authstate "https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/context/AuthContext.tsx"
click node_authtypes "https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/types/auth.ts"
click node_dashboard "https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/app/dashboard/page.tsx"
click node_dashservice "https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/services/dashboardService.ts"
click node_projects "https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/app/dashboard/projects/page.tsx"
click node_projectservice "https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/services/projectService.ts"
click node_projectdetail "https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/app/dashboard/projects/%5Bid%5D/page.tsx"
click node_dashlayout "https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/app/dashboard/layout.tsx"
click node_home "https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/app/page.tsx"
click node_rootlayout "https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/app/layout.tsx"
click node_theme "https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/components/providers/ThemeProvider.tsx"
click node_api "https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/lib/api.ts"

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_dashlayout,node_home,node_rootlayout,node_theme,node_user toneBlue
class node_login,node_auth,node_authstate,node_authtypes toneAmber
class node_dashboard,node_dashservice,node_projects,node_projectservice,node_projectdetail,node_api,node_backend toneMint
```

## Components

### App experience

- [Dashboard layout](https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/app/dashboard/layout.tsx): `src/app/dashboard/layout.tsx`
- [Home route](https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Root layout](https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/app/layout.tsx): `src/app/layout.tsx`
- [Theme provider](https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/components/providers/ThemeProvider.tsx): `src/components/providers/ThemeProvider.tsx`

### Identity

- [Sign in](https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/app/login/page.tsx): `src/app/login/page.tsx`
- [Auth service](https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/services/authService.ts): `src/services/authService.ts`
- [Auth context](https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [User and login types](https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/types/auth.ts): `src/types/auth.ts`

### Operations

- [Operations dashboard](https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/app/dashboard/page.tsx): `src/app/dashboard/page.tsx`
- [Dashboard service](https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/services/dashboardService.ts): `src/services/dashboardService.ts`
- [Project list and creation](https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/app/dashboard/projects/page.tsx): `src/app/dashboard/projects/page.tsx`
- [Project service](https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/services/projectService.ts): `src/services/projectService.ts`
- [Project detail route](https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/app/dashboard/projects/%5Bid%5D/page.tsx): `src/app/dashboard/projects/[id]/page.tsx`
- [HTTP API client](https://github.com/gichukikelvin67/construction-company-frontend/blob/main/src/lib/api.ts): `src/lib/api.ts`

### Other components

- **Company user**
- **Application API**

## Connections

- Company user → Sign in: submits credentials (evidence: `src/app/login/page.tsx`)
- Sign in → Auth service: calls login (evidence: `src/app/login/page.tsx`)
- Auth service → HTTP API client: posts credentials (evidence: `src/services/authService.ts`)
- Auth service → User and login types: uses response type (evidence: `src/services/authService.ts`)
- Auth context → User and login types: uses user type (evidence: `src/context/AuthContext.tsx`)
- Operations dashboard → Dashboard service: loads summary (evidence: `src/app/dashboard/page.tsx`)
- Project list and creation → Project service: loads and creates (evidence: `src/app/dashboard/projects/page.tsx`)
- Dashboard service → HTTP API client: requests summary (evidence: `src/services/dashboardService.ts`)
- Project service → HTTP API client: requests projects (evidence: `src/services/projectService.ts`)
- HTTP API client → Application API: sends API requests (evidence: `src/lib/api.ts`)
- Root layout → Theme provider: wraps app (evidence: `src/app/layout.tsx`)
- Operations dashboard → Project list and creation: links to (evidence: `src/app/dashboard/page.tsx`)
