# ophireumtechnology/ompnetwork architecture

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

- Interactive diagram: https://gitdiagram.com/ophireumtechnology/ompnetwork
- Repository: https://github.com/ophireumtechnology/ompnetwork

## Overview

Ophireum is a digital-services business site with an AI consultant and a client portal for authentication, shopping, payments, projects, and account support. Visitors explore services and can start a consultation; portal users authenticate and use client and commerce features backed by an API and repositories. The graph preserves the major public-site and portal areas shown in the tree. Some page and server behavior is unsampled, so edges are limited to relationships indicated by excerpts or the source index.

Main entry points: [`src/server/app.ts`](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/app.ts) (API Application), [`src/App.tsx`](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/App.tsx) (Site App), [`src/components/consultant/AIConsultantWidget.tsx`](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/components/consultant/AIConsultantWidget.tsx) (AI Consultant), [`src/portal/ClientPortalApp.tsx`](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/portal/ClientPortalApp.tsx) (Portal App)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public Website"]
  node_app["Site App<br/>[App.tsx]"]
  node_services["Services Catalog"]
  node_catalog["Service Catalog Data<br/>[serviceCatalog.ts]"]
  node_servicecards["Service Views<br/>[ServiceCard.tsx]"]
  node_serviceicon["Service Icons"]
  node_portfolio["Portfolio"]
  node_enterprise["Enterprise Suite"]
  node_brand["Brand Assets<br/>[brandAssets.ts]"]
end

subgraph group_consult["Consultation"]
  node_consultant["AI Consultant"]
  node_consultsvc["Consultant Services"]
  node_voice["AI Voice<br/>[aiVoiceService.ts]"]
  node_booking["Appointment Booking"]
  node_brief["Project Brief"]
end

subgraph group_portal["Client Portal"]
  node_portalapp["Portal App"]
  node_router["Portal Router<br/>[PortalRouter.tsx]"]
  node_auth["Portal Authentication"]
  node_portalpages["Portal Pages"]
  node_portalapi["Portal API Client<br/>[portalApi.ts]"]
end

subgraph group_backend["API Backend"]
  node_httpclient["API URL Client<br/>[apiClient.ts]"]
  node_server["API Application<br/>[app.ts]"]
  node_routes["Portal Routes<br/>[portalRoutes.ts]"]
  node_validation["Request Validation<br/>[validation.ts]"]
  node_calendar["Calendar Service<br/>[calendarService.ts]"]
  node_email["Email Service<br/>[emailService.ts]"]
  node_payment["Payment Adapters<br/>[paymentAdapters.ts]"]
end

subgraph group_storage["Persistence"]
  node_dbrepo[("Core Repository")]
  node_localrepo[("Local Portal Repository")]
  node_suparepo[("Supabase Portal Repository")]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_app
node_app -->|"renders"| node_services
node_app -->|"renders"| node_portfolio
node_app -->|"renders"| node_enterprise
node_app -->|"renders"| node_consultant
node_services -->|"reads"| node_catalog
node_services -->|"renders"| node_servicecards
node_servicecards -->|"renders"| node_serviceicon
node_consultant -->|"calls"| node_consultsvc
node_consultant -->|"calls"| node_voice
node_consultant -->|"opens"| node_booking
node_consultant -->|"opens"| node_brief
node_app -->|"routes to"| node_portalapp
node_portalapp -->|"uses"| node_router
node_portalapp -->|"provides"| node_auth
node_portalapp -->|"renders"| node_portalpages
node_auth -->|"requests"| node_portalapi
node_portalapi -.->|"builds API URLs"| node_httpclient
node_server -->|"registers"| node_routes
node_server -->|"validates"| node_validation
node_server -->|"uses"| node_dbrepo
node_server -->|"uses"| node_calendar
node_server -->|"uses"| node_email
node_routes -->|"calls"| node_payment
node_server -->|"uses"| node_localrepo
node_server -->|"uses"| node_suparepo
node_suparepo -->|"delegates"| node_localrepo

