# mohababugabal/zinati-app architecture

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

- Interactive diagram: https://gitdiagram.com/mohababugabal/zinati-app
- Repository: https://github.com/mohababugabal/zinati-app

## Overview

Zinati Intelligence is a Vue business-intelligence and content-workflow application for eight beauty brands. Users browse competitor posts, map an idea to a brand and optionally create a Boxoit request; they also review portfolio and channel performance, including marketing spend against sales. Request Boxoit supports briefs, uploads, review, approval and go-live, while monthly submissions and provider integrations are additional capabilities. The graph follows the documented routes and sampled store/repository boundaries; individual data-sync behavior is only represented at the documented hook-directory level because most hook sources were not sampled.

Main entry points: [`src/router/index.ts`](https://github.com/mohababugabal/zinati-app/blob/main/src/router/index.ts) (Routes and guards), [`src/stores/requests.ts`](https://github.com/mohababugabal/zinati-app/blob/main/src/stores/requests.ts) (Request state), [`src/stores/market.ts`](https://github.com/mohababugabal/zinati-app/blob/main/src/stores/market.ts) (Market state), [`src/views/market/MarketView.vue`](https://github.com/mohababugabal/zinati-app/blob/main/src/views/market/MarketView.vue) (Market feed)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_router["Routes and guards<br/>[index.ts]"]
  node_shell["App shell<br/>[AppShell.vue]"]
  node_auth["Sign-in<br/>[auth.ts]"]
end

subgraph group_market["Competitor market"]
  node_marketview["Market feed<br/>[MarketView.vue]"]
  node_postdrawer["Post detail<br/>[PostDrawer.vue]"]
  node_marketstore["Market state<br/>[market.ts]"]
  node_postcard["Post presentation<br/>[PostCard.vue]"]
end

subgraph group_brands["Brand intelligence"]
  node_brandsoverview["Portfolio overview<br/>[BrandsOverview.vue]"]
  node_branddetail["Brand channels<br/>[BrandDetail.vue]"]
  node_finance["Talk Finance<br/>[TalkFinance.vue]"]
  node_brandstore["Brand state<br/>[brands.ts]"]
end

subgraph group_requests["Content workflow"]
  node_requestsview["Request list<br/>[RequestsView.vue]"]
  node_newrequest["New brief"]
  node_requestdetail["Request review<br/>[RequestDrawer.vue]"]
  node_monthly["Monthly submissions"]
  node_requeststore["Request state<br/>[requests.ts]"]
end

subgraph group_data["Data and integrations"]
  node_reports["Report builder<br/>[reports.ts]"]
  node_pbrepo["PocketBase repositories"]
  node_pbclient["PocketBase client<br/>[pocketbase.ts]"]
  node_sync["Provider sync hooks"]
  node_pocketbase[("PocketBase")]
end

node_user(("Zinati user"))
node_providers{{"Business providers"}}
node_boxoit(("Boxoit team"))

node_user -->|"navigates"| node_router
node_router -->|"renders"| node_shell
node_router -->|"routes to"| node_marketview
node_router -->|"routes to"| node_postdrawer
node_router -->|"routes to"| node_brandsoverview
node_router -->|"routes to"| node_branddetail
node_router -->|"routes to"| node_finance
node_router -->|"routes to"| node_requestsview
node_router -->|"routes to"| node_newrequest
node_router -->|"routes to"| node_requestdetail
node_router -->|"checks access"| node_auth
node_auth -->|"authenticates with"| node_pbclient
node_marketview -->|"loads feed"| node_marketstore
node_marketview -->|"renders posts"| node_postcard
node_postdrawer -->|"reads post"| node_marketstore
node_marketstore -->|"loads and saves"| node_pbrepo
node_marketstore -->|"creates request"| node_requeststore
node_brandsoverview -->|"reads portfolio"| node_brandstore
node_branddetail -.->|"reads channels"| node_brandstore
node_finance -->|"reads finance"| node_brandstore
node_finance -.->|"presents spend analysis"| node_reports
node_requestsview -.->|"reads requests"| node_requeststore
node_newrequest -.->|"creates brief"| node_requeststore
node_requestdetail -->|"reviews submissions"| node_requeststore
node_requestdetail -->|"links source post"| node_postdrawer
node_monthly -->|"loads monthly data"| node_requeststore
node_requeststore -->|"persists requests"| node_pbrepo
node_pbrepo -->|"uses client"| node_pbclient
node_pbclient -->|"reads and writes"| node_pocketbase
node_sync -.->|"syncs provider data"| node_providers
node_sync -.->|"updates collections"| node_pocketbase
node_requeststore -.->|"coordinates content"| node_boxoit

click node_router "https://github.com/mohababugabal/zinati-app/blob/main/src/router/index.ts"
click node_shell "https://github.com/mohababugabal/zinati-app/blob/main/src/layouts/AppShell.vue"
click node_auth "https://github.com/mohababugabal/zinati-app/blob/main/src/stores/auth.ts"
click node_marketview "https://github.com/mohababugabal/zinati-app/blob/main/src/views/market/MarketView.vue"
click node_postdrawer "https://github.com/mohababugabal/zinati-app/blob/main/src/views/market/PostDrawer.vue"
click node_marketstore "https://github.com/mohababugabal/zinati-app/blob/main/src/stores/market.ts"
click node_postcard "https://github.com/mohababugabal/zinati-app/blob/main/src/components/market/PostCard.vue"
click node_brandsoverview "https://github.com/mohababugabal/zinati-app/blob/main/src/views/brands/BrandsOverview.vue"
click node_branddetail "https://github.com/mohababugabal/zinati-app/blob/main/src/views/brands/BrandDetail.vue"
click node_finance "https://github.com/mohababugabal/zinati-app/blob/main/src/views/brands/TalkFinance.vue"
click node_brandstore "https://github.com/mohababugabal/zinati-app/blob/main/src/stores/brands.ts"
click node_requestsview "https://github.com/mohababugabal/zinati-app/blob/main/src/views/requests/RequestsView.vue"
click node_newrequest "https://github.com/mohababugabal/zinati-app/blob/main/src/views/requests/NewRequestDrawer.vue"
click node_requestdetail "https://github.com/mohababugabal/zinati-app/blob/main/src/views/requests/RequestDrawer.vue"
click node_monthly "https://github.com/mohababugabal/zinati-app/blob/main/src/components/requests/MonthlySubmissions.vue"
click node_requeststore "https://github.com/mohababugabal/zinati-app/blob/main/src/stores/requests.ts"
click node_reports "https://github.com/mohababugabal/zinati-app/blob/main/src/services/reports.ts"
click node_pbrepo "https://github.com/mohababugabal/zinati-app/tree/main/src/repositories"
click node_pbclient "https://github.com/mohababugabal/zinati-app/blob/main/src/services/pocketbase.ts"
click node_sync "https://github.com/mohababugabal/zinati-app/tree/main/pocketbase/pb_hooks"

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_router,node_shell,node_auth,node_user toneBlue
class node_marketview,node_postdrawer,node_marketstore,node_postcard toneAmber
class node_brandsoverview,node_branddetail,node_finance,node_brandstore toneMint
class node_requestsview,node_newrequest,node_requestdetail,node_monthly,node_requeststore toneRose
class node_reports,node_pbrepo,node_pbclient,node_sync,node_pocketbase,node_providers,node_boxoit toneIndigo
```

## Components

### Application shell

- [Routes and guards](https://github.com/mohababugabal/zinati-app/blob/main/src/router/index.ts): `src/router/index.ts`
- [App shell](https://github.com/mohababugabal/zinati-app/blob/main/src/layouts/AppShell.vue): `src/layouts/AppShell.vue`
- [Sign-in](https://github.com/mohababugabal/zinati-app/blob/main/src/stores/auth.ts): `src/stores/auth.ts`

### Competitor market

- [Market feed](https://github.com/mohababugabal/zinati-app/blob/main/src/views/market/MarketView.vue): `src/views/market/MarketView.vue`
- [Post detail](https://github.com/mohababugabal/zinati-app/blob/main/src/views/market/PostDrawer.vue): `src/views/market/PostDrawer.vue`
- [Market state](https://github.com/mohababugabal/zinati-app/blob/main/src/stores/market.ts): `src/stores/market.ts`
- [Post presentation](https://github.com/mohababugabal/zinati-app/blob/main/src/components/market/PostCard.vue): `src/components/market/PostCard.vue`

### Brand intelligence

- [Portfolio overview](https://github.com/mohababugabal/zinati-app/blob/main/src/views/brands/BrandsOverview.vue): `src/views/brands/BrandsOverview.vue`
- [Brand channels](https://github.com/mohababugabal/zinati-app/blob/main/src/views/brands/BrandDetail.vue): `src/views/brands/BrandDetail.vue`
- [Talk Finance](https://github.com/mohababugabal/zinati-app/blob/main/src/views/brands/TalkFinance.vue): `src/views/brands/TalkFinance.vue`
- [Brand state](https://github.com/mohababugabal/zinati-app/blob/main/src/stores/brands.ts): `src/stores/brands.ts`

### Content workflow

- [Request list](https://github.com/mohababugabal/zinati-app/blob/main/src/views/requests/RequestsView.vue): `src/views/requests/RequestsView.vue`
- [New brief](https://github.com/mohababugabal/zinati-app/blob/main/src/views/requests/NewRequestDrawer.vue): `src/views/requests/NewRequestDrawer.vue`
- [Request review](https://github.com/mohababugabal/zinati-app/blob/main/src/views/requests/RequestDrawer.vue): `src/views/requests/RequestDrawer.vue`
- [Monthly submissions](https://github.com/mohababugabal/zinati-app/blob/main/src/components/requests/MonthlySubmissions.vue): `src/components/requests/MonthlySubmissions.vue`
- [Request state](https://github.com/mohababugabal/zinati-app/blob/main/src/stores/requests.ts): `src/stores/requests.ts`

### Data and integrations

- [Report builder](https://github.com/mohababugabal/zinati-app/blob/main/src/services/reports.ts): `src/services/reports.ts`
- [PocketBase repositories](https://github.com/mohababugabal/zinati-app/tree/main/src/repositories): `src/repositories`
- [PocketBase client](https://github.com/mohababugabal/zinati-app/blob/main/src/services/pocketbase.ts): `src/services/pocketbase.ts`
- [Provider sync hooks](https://github.com/mohababugabal/zinati-app/tree/main/pocketbase/pb_hooks): `pocketbase/pb_hooks`
- **PocketBase**

### Other components

- **Zinati user**
- **Business providers**
- **Boxoit team**

## Connections

- Zinati user → Routes and guards: navigates (evidence: `README.md`)
- Routes and guards → App shell: renders
- Routes and guards → Market feed: routes to (evidence: `src/router/index.ts`)
- Routes and guards → Post detail: routes to (evidence: `src/router/index.ts`)
- Routes and guards → Portfolio overview: routes to (evidence: `src/router/index.ts`)
- Routes and guards → Brand channels: routes to (evidence: `src/router/index.ts`)
- Routes and guards → Talk Finance: routes to (evidence: `src/router/index.ts`)
- Routes and guards → Request list: routes to (evidence: `src/router/index.ts`)
- Routes and guards → New brief: routes to (evidence: `src/router/index.ts`)
- Routes and guards → Request review: routes to (evidence: `src/router/index.ts`)
- Routes and guards → Sign-in: checks access (evidence: `src/router/index.ts`)
- Sign-in → PocketBase client: authenticates with (evidence: `src/stores/auth.ts`)
- Market feed → Market state: loads feed (evidence: `src/views/market/MarketView.vue`)
- Market feed → Post presentation: renders posts (evidence: `src/components/market/PostCard.vue`)
- Post detail → Market state: reads post
- Market state → PocketBase repositories: loads and saves (evidence: `src/stores/market.ts`)
- Market state → Request state: creates request (evidence: `src/stores/market.ts`)
- Portfolio overview → Brand state: reads portfolio
- Brand channels → Brand state: reads channels
- Talk Finance → Brand state: reads finance (evidence: `src/views/brands/TalkFinance.vue`)
- Talk Finance → Report builder: presents spend analysis
- Request list → Request state: reads requests
- New brief → Request state: creates brief
- Request review → Request state: reviews submissions (evidence: `src/views/requests/RequestDrawer.vue`)
- Request review → Post detail: links source post (evidence: `src/views/requests/RequestDrawer.vue`)
- Monthly submissions → Request state: loads monthly data (evidence: `src/components/requests/MonthlySubmissions.vue`)
- Request state → PocketBase repositories: persists requests (evidence: `src/stores/requests.ts`)
- PocketBase repositories → PocketBase client: uses client (evidence: `src/repositories/requests.ts`)
- PocketBase client → PocketBase: reads and writes (evidence: `src/services/pocketbase.ts`)
- Provider sync hooks → Business providers: syncs provider data
- Provider sync hooks → PocketBase: updates collections
- Request state → Boxoit team: coordinates content
