# derricknyamai11/tunedfrontend architecture

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

- Interactive diagram: https://gitdiagram.com/derricknyamai11/tunedfrontend
- Repository: https://github.com/derricknyamai11/tunedfrontend

## Overview

This is a Next.js frontend for an academic-writing services marketplace, with public service discovery and quoting alongside customer, writer, and admin workspaces. The intended customer journey runs from service discovery through quote/order entry to order tracking. The tree establishes these product areas, but most route and service implementations were not sampled, so the graph avoids asserting their detailed wiring; sampled auth, profile-query, and navbar-service calls are shown explicitly.

Main entry points: [`src/app/(main)/page.tsx`](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/(main)/page.tsx) (Home and quote), [`src/lib/services/auth.service.ts`](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/lib/services/auth.service.ts) (Auth requests), [`src/app/client/orders/page.tsx`](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/client/orders/page.tsx) (Order creation and tracking), [`src/app/(main)/service/[slug]/page.tsx`](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/(main)/service/%5Bslug%5D/page.tsx) (Service details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public discovery"]
  node_home["Home and quote<br/>[page.tsx]"]
  node_services["Service catalog<br/>[page.tsx]"]
  node_service_detail["Service details<br/>[page.tsx]"]
  node_public_content["Blogs and FAQs<br/>[page.tsx]"]
  node_blog_post["Blog article<br/>[page.tsx]"]
  node_contact["Contact and policies<br/>[page.tsx]"]
end

subgraph group_identity["Identity"]
  node_auth["Sign-in and registration<br/>[page.tsx]"]
  node_auth_hook["Auth state<br/>[useAuth.ts]"]
  node_auth_service["Auth requests<br/>[auth.service.ts]"]
end

subgraph group_customer["Customer workspace"]
  node_client["Customer workspace<br/>[layout.tsx]"]
  node_orders["Order creation and tracking<br/>[page.tsx]"]
  node_dashboard["Dashboard and deadlines<br/>[page.tsx]"]
  node_account["Profile and settings<br/>[page.tsx]"]
  node_profile_query["Profile query<br/>[useProfileQuery.ts]"]
  node_profile_service["Profile service<br/>[profile.service.ts]"]
  node_engagement["Balance, planner, referrals<br/>[page.tsx]"]
end

subgraph group_delivery["Workspaces and operations"]
  node_writer["Writer workspace<br/>[page.tsx]"]
  node_admin["Administration<br/>[page.tsx]"]
end

subgraph group_shared["Shared runtime"]
  node_navbar_hook["Navbar service loader"]
  node_service_service["Service data access<br/>[service.service.ts]"]
  node_api_client["API client<br/>[index.ts]"]
end

node_visitor(("Visitor"))
node_api[("Application API")]

node_visitor -->|"visits"| node_home
node_visitor -->|"browses"| node_services
node_visitor -->|"reads"| node_public_content
node_visitor -->|"signs in"| node_auth
node_home -->|"continues to order"| node_orders
node_service_detail -->|"continues to order"| node_orders
node_auth_hook -->|"requests auth"| node_auth_service
node_auth_service -->|"fetches auth"| node_api
node_profile_query -->|"fetches profile"| node_profile_service
node_navbar_hook -->|"loads categories and services"| node_service_service
node_api_client -->|"sends requests"| node_api

click node_home "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/(main)/page.tsx"
click node_services "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/(main)/services/page.tsx"
click node_service_detail "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/(main)/service/%5Bslug%5D/page.tsx"
click node_public_content "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/(main)/blogs/page.tsx"
click node_blog_post "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/(main)/blogs/%5Bslug%5D/page.tsx"
click node_contact "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/(main)/contact/page.tsx"
click node_auth "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/auth/login/page.tsx"
click node_auth_hook "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/lib/hooks/useAuth.ts"
click node_auth_service "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/lib/services/auth.service.ts"
click node_client "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/client/layout.tsx"
click node_orders "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/client/orders/page.tsx"
click node_dashboard "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/client/dashboard/page.tsx"
click node_account "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/client/profile/page.tsx"
click node_profile_query "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/client/profile/_hooks/useProfileQuery.ts"
click node_profile_service "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/client/profile/_services/profile.service.ts"
click node_engagement "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/client/referrals/page.tsx"
click node_writer "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/writer/page.tsx"
click node_admin "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/admin/page.tsx"
click node_navbar_hook "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/lib/hooks/useNavbarServices.ts"
click node_service_service "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/lib/services/service.service.ts"
click node_api_client "https://github.com/derricknyamai11/tunedfrontend/blob/main/src/api-client/index.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_home,node_services,node_service_detail,node_public_content,node_blog_post,node_contact toneBlue
class node_auth,node_auth_hook,node_auth_service,node_api toneAmber
class node_client,node_orders,node_dashboard,node_account,node_profile_query,node_profile_service,node_engagement toneMint
class node_writer,node_admin toneRose
class node_navbar_hook,node_service_service,node_api_client,node_visitor toneIndigo
```

## Components

### Public discovery

- [Home and quote](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/(main)/page.tsx): `src/app/(main)/page.tsx`
- [Service catalog](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/(main)/services/page.tsx): `src/app/(main)/services/page.tsx`
- [Service details](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/(main)/service/%5Bslug%5D/page.tsx): `src/app/(main)/service/[slug]/page.tsx`
- [Blogs and FAQs](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/(main)/blogs/page.tsx): `src/app/(main)/blogs/page.tsx`
- [Blog article](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/(main)/blogs/%5Bslug%5D/page.tsx): `src/app/(main)/blogs/[slug]/page.tsx`
- [Contact and policies](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/(main)/contact/page.tsx): `src/app/(main)/contact/page.tsx`

### Identity

- [Sign-in and registration](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/auth/login/page.tsx): `src/app/auth/login/page.tsx`
- [Auth state](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/lib/hooks/useAuth.ts): `src/lib/hooks/useAuth.ts`
- [Auth requests](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/lib/services/auth.service.ts): `src/lib/services/auth.service.ts`

### Customer workspace

- [Customer workspace](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/client/layout.tsx): `src/app/client/layout.tsx`
- [Order creation and tracking](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/client/orders/page.tsx): `src/app/client/orders/page.tsx`
- [Dashboard and deadlines](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/client/dashboard/page.tsx): `src/app/client/dashboard/page.tsx`
- [Profile and settings](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/client/profile/page.tsx): `src/app/client/profile/page.tsx`
- [Profile query](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/client/profile/_hooks/useProfileQuery.ts): `src/app/client/profile/_hooks/useProfileQuery.ts`
- [Profile service](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/client/profile/_services/profile.service.ts): `src/app/client/profile/_services/profile.service.ts`
- [Balance, planner, referrals](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/client/referrals/page.tsx): `src/app/client/referrals/page.tsx`

### Workspaces and operations

- [Writer workspace](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/writer/page.tsx): `src/app/writer/page.tsx`
- [Administration](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/app/admin/page.tsx): `src/app/admin/page.tsx`

### Shared runtime

- [Navbar service loader](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/lib/hooks/useNavbarServices.ts): `src/lib/hooks/useNavbarServices.ts`
- [Service data access](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/lib/services/service.service.ts): `src/lib/services/service.service.ts`
- [API client](https://github.com/derricknyamai11/tunedfrontend/blob/main/src/api-client/index.ts): `src/api-client/index.ts`

### Other components

- **Visitor**
- **Application API**

## Connections

- Visitor → Home and quote: visits
- Visitor → Service catalog: browses
- Visitor → Blogs and FAQs: reads
- Visitor → Sign-in and registration: signs in
- Home and quote → Order creation and tracking: continues to order
- Service details → Order creation and tracking: continues to order
- Auth state → Auth requests: requests auth
- Auth requests → Application API: fetches auth
- Profile query → Profile service: fetches profile
- Navbar service loader → Service data access: loads categories and services
- API client → Application API: sends requests