click node_app "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/App.tsx"
click node_services "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/components/ServicesSection.tsx"
click node_catalog "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/data/serviceCatalog.ts"
click node_servicecards "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/components/services/ServiceCard.tsx"
click node_serviceicon "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/components/animations/ServiceTechIcon.tsx"
click node_portfolio "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/components/PortfolioSection.tsx"
click node_enterprise "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/components/EnterpriseSuiteSection.tsx"
click node_brand "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/data/brandAssets.ts"
click node_consultant "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/components/consultant/AIConsultantWidget.tsx"
click node_consultsvc "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/services/aiConsultantService.ts"
click node_voice "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/services/aiVoiceService.ts"
click node_booking "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/components/consultant/AppointmentBookingModal.tsx"
click node_brief "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/components/consultant/ProjectBriefModal.tsx"
click node_portalapp "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/portal/ClientPortalApp.tsx"
click node_router "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/portal/PortalRouter.tsx"
click node_auth "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/portal/PortalAuthContext.tsx"
click node_portalpages "https://github.com/ophireumtechnology/ompnetwork/tree/main/src/portal/pages"
click node_portalapi "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/portal/portalApi.ts"
click node_httpclient "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/lib/apiClient.ts"
click node_server "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/app.ts"
click node_routes "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/portal/portalRoutes.ts"
click node_validation "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/validation.ts"
click node_calendar "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/services/calendarService.ts"
click node_email "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/services/emailService.ts"
click node_dbrepo "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/db/supabaseRepository.ts"
click node_localrepo "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/portal/localPortalRepository.ts"
click node_suparepo "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/portal/supabasePortalRepository.ts"
click node_payment "https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/portal/payments/paymentAdapters.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_app,node_services,node_catalog,node_servicecards,node_serviceicon,node_portfolio,node_enterprise,node_brand toneBlue
class node_consultant,node_consultsvc,node_voice,node_booking,node_brief toneAmber
class node_portalapp,node_router,node_auth,node_portalpages,node_portalapi toneMint
class node_httpclient,node_server,node_routes,node_validation,node_calendar,node_email,node_payment toneRose
class node_dbrepo,node_localrepo,node_suparepo,node_visitor toneIndigo
```

## Components

### Public Website

- [Site App](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/App.tsx): `src/App.tsx`
- [Services Catalog](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/components/ServicesSection.tsx): `src/components/ServicesSection.tsx`
- [Service Catalog Data](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/data/serviceCatalog.ts): `src/data/serviceCatalog.ts`
- [Service Views](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/components/services/ServiceCard.tsx): `src/components/services/ServiceCard.tsx`
- [Service Icons](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/components/animations/ServiceTechIcon.tsx): `src/components/animations/ServiceTechIcon.tsx`
- [Portfolio](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/components/PortfolioSection.tsx): `src/components/PortfolioSection.tsx`
- [Enterprise Suite](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/components/EnterpriseSuiteSection.tsx): `src/components/EnterpriseSuiteSection.tsx`
- [Brand Assets](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/data/brandAssets.ts): `src/data/brandAssets.ts`

### Consultation

- [AI Consultant](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/components/consultant/AIConsultantWidget.tsx): `src/components/consultant/AIConsultantWidget.tsx`
- [Consultant Services](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/services/aiConsultantService.ts): `src/services/aiConsultantService.ts`
- [AI Voice](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/services/aiVoiceService.ts): `src/services/aiVoiceService.ts`
- [Appointment Booking](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/components/consultant/AppointmentBookingModal.tsx): `src/components/consultant/AppointmentBookingModal.tsx`
- [Project Brief](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/components/consultant/ProjectBriefModal.tsx): `src/components/consultant/ProjectBriefModal.tsx`

### Client Portal

- [Portal App](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/portal/ClientPortalApp.tsx): `src/portal/ClientPortalApp.tsx`
- [Portal Router](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/portal/PortalRouter.tsx): `src/portal/PortalRouter.tsx`
- [Portal Authentication](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/portal/PortalAuthContext.tsx): `src/portal/PortalAuthContext.tsx`
- [Portal Pages](https://github.com/ophireumtechnology/ompnetwork/tree/main/src/portal/pages): `src/portal/pages`
- [Portal API Client](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/portal/portalApi.ts): `src/portal/portalApi.ts`

### API Backend

- [API URL Client](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/lib/apiClient.ts): `src/lib/apiClient.ts`
- [API Application](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/app.ts): `src/server/app.ts`
- [Portal Routes](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/portal/portalRoutes.ts): `src/server/portal/portalRoutes.ts`
- [Request Validation](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/validation.ts): `src/server/validation.ts`
- [Calendar Service](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/services/calendarService.ts): `src/server/services/calendarService.ts`
- [Email Service](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/services/emailService.ts): `src/server/services/emailService.ts`
- [Payment Adapters](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/portal/payments/paymentAdapters.ts): `src/server/portal/payments/paymentAdapters.ts`

### Persistence

- [Core Repository](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/db/supabaseRepository.ts): `src/server/db/supabaseRepository.ts`
- [Local Portal Repository](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/portal/localPortalRepository.ts): `src/server/portal/localPortalRepository.ts`
- [Supabase Portal Repository](https://github.com/ophireumtechnology/ompnetwork/blob/main/src/server/portal/supabasePortalRepository.ts): `src/server/portal/supabasePortalRepository.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Site App: opens
- Site App → Services Catalog: renders (evidence: `src/App.tsx`)
- Site App → Portfolio: renders (evidence: `src/App.tsx`)
- Site App → Enterprise Suite: renders (evidence: `src/App.tsx`)
- Site App → AI Consultant: renders (evidence: `src/App.tsx`)
- Services Catalog → Service Catalog Data: reads (evidence: `src/components/ServicesSection.tsx`)
- Services Catalog → Service Views: renders (evidence: `src/components/ServicesSection.tsx`)
- Service Views → Service Icons: renders (evidence: `src/components/services/ServiceCard.tsx`)
- AI Consultant → Consultant Services: calls (evidence: `src/components/consultant/AIConsultantWidget.tsx`)
- AI Consultant → AI Voice: calls (evidence: `src/components/consultant/AIConsultantWidget.tsx`)
- AI Consultant → Appointment Booking: opens (evidence: `src/components/consultant/AIConsultantWidget.tsx`)
- AI Consultant → Project Brief: opens (evidence: `src/components/consultant/AIConsultantWidget.tsx`)
- Site App → Portal App: routes to (evidence: `src/App.tsx`)
- Portal App → Portal Router: uses (evidence: `src/portal/ClientPortalApp.tsx`)
- Portal App → Portal Authentication: provides (evidence: `src/portal/ClientPortalApp.tsx`)
- Portal App → Portal Pages: renders (evidence: `src/portal/ClientPortalApp.tsx`)
- Portal Authentication → Portal API Client: requests (evidence: `src/portal/PortalAuthContext.tsx`)
- Portal API Client → API URL Client: builds API URLs
- API Application → Portal Routes: registers (evidence: `src/server/app.ts`)
- API Application → Request Validation: validates (evidence: `src/server/app.ts`)
- API Application → Core Repository: uses (evidence: `src/server/app.ts`)
- API Application → Calendar Service: uses (evidence: `src/server/app.ts`)
- API Application → Email Service: uses (evidence: `src/server/app.ts`)
- Portal Routes → Payment Adapters: calls (evidence: `src/server/portal/portalRoutes.ts`)
- API Application → Local Portal Repository: uses (evidence: `src/server/app.ts`)
- API Application → Supabase Portal Repository: uses (evidence: `src/server/app.ts`)
- Supabase Portal Repository → Local Portal Repository: delegates (evidence: `src/server/portal/supabasePortalRepository.ts`)
