# arthawebservices/abyss-holdings architecture

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

- Interactive diagram: https://gitdiagram.com/arthawebservices/abyss-holdings
- Repository: https://github.com/arthawebservices/abyss-holdings

## Overview

Abyss Holdings is a corporate website with a public company, services, projects, contact, and locations experience, plus an administrator dashboard for managing that content. Visitors browse the Next.js site or submit a contact message; administrators sign in and manage records through the dashboard and API. Express routes enforce JWT authentication for protected operations and use JSON-file persistence. The README documents the product capabilities; frontend-to-backend wiring is not shown in the excerpts, so those links are marked unverified rather than asserted as observed calls.

Main entry points: [`backend/src/index.js`](https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/index.js) (Express Server), [`backend/src/middleware/auth.js`](https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/middleware/auth.js) (JWT Middleware), [`backend/src/utils/db.js`](https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/utils/db.js) (JSON Database), [`frontend/app`](https://github.com/arthawebservices/abyss-holdings/tree/main/frontend/app) (Public Pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public Website"]
  node_public_pages["Public Pages"]
  node_site_navigation["Site Navigation<br/>[Navbar.tsx]"]
  node_company_context["Company Context<br/>[CompanyContext.tsx]"]
  node_site_footer["Site Footer<br/>[Footer.tsx]"]
  node_services_display["Service Display<br/>[ServiceCard.tsx]"]
end

subgraph group_admin["Administration"]
  node_admin_dashboard["Admin Dashboard"]
  node_admin_sidebar["Admin Navigation<br/>[AdminSidebar.tsx]"]
end

subgraph group_api["API and Authentication"]
  node_frontend_api["Frontend API Routes"]
  node_api_client["API Client<br/>[api.ts]"]
  node_express_server["Express Server<br/>[index.js]"]
  node_login["Admin Login<br/>[auth.js]"]
  node_auth_middleware["JWT Middleware<br/>[auth.js]"]
  node_company_routes["Company API<br/>[company.js]"]
  node_services_routes["Services API<br/>[services.js]"]
  node_locations_routes["Locations API<br/>[locations.js]"]
  node_projects_routes["Projects API<br/>[projects.js]"]
  node_contact_routes["Contact API<br/>[contact.js]"]
end

subgraph group_data["Persistent Data"]
  node_json_store[("JSON Database<br/>[db.js]")]
end

node_visitor(("Visitor"))
node_administrator(("Administrator"))

node_visitor -->|"browses"| node_public_pages
node_administrator -->|"manages content"| node_admin_dashboard
node_public_pages -.->|"requests data"| node_frontend_api
node_admin_dashboard -.->|"submits changes"| node_frontend_api
node_frontend_api -.->|"forwards requests"| node_express_server
node_public_pages -.->|"renders"| node_site_navigation
node_site_navigation -->|"reads company data"| node_company_context
node_site_navigation -.->|"shares site shell"| node_site_footer
node_public_pages -.->|"renders services"| node_services_display
node_admin_dashboard -.->|"renders navigation"| node_admin_sidebar
node_express_server -->|"mounts routes"| node_login
node_express_server -->|"mounts routes"| node_company_routes
node_express_server -->|"mounts routes"| node_services_routes
node_express_server -->|"mounts routes"| node_locations_routes
node_express_server -->|"mounts routes"| node_projects_routes
node_express_server -->|"mounts routes"| node_contact_routes
node_company_routes -->|"authenticates updates"| node_auth_middleware
node_services_routes -->|"authenticates changes"| node_auth_middleware
node_locations_routes -->|"authenticates changes"| node_auth_middleware
node_projects_routes -->|"authenticates changes"| node_auth_middleware
node_contact_routes -->|"authenticates admin actions"| node_auth_middleware
node_company_routes -->|"reads and writes"| node_json_store
node_services_routes -->|"reads and writes"| node_json_store
node_locations_routes -->|"reads and writes"| node_json_store
node_projects_routes -->|"reads and writes"| node_json_store
node_contact_routes -->|"reads and writes"| node_json_store

click node_public_pages "https://github.com/arthawebservices/abyss-holdings/tree/main/frontend/app"
click node_site_navigation "https://github.com/arthawebservices/abyss-holdings/blob/main/frontend/components/Navbar.tsx"
click node_company_context "https://github.com/arthawebservices/abyss-holdings/blob/main/frontend/components/CompanyContext.tsx"
click node_site_footer "https://github.com/arthawebservices/abyss-holdings/blob/main/frontend/components/Footer.tsx"
click node_services_display "https://github.com/arthawebservices/abyss-holdings/blob/main/frontend/components/ServiceCard.tsx"
click node_admin_dashboard "https://github.com/arthawebservices/abyss-holdings/tree/main/frontend/app/administration"
click node_admin_sidebar "https://github.com/arthawebservices/abyss-holdings/blob/main/frontend/components/admin/AdminSidebar.tsx"
click node_frontend_api "https://github.com/arthawebservices/abyss-holdings/tree/main/frontend/app/api"
click node_api_client "https://github.com/arthawebservices/abyss-holdings/blob/main/frontend/lib/api.ts"
click node_express_server "https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/index.js"
click node_login "https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/routes/auth.js"
click node_auth_middleware "https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/middleware/auth.js"
click node_company_routes "https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/routes/company.js"
click node_services_routes "https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/routes/services.js"
click node_locations_routes "https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/routes/locations.js"
click node_projects_routes "https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/routes/projects.js"
click node_contact_routes "https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/routes/contact.js"
click node_json_store "https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/utils/db.js"

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_site_navigation,node_company_context,node_site_footer,node_services_display toneBlue
class node_admin_dashboard,node_admin_sidebar toneAmber
class node_frontend_api,node_api_client,node_express_server,node_login,node_auth_middleware,node_company_routes,node_services_routes,node_locations_routes,node_projects_routes,node_contact_routes toneMint
class node_json_store toneRose
class node_visitor,node_administrator toneIndigo
```

## Components

### Public Website

- [Public Pages](https://github.com/arthawebservices/abyss-holdings/tree/main/frontend/app): `frontend/app`
- [Site Navigation](https://github.com/arthawebservices/abyss-holdings/blob/main/frontend/components/Navbar.tsx): `frontend/components/Navbar.tsx`
- [Company Context](https://github.com/arthawebservices/abyss-holdings/blob/main/frontend/components/CompanyContext.tsx): `frontend/components/CompanyContext.tsx`
- [Site Footer](https://github.com/arthawebservices/abyss-holdings/blob/main/frontend/components/Footer.tsx): `frontend/components/Footer.tsx`
- [Service Display](https://github.com/arthawebservices/abyss-holdings/blob/main/frontend/components/ServiceCard.tsx): `frontend/components/ServiceCard.tsx`

### Administration

- [Admin Dashboard](https://github.com/arthawebservices/abyss-holdings/tree/main/frontend/app/administration): `frontend/app/administration`
- [Admin Navigation](https://github.com/arthawebservices/abyss-holdings/blob/main/frontend/components/admin/AdminSidebar.tsx): `frontend/components/admin/AdminSidebar.tsx`

### API and Authentication

- [Frontend API Routes](https://github.com/arthawebservices/abyss-holdings/tree/main/frontend/app/api): `frontend/app/api`
- [API Client](https://github.com/arthawebservices/abyss-holdings/blob/main/frontend/lib/api.ts): `frontend/lib/api.ts`
- [Express Server](https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/index.js): `backend/src/index.js`
- [Admin Login](https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/routes/auth.js): `backend/src/routes/auth.js`
- [JWT Middleware](https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/middleware/auth.js): `backend/src/middleware/auth.js`
- [Company API](https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/routes/company.js): `backend/src/routes/company.js`
- [Services API](https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/routes/services.js): `backend/src/routes/services.js`
- [Locations API](https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/routes/locations.js): `backend/src/routes/locations.js`
- [Projects API](https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/routes/projects.js): `backend/src/routes/projects.js`
- [Contact API](https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/routes/contact.js): `backend/src/routes/contact.js`

### Persistent Data

- [JSON Database](https://github.com/arthawebservices/abyss-holdings/blob/main/backend/src/utils/db.js): `backend/src/utils/db.js`

### Other components

- **Visitor**
- **Administrator**

## Connections

- Visitor → Public Pages: browses
- Administrator → Admin Dashboard: manages content
- Public Pages → Frontend API Routes: requests data
- Admin Dashboard → Frontend API Routes: submits changes
- Frontend API Routes → Express Server: forwards requests
- Public Pages → Site Navigation: renders
- Site Navigation → Company Context: reads company data (evidence: `frontend/components/Navbar.tsx`)
- Site Navigation → Site Footer: shares site shell
- Public Pages → Service Display: renders services
- Admin Dashboard → Admin Navigation: renders navigation
- Express Server → Admin Login: mounts routes (evidence: `backend/src/index.js`)
- Express Server → Company API: mounts routes (evidence: `backend/src/index.js`)
- Express Server → Services API: mounts routes (evidence: `backend/src/index.js`)
- Express Server → Locations API: mounts routes (evidence: `backend/src/index.js`)
- Express Server → Projects API: mounts routes (evidence: `backend/src/index.js`)
- Express Server → Contact API: mounts routes (evidence: `backend/src/index.js`)
- Company API → JWT Middleware: authenticates updates (evidence: `backend/src/routes/company.js`)
- Services API → JWT Middleware: authenticates changes (evidence: `backend/src/routes/services.js`)
- Locations API → JWT Middleware: authenticates changes (evidence: `backend/src/routes/locations.js`)
- Projects API → JWT Middleware: authenticates changes (evidence: `backend/src/routes/projects.js`)
- Contact API → JWT Middleware: authenticates admin actions (evidence: `backend/src/routes/contact.js`)
- Company API → JSON Database: reads and writes (evidence: `backend/src/routes/company.js`)
- Services API → JSON Database: reads and writes (evidence: `backend/src/routes/services.js`)
- Locations API → JSON Database: reads and writes (evidence: `backend/src/routes/locations.js`)
- Projects API → JSON Database: reads and writes (evidence: `backend/src/routes/projects.js`)
- Contact API → JSON Database: reads and writes (evidence: `backend/src/routes/contact.js`)
