# tasnimurrahmanshakir/egpservice architecture

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

- Interactive diagram: https://gitdiagram.com/tasnimurrahmanshakir/egpservice
- Repository: https://github.com/tasnimurrahmanshakir/egpservice

## Overview

This monorepo combines a public procurement-services portal with an admin application for tender and client operations, backed by shared API and schema packages. The principal admin workflow is an operator using a dashboard view, which calls shared API services to retrieve or mutate procurement records; client creation also passes through a server action. The public workflow is browsing localized pages and tender information, then opening a consultation form. Relationships for unsampled admin routes and features are limited to documented references; the README’s simulator claims are not confirmed by the supplied tree or excerpts.

Main entry points: [`apps/web/app`](https://github.com/tasnimurrahmanshakir/egpservice/tree/main/apps/web/app) (Portal pages), [`packages/api-client/src/client.ts`](https://github.com/tasnimurrahmanshakir/egpservice/blob/main/packages/api-client/src/client.ts) (API services), [`apps/web/context/LanguageContext.tsx`](https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/web/context/LanguageContext.tsx) (Language state), [`apps/web/components/sections`](https://github.com/tasnimurrahmanshakir/egpservice/tree/main/apps/web/components/sections) (Landing sections)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public portal"]
  node_public_pages["Portal pages"]
  node_sections["Landing sections"]
  node_navbar["Navigation<br/>[Navbar.tsx]"]
  node_footer["Footer links<br/>[Footer.tsx]"]
  node_lead["Consultation form<br/>[LeadModal.tsx]"]
  node_tender_data["Tender listings<br/>[winningTenders.ts]"]
  node_language["Language state"]
  node_translations["Translations<br/>[translations.ts]"]
  node_inview["Viewport observer<br/>[useInView.ts]"]
end

subgraph group_admin["Admin operations"]
  node_dashboard["Dashboard views"]
  node_client_actions["Client actions<br/>[clientActions.ts]"]
  node_client_modals["Client dialogs<br/>[ClientModals.tsx]"]
  node_ledger["Client ledger"]
  node_pdf_routes["PDF endpoints"]
end

subgraph group_shared["Shared services"]
  node_api_client["API services<br/>[client.ts]"]
  node_api_types["API types<br/>[types.ts]"]
  node_schema["Domain schemas"]
end

subgraph group_ui["Shared UI"]
  node_ui_components["UI components"]
end

node_visitor(("Visitor"))
node_operator(("Admin operator"))
node_backend[("Procurement backend")]

node_visitor -->|"browses"| node_public_pages
node_public_pages -->|"renders"| node_sections
node_public_pages -->|"renders"| node_navbar
node_public_pages -->|"opens"| node_lead
node_public_pages -->|"reads"| node_tender_data
node_public_pages -->|"renders"| node_footer
node_sections -->|"reads"| node_language
node_sections -->|"observes"| node_inview
node_navbar -->|"reads"| node_language
node_footer -->|"reads"| node_language
node_lead -->|"reads"| node_language
node_language -->|"loads"| node_translations
node_operator -->|"uses"| node_dashboard
node_dashboard -->|"requests data"| node_api_client
node_dashboard -->|"uses"| node_ui_components
node_client_modals -->|"submits"| node_client_actions
node_client_actions -->|"calls"| node_api_client
node_client_actions -->|"validates with"| node_schema
node_ledger -->|"requests data"| node_api_client
node_pdf_routes -->|"fetches PDFs"| node_backend
node_api_client -->|"uses types"| node_api_types
node_api_client -->|"uses schemas"| node_schema
node_api_client -->|"sends requests"| node_backend

click node_public_pages "https://github.com/tasnimurrahmanshakir/egpservice/tree/main/apps/web/app"
click node_sections "https://github.com/tasnimurrahmanshakir/egpservice/tree/main/apps/web/components/sections"
click node_navbar "https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/web/components/Navbar.tsx"
click node_footer "https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/web/components/Footer.tsx"
click node_lead "https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/web/components/LeadModal.tsx"
click node_tender_data "https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/web/data/winningTenders.ts"
click node_language "https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/web/context/LanguageContext.tsx"
click node_translations "https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/web/data/translations.ts"
click node_inview "https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/web/hooks/useInView.ts"
click node_dashboard "https://github.com/tasnimurrahmanshakir/egpservice/tree/main/apps/admin/app/(dashboard)"
click node_client_actions "https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/admin/app/actions/clientActions.ts"
click node_client_modals "https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/admin/components/clients/ClientModals.tsx"
click node_ledger "https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/admin/components/clients/ClientLedgerModal.tsx"
click node_pdf_routes "https://github.com/tasnimurrahmanshakir/egpservice/tree/main/apps/admin/app/api"
click node_api_client "https://github.com/tasnimurrahmanshakir/egpservice/blob/main/packages/api-client/src/client.ts"
click node_api_types "https://github.com/tasnimurrahmanshakir/egpservice/blob/main/packages/api-client/src/types.ts"
click node_schema "https://github.com/tasnimurrahmanshakir/egpservice/tree/main/packages/schema/src"
click node_ui_components "https://github.com/tasnimurrahmanshakir/egpservice/tree/main/packages/ui/src"

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_public_pages,node_sections,node_navbar,node_footer,node_lead,node_tender_data,node_language,node_translations,node_inview toneBlue
class node_dashboard,node_client_actions,node_client_modals,node_ledger,node_pdf_routes,node_backend toneAmber
class node_api_client,node_api_types,node_schema toneMint
class node_ui_components toneRose
class node_visitor,node_operator toneIndigo
```

## Components

### Public portal

- [Portal pages](https://github.com/tasnimurrahmanshakir/egpservice/tree/main/apps/web/app): `apps/web/app`
- [Landing sections](https://github.com/tasnimurrahmanshakir/egpservice/tree/main/apps/web/components/sections): `apps/web/components/sections`
- [Navigation](https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/web/components/Navbar.tsx): `apps/web/components/Navbar.tsx`
- [Footer links](https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/web/components/Footer.tsx): `apps/web/components/Footer.tsx`
- [Consultation form](https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/web/components/LeadModal.tsx): `apps/web/components/LeadModal.tsx`
- [Tender listings](https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/web/data/winningTenders.ts): `apps/web/data/winningTenders.ts`
- [Language state](https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/web/context/LanguageContext.tsx): `apps/web/context/LanguageContext.tsx`
- [Translations](https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/web/data/translations.ts): `apps/web/data/translations.ts`
- [Viewport observer](https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/web/hooks/useInView.ts): `apps/web/hooks/useInView.ts`

### Admin operations

- [Dashboard views](https://github.com/tasnimurrahmanshakir/egpservice/tree/main/apps/admin/app/(dashboard)): `apps/admin/app/(dashboard)`
- [Client actions](https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/admin/app/actions/clientActions.ts): `apps/admin/app/actions/clientActions.ts`
- [Client dialogs](https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/admin/components/clients/ClientModals.tsx): `apps/admin/components/clients/ClientModals.tsx`
- [Client ledger](https://github.com/tasnimurrahmanshakir/egpservice/blob/main/apps/admin/components/clients/ClientLedgerModal.tsx): `apps/admin/components/clients/ClientLedgerModal.tsx`
- [PDF endpoints](https://github.com/tasnimurrahmanshakir/egpservice/tree/main/apps/admin/app/api): `apps/admin/app/api`

### Shared services

- [API services](https://github.com/tasnimurrahmanshakir/egpservice/blob/main/packages/api-client/src/client.ts): `packages/api-client/src/client.ts`
- [API types](https://github.com/tasnimurrahmanshakir/egpservice/blob/main/packages/api-client/src/types.ts): `packages/api-client/src/types.ts`
- [Domain schemas](https://github.com/tasnimurrahmanshakir/egpservice/tree/main/packages/schema/src): `packages/schema/src`

### Shared UI

- [UI components](https://github.com/tasnimurrahmanshakir/egpservice/tree/main/packages/ui/src): `packages/ui/src`

### Other components

- **Visitor**
- **Admin operator**
- **Procurement backend**

## Connections

- Visitor → Portal pages: browses (evidence: `apps/web/app/page.tsx`)
- Portal pages → Landing sections: renders (evidence: `apps/web/app/page.tsx`)
- Portal pages → Navigation: renders (evidence: `apps/web/app/page.tsx`)
- Portal pages → Consultation form: opens (evidence: `apps/web/app/page.tsx`)
- Portal pages → Tender listings: reads (evidence: `apps/web/app/winning-tenders/page.tsx`)
- Portal pages → Footer links: renders (evidence: `apps/web/app/page.tsx`)
- Landing sections → Language state: reads (evidence: `apps/web/components/sections/ClientsSection.tsx`)
- Landing sections → Viewport observer: observes (evidence: `apps/web/components/sections/ClientsSection.tsx`)
- Navigation → Language state: reads (evidence: `apps/web/components/Navbar.tsx`)
- Footer links → Language state: reads (evidence: `apps/web/components/Footer.tsx`)
- Consultation form → Language state: reads (evidence: `apps/web/components/LeadModal.tsx`)
- Language state → Translations: loads (evidence: `apps/web/context/LanguageContext.tsx`)
- Admin operator → Dashboard views: uses (evidence: `apps/admin/app/(dashboard)/clients/ClientsClientView.tsx`)
- Dashboard views → API services: requests data (evidence: `apps/admin/app/(dashboard)/clients/ClientsClientView.tsx`)
- Dashboard views → UI components: uses (evidence: `apps/admin/app/(dashboard)/clients/ClientsClientView.tsx`)
- Client dialogs → Client actions: submits (evidence: `apps/admin/components/clients/ClientModals.tsx`)
- Client actions → API services: calls (evidence: `apps/admin/app/actions/clientActions.ts`)
- Client actions → Domain schemas: validates with (evidence: `apps/admin/app/actions/clientActions.ts`)
- Client ledger → API services: requests data (evidence: `apps/admin/components/clients/ClientLedgerModal.tsx`)
- PDF endpoints → Procurement backend: fetches PDFs (evidence: `apps/admin/app/api/invoices/[id]/pdf/route.ts`)
- API services → API types: uses types (evidence: `packages/api-client/src/client.ts`)
- API services → Domain schemas: uses schemas (evidence: `packages/api-client/src/client.ts`)
- API services → Procurement backend: sends requests (evidence: `packages/api-client/src/client.ts`)
