# rupa3670/real-estate-client architecture

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

- Interactive diagram: https://gitdiagram.com/rupa3670/real-estate-client
- Repository: https://github.com/rupa3670/real-estate-client

## Overview

This is a Next.js real-estate management client: users sign in, enter a role-aware dashboard, review project statistics, and manage projects, engineers, masons, and users. Feature pages invoke query/mutation hooks, which use a shared Axios client to communicate with an external API. The sampled sources establish these data paths; the backend implementation and some UI wiring were not shown, so those relationships are omitted.

Main entry points: [`src/url/useAxios.ts`](https://github.com/rupa3670/real-estate-client/blob/main/src/url/useAxios.ts) (Axios client), [`src/app/dashboard/projects`](https://github.com/rupa3670/real-estate-client/tree/main/src/app/dashboard/projects) (Project pages), [`src/app/dashboard/engineers`](https://github.com/rupa3670/real-estate-client/tree/main/src/app/dashboard/engineers) (Engineer pages), [`src/app/dashboard/users`](https://github.com/rupa3670/real-estate-client/tree/main/src/app/dashboard/users) (User pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and dashboard"]
  node_login["Login page<br/>[page.tsx]"]
  node_loginform["Login form<br/>[LoginForm.tsx]"]
  node_auth["Auth queries<br/>[useAuth.ts]"]
  node_usercontext["User context<br/>[UserContext.tsx]"]
  node_dashboard["Dashboard overview<br/>[page.tsx]"]
  node_dashstats["Dashboard statistics"]
  node_charts["Dashboard charts"]
end

subgraph group_operations["Project operations"]
  node_projects["Project pages"]
  node_projectform["Project form<br/>[ProjectForm.tsx]"]
  node_projecttable["Project table<br/>[ProjectTable.tsx]"]
  node_projectdata["Project queries<br/>[useProject.ts]"]
end

subgraph group_workforce["Workforce management"]
  node_engineers["Engineer pages"]
  node_engineerform["Engineer form<br/>[EngineerForm.tsx]"]
  node_engineertable["Engineer table<br/>[EngineerTable.tsx]"]
  node_engineerdata["Engineer queries<br/>[useEngineer.ts]"]
  node_mesons["Meson pages"]
  node_mesonform["Meson form<br/>[MesonForm.tsx]"]
  node_mesontable["Meson table<br/>[MesonTable.tsx]"]
  node_mesondata["Meson queries<br/>[useMason.ts]"]
  node_users["User pages"]
  node_userform["User form<br/>[userForm.tsx]"]
  node_usertable["Users table<br/>[UsersTable.tsx]"]
  node_userdata["User queries<br/>[useUser.ts]"]
end

subgraph group_platform["Client data access"]
  node_axios["Axios client<br/>[useAxios.ts]"]
  node_api{{"Management API"}}
end

node_visitor(("User"))

node_visitor -->|"opens"| node_login
node_login -->|"renders"| node_loginform
node_visitor -.->|"views"| node_dashboard
node_dashboard -->|"loads"| node_dashstats
node_dashboard -->|"renders"| node_charts
node_dashboard -->|"reads role"| node_usercontext
node_charts -->|"uses data"| node_dashstats
node_projects -->|"renders"| node_projectform
node_projects -->|"renders"| node_projecttable
node_projects -->|"queries"| node_projectdata
node_projects -->|"reads user"| node_usercontext
node_projectdata -->|"uses client"| node_axios
node_engineers -->|"renders"| node_engineerform
node_engineers -->|"renders"| node_engineertable
node_engineers -->|"queries"| node_engineerdata
node_engineers -->|"reads user"| node_usercontext
node_engineerdata -->|"uses client"| node_axios
node_mesons -->|"renders"| node_mesonform
node_mesons -->|"renders"| node_mesontable
node_mesons -->|"queries"| node_mesondata
node_mesondata -->|"uses client"| node_axios
node_users -->|"renders"| node_userform
node_users -->|"renders"| node_usertable
node_users -->|"queries"| node_userdata
node_users -->|"reads user"| node_usercontext
node_userdata -->|"uses client"| node_axios
node_dashstats -->|"uses client"| node_axios
node_auth -->|"uses client"| node_axios
node_axios -->|"sends requests"| node_api

click node_login "https://github.com/rupa3670/real-estate-client/blob/main/src/app/login/page.tsx"
click node_loginform "https://github.com/rupa3670/real-estate-client/blob/main/src/components/LoginForm.tsx"
click node_auth "https://github.com/rupa3670/real-estate-client/blob/main/src/hooks/useAuth.ts"
click node_usercontext "https://github.com/rupa3670/real-estate-client/blob/main/src/app/dashboard/UserContext.tsx"
click node_dashboard "https://github.com/rupa3670/real-estate-client/blob/main/src/app/dashboard/page.tsx"
click node_dashstats "https://github.com/rupa3670/real-estate-client/blob/main/src/hooks/useDashboardState.ts"
click node_charts "https://github.com/rupa3670/real-estate-client/blob/main/src/components/DashboardCharts.tsx"
click node_projects "https://github.com/rupa3670/real-estate-client/tree/main/src/app/dashboard/projects"
click node_projectform "https://github.com/rupa3670/real-estate-client/blob/main/src/components/ProjectForm.tsx"
click node_projecttable "https://github.com/rupa3670/real-estate-client/blob/main/src/components/ProjectTable.tsx"
click node_projectdata "https://github.com/rupa3670/real-estate-client/blob/main/src/hooks/useProject.ts"
click node_engineers "https://github.com/rupa3670/real-estate-client/tree/main/src/app/dashboard/engineers"
click node_engineerform "https://github.com/rupa3670/real-estate-client/blob/main/src/components/EngineerForm.tsx"
click node_engineertable "https://github.com/rupa3670/real-estate-client/blob/main/src/components/EngineerTable.tsx"
click node_engineerdata "https://github.com/rupa3670/real-estate-client/blob/main/src/hooks/useEngineer.ts"
click node_mesons "https://github.com/rupa3670/real-estate-client/tree/main/src/app/dashboard/meson"
click node_mesonform "https://github.com/rupa3670/real-estate-client/blob/main/src/components/MesonForm.tsx"
click node_mesontable "https://github.com/rupa3670/real-estate-client/blob/main/src/components/MesonTable.tsx"
click node_mesondata "https://github.com/rupa3670/real-estate-client/blob/main/src/hooks/useMason.ts"
click node_users "https://github.com/rupa3670/real-estate-client/tree/main/src/app/dashboard/users"
click node_userform "https://github.com/rupa3670/real-estate-client/blob/main/src/components/userForm.tsx"
click node_usertable "https://github.com/rupa3670/real-estate-client/blob/main/src/components/UsersTable.tsx"
click node_userdata "https://github.com/rupa3670/real-estate-client/blob/main/src/hooks/useUser.ts"
click node_axios "https://github.com/rupa3670/real-estate-client/blob/main/src/url/useAxios.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_login,node_loginform,node_auth,node_usercontext,node_dashboard,node_dashstats,node_charts,node_visitor toneBlue
class node_projects,node_projectform,node_projecttable,node_projectdata toneAmber
class node_engineers,node_engineerform,node_engineertable,node_engineerdata,node_mesons,node_mesonform,node_mesontable,node_mesondata,node_users,node_userform,node_usertable,node_userdata toneMint
class node_axios,node_api toneRose
```

## Components

### Access and dashboard

- [Login page](https://github.com/rupa3670/real-estate-client/blob/main/src/app/login/page.tsx): `src/app/login/page.tsx`
- [Login form](https://github.com/rupa3670/real-estate-client/blob/main/src/components/LoginForm.tsx): `src/components/LoginForm.tsx`
- [Auth queries](https://github.com/rupa3670/real-estate-client/blob/main/src/hooks/useAuth.ts): `src/hooks/useAuth.ts`
- [User context](https://github.com/rupa3670/real-estate-client/blob/main/src/app/dashboard/UserContext.tsx): `src/app/dashboard/UserContext.tsx`
- [Dashboard overview](https://github.com/rupa3670/real-estate-client/blob/main/src/app/dashboard/page.tsx): `src/app/dashboard/page.tsx`
- [Dashboard statistics](https://github.com/rupa3670/real-estate-client/blob/main/src/hooks/useDashboardState.ts): `src/hooks/useDashboardState.ts`
- [Dashboard charts](https://github.com/rupa3670/real-estate-client/blob/main/src/components/DashboardCharts.tsx): `src/components/DashboardCharts.tsx`

### Project operations

- [Project pages](https://github.com/rupa3670/real-estate-client/tree/main/src/app/dashboard/projects): `src/app/dashboard/projects`
- [Project form](https://github.com/rupa3670/real-estate-client/blob/main/src/components/ProjectForm.tsx): `src/components/ProjectForm.tsx`
- [Project table](https://github.com/rupa3670/real-estate-client/blob/main/src/components/ProjectTable.tsx): `src/components/ProjectTable.tsx`
- [Project queries](https://github.com/rupa3670/real-estate-client/blob/main/src/hooks/useProject.ts): `src/hooks/useProject.ts`

### Workforce management

- [Engineer pages](https://github.com/rupa3670/real-estate-client/tree/main/src/app/dashboard/engineers): `src/app/dashboard/engineers`
- [Engineer form](https://github.com/rupa3670/real-estate-client/blob/main/src/components/EngineerForm.tsx): `src/components/EngineerForm.tsx`
- [Engineer table](https://github.com/rupa3670/real-estate-client/blob/main/src/components/EngineerTable.tsx): `src/components/EngineerTable.tsx`
- [Engineer queries](https://github.com/rupa3670/real-estate-client/blob/main/src/hooks/useEngineer.ts): `src/hooks/useEngineer.ts`
- [Meson pages](https://github.com/rupa3670/real-estate-client/tree/main/src/app/dashboard/meson): `src/app/dashboard/meson`
- [Meson form](https://github.com/rupa3670/real-estate-client/blob/main/src/components/MesonForm.tsx): `src/components/MesonForm.tsx`
- [Meson table](https://github.com/rupa3670/real-estate-client/blob/main/src/components/MesonTable.tsx): `src/components/MesonTable.tsx`
- [Meson queries](https://github.com/rupa3670/real-estate-client/blob/main/src/hooks/useMason.ts): `src/hooks/useMason.ts`
- [User pages](https://github.com/rupa3670/real-estate-client/tree/main/src/app/dashboard/users): `src/app/dashboard/users`
- [User form](https://github.com/rupa3670/real-estate-client/blob/main/src/components/userForm.tsx): `src/components/userForm.tsx`
- [Users table](https://github.com/rupa3670/real-estate-client/blob/main/src/components/UsersTable.tsx): `src/components/UsersTable.tsx`
- [User queries](https://github.com/rupa3670/real-estate-client/blob/main/src/hooks/useUser.ts): `src/hooks/useUser.ts`

### Client data access

- [Axios client](https://github.com/rupa3670/real-estate-client/blob/main/src/url/useAxios.ts): `src/url/useAxios.ts`
- **Management API**

### Other components

- **User**

## Connections

- User → Login page: opens (evidence: `src/app/login/page.tsx`)
- Login page → Login form: renders (evidence: `src/app/login/page.tsx`)
- User → Dashboard overview: views
- Dashboard overview → Dashboard statistics: loads (evidence: `src/app/dashboard/page.tsx`)
- Dashboard overview → Dashboard charts: renders (evidence: `src/app/dashboard/page.tsx`)
- Dashboard overview → User context: reads role (evidence: `src/app/dashboard/page.tsx`)
- Dashboard charts → Dashboard statistics: uses data (evidence: `src/components/DashboardCharts.tsx`)
- Project pages → Project form: renders (evidence: `src/app/dashboard/projects/new/page.tsx`)
- Project pages → Project table: renders (evidence: `src/app/dashboard/projects/page.tsx`)
- Project pages → Project queries: queries (evidence: `src/app/dashboard/projects/page.tsx`)
- Project pages → User context: reads user (evidence: `src/app/dashboard/projects/page.tsx`)
- Project queries → Axios client: uses client (evidence: `src/hooks/useProject.ts`)
- Engineer pages → Engineer form: renders (evidence: `src/app/dashboard/engineers/new/page.tsx`)
- Engineer pages → Engineer table: renders (evidence: `src/app/dashboard/engineers/page.tsx`)
- Engineer pages → Engineer queries: queries (evidence: `src/app/dashboard/engineers/page.tsx`)
- Engineer pages → User context: reads user (evidence: `src/app/dashboard/engineers/page.tsx`)
- Engineer queries → Axios client: uses client (evidence: `src/hooks/useEngineer.ts`)
- Meson pages → Meson form: renders (evidence: `src/app/dashboard/meson/new/page.tsx`)
- Meson pages → Meson table: renders (evidence: `src/app/dashboard/meson/page.tsx`)
- Meson pages → Meson queries: queries (evidence: `src/app/dashboard/meson/page.tsx`)
- Meson queries → Axios client: uses client (evidence: `src/hooks/useMason.ts`)
- User pages → User form: renders (evidence: `src/app/dashboard/users/new/page.tsx`)
- User pages → Users table: renders (evidence: `src/app/dashboard/users/page.tsx`)
- User pages → User queries: queries (evidence: `src/app/dashboard/users/page.tsx`)
- User pages → User context: reads user (evidence: `src/app/dashboard/users/page.tsx`)
- User queries → Axios client: uses client (evidence: `src/hooks/useUser.ts`)
- Dashboard statistics → Axios client: uses client (evidence: `src/hooks/useDashboardState.ts`)
- Auth queries → Axios client: uses client (evidence: `src/hooks/useAuth.ts`)
- Axios client → Management API: sends requests (evidence: `src/url/useAxios.ts`)
