# camizzz0/faq-help-center-insw-cms architecture

> Architecture diagram of the GitHub repository camizzz0/faq-help-center-insw-cms, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/camizzz0/faq-help-center-insw-cms
- Repository: https://github.com/camizzz0/faq-help-center-insw-cms

## Overview

This repository is a help-center content platform with a CMS for managing categories, subcategories, topics, FAQs, guides, and tutorials, plus public content, search, and feedback APIs. The CMS route tree leads to management pages, which use a shared API client to reach Express routes and controllers; controllers persist content through PostgreSQL and use Supabase Storage for uploaded assets. The excerpts and source index establish only selected frontend-to-backend relationships, so unverified route/controller wiring is omitted rather than inferred.

Main entry points: [`client/src/App.jsx`](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/client/src/App.jsx) (CMS routes), [`server/src/config/db.js`](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/config/db.js) (PostgreSQL), [`server/src/routes/faqRoutes.js`](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/routes/faqRoutes.js) (Public route handlers), [`client/src/services/api.js`](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/client/src/services/api.js) (HTTP API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cms["CMS management"]
  node_app["CMS routes<br/>[App.jsx]"]
  node_dashboard["Dashboard<br/>[DashboardPage.jsx]"]
  node_faqadmin["FAQ management<br/>[FaqListPage.jsx]"]
  node_hierarchy["Category and topic management"]
  node_guideadmin["Guide management<br/>[GuideListPage.jsx]"]
  node_tutorialadmin["Tutorial management"]
  node_api_client["HTTP API client<br/>[api.js]"]
end

subgraph group_api["API and content"]
  node_express["Express API<br/>[index.js]"]
  node_cms_routes["CMS route handlers<br/>[cmsFaqRoutes.js]"]
  node_public_routes["Public route handlers<br/>[faqRoutes.js]"]
  node_faq_controller["FAQ and feedback"]
  node_category_controller["Category management"]
  node_subcategory_controller["Subcategory management"]
  node_topic_controller["Topic management"]
  node_guide_controller["Guide management"]
  node_tutorial_controller["Tutorial management"]
  node_feedback["Content feedback"]
end

subgraph group_storage["Persistence and files"]
  node_schema["Content data model<br/>[schema.js]"]
  node_database[("PostgreSQL<br/>[db.js]")]
  node_icon_storage["Icon file storage"]
  node_guide_storage["Guide PDF storage"]
  node_supabase["Supabase Storage<br/>[supabase.js]"]
end

subgraph group_public["Public discovery"]
  node_search["Search"]
  node_public_content["Public content delivery<br/>[faqController.js]"]
end

node_editor(("CMS operator"))
node_visitor(("Help-center visitor"))

node_editor -->|"uses"| node_app
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_faqadmin
node_app -->|"routes to"| node_hierarchy
node_app -->|"routes to"| node_guideadmin
node_app -->|"routes to"| node_tutorialadmin
node_faqadmin -->|"calls"| node_api_client
node_dashboard -->|"calls"| node_api_client
node_hierarchy -->|"calls"| node_api_client
node_api_client -->|"sends HTTP"| node_express
node_express -->|"mounts"| node_cms_routes
node_express -->|"mounts"| node_public_routes
node_cms_routes -->|"routes requests"| node_faq_controller
node_public_routes -->|"routes feedback"| node_feedback
node_faq_controller -->|"queries"| node_database
node_faq_controller -->|"uses tables"| node_schema
node_category_controller -->|"queries"| node_database
node_category_controller -->|"uploads icons"| node_icon_storage
node_subcategory_controller -->|"queries"| node_database
node_subcategory_controller -->|"uploads icons"| node_icon_storage
node_topic_controller -->|"queries"| node_database
node_topic_controller -->|"uses tables"| node_schema
node_guide_controller -->|"manages PDFs"| node_guide_storage
node_icon_storage -->|"stores files"| node_supabase
node_guide_storage -->|"stores files"| node_supabase
node_visitor -.->|"requests content"| node_public_routes
node_public_routes -->|"routes requests"| node_public_content
node_visitor -.->|"searches content"| node_search
node_visitor -.->|"submits feedback"| node_feedback
node_feedback -->|"records feedback"| node_database

click node_app "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/client/src/App.jsx"
click node_dashboard "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/client/src/pages/cms/DashboardPage.jsx"
click node_faqadmin "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/client/src/pages/cms/FaqListPage.jsx"
click node_hierarchy "https://github.com/camizzz0/faq-help-center-insw-cms/tree/main/client/src/pages/cms"
click node_guideadmin "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/client/src/pages/cms/GuideListPage.jsx"
click node_tutorialadmin "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/client/src/pages/cms/TutorialListPage.jsx"
click node_api_client "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/client/src/services/api.js"
click node_express "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/index.js"
click node_cms_routes "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/routes/cmsFaqRoutes.js"
click node_public_routes "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/routes/faqRoutes.js"
click node_faq_controller "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/controllers/cmsFaqController.js"
click node_category_controller "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/controllers/cmsCategoryController.js"
click node_subcategory_controller "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/controllers/cmsSubcategoryController.js"
click node_topic_controller "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/controllers/cmsTopicController.js"
click node_guide_controller "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/controllers/cmsGuideController.js"
click node_tutorial_controller "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/controllers/cmsTutorialController.js"
click node_search "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/controllers/searchController.js"
click node_public_content "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/controllers/faqController.js"
click node_feedback "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/controllers/feedbackController.js"
click node_schema "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/models/schema.js"
click node_database "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/config/db.js"
click node_icon_storage "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/services/iconStorageService.js"
click node_guide_storage "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/services/guideStorageService.js"
click node_supabase "https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/config/supabase.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_app,node_dashboard,node_faqadmin,node_hierarchy,node_guideadmin,node_tutorialadmin,node_api_client toneBlue
class node_express,node_cms_routes,node_public_routes,node_faq_controller,node_category_controller,node_subcategory_controller,node_topic_controller,node_guide_controller,node_tutorial_controller,node_feedback toneAmber
class node_schema,node_database,node_icon_storage,node_guide_storage,node_supabase toneMint
class node_search,node_public_content toneRose
class node_editor,node_visitor toneIndigo
```

## Components

### CMS management

- [CMS routes](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Dashboard](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/client/src/pages/cms/DashboardPage.jsx): `client/src/pages/cms/DashboardPage.jsx`
- [FAQ management](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/client/src/pages/cms/FaqListPage.jsx): `client/src/pages/cms/FaqListPage.jsx`
- [Category and topic management](https://github.com/camizzz0/faq-help-center-insw-cms/tree/main/client/src/pages/cms): `client/src/pages/cms`
- [Guide management](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/client/src/pages/cms/GuideListPage.jsx): `client/src/pages/cms/GuideListPage.jsx`
- [Tutorial management](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/client/src/pages/cms/TutorialListPage.jsx): `client/src/pages/cms/TutorialListPage.jsx`
- [HTTP API client](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/client/src/services/api.js): `client/src/services/api.js`

### API and content

- [Express API](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/index.js): `server/src/index.js`
- [CMS route handlers](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/routes/cmsFaqRoutes.js): `server/src/routes/cmsFaqRoutes.js`
- [Public route handlers](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/routes/faqRoutes.js): `server/src/routes/faqRoutes.js`
- [FAQ and feedback](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/controllers/cmsFaqController.js): `server/src/controllers/cmsFaqController.js`
- [Category management](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/controllers/cmsCategoryController.js): `server/src/controllers/cmsCategoryController.js`
- [Subcategory management](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/controllers/cmsSubcategoryController.js): `server/src/controllers/cmsSubcategoryController.js`
- [Topic management](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/controllers/cmsTopicController.js): `server/src/controllers/cmsTopicController.js`
- [Guide management](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/controllers/cmsGuideController.js): `server/src/controllers/cmsGuideController.js`
- [Tutorial management](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/controllers/cmsTutorialController.js): `server/src/controllers/cmsTutorialController.js`
- [Content feedback](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/controllers/feedbackController.js): `server/src/controllers/feedbackController.js`

### Persistence and files

- [Content data model](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/models/schema.js): `server/src/models/schema.js`
- [PostgreSQL](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/config/db.js): `server/src/config/db.js`
- [Icon file storage](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/services/iconStorageService.js): `server/src/services/iconStorageService.js`
- [Guide PDF storage](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/services/guideStorageService.js): `server/src/services/guideStorageService.js`
- [Supabase Storage](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/config/supabase.js): `server/src/config/supabase.js`

### Public discovery

- [Search](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/controllers/searchController.js): `server/src/controllers/searchController.js`
- [Public content delivery](https://github.com/camizzz0/faq-help-center-insw-cms/blob/main/server/src/controllers/faqController.js): `server/src/controllers/faqController.js`

### Other components

- **CMS operator**
- **Help-center visitor**

## Connections

- CMS operator → CMS routes: uses (evidence: `client/src/App.jsx`)
- CMS routes → Dashboard: routes to (evidence: `client/src/App.jsx`)
- CMS routes → FAQ management: routes to (evidence: `client/src/App.jsx`)
- CMS routes → Category and topic management: routes to (evidence: `client/src/App.jsx`)
- CMS routes → Guide management: routes to (evidence: `client/src/App.jsx`)
- CMS routes → Tutorial management: routes to (evidence: `client/src/App.jsx`)
- FAQ management → HTTP API client: calls (evidence: `client/src/pages/cms/FaqListPage.jsx`)
- Dashboard → HTTP API client: calls (evidence: `client/src/pages/cms/DashboardPage.jsx`)
- Category and topic management → HTTP API client: calls (evidence: `client/src/pages/cms/TopicListPage.jsx`)
- HTTP API client → Express API: sends HTTP (evidence: `client/src/services/api.js`)
- Express API → CMS route handlers: mounts (evidence: `server/src/index.js`)
- Express API → Public route handlers: mounts (evidence: `server/src/index.js`)
- CMS route handlers → FAQ and feedback: routes requests
- Public route handlers → Content feedback: routes feedback (evidence: `server/src/routes/faqRoutes.js`)
- FAQ and feedback → PostgreSQL: queries (evidence: `server/src/controllers/cmsFaqController.js`)
- FAQ and feedback → Content data model: uses tables (evidence: `server/src/controllers/cmsFaqController.js`)
- Category management → PostgreSQL: queries (evidence: `server/src/controllers/cmsCategoryController.js`)
- Category management → Icon file storage: uploads icons (evidence: `server/src/controllers/cmsCategoryController.js`)
- Subcategory management → PostgreSQL: queries (evidence: `server/src/controllers/cmsSubcategoryController.js`)
- Subcategory management → Icon file storage: uploads icons (evidence: `server/src/controllers/cmsSubcategoryController.js`)
- Topic management → PostgreSQL: queries (evidence: `server/src/controllers/cmsTopicController.js`)
- Topic management → Content data model: uses tables (evidence: `server/src/controllers/cmsTopicController.js`)
- Guide management → Guide PDF storage: manages PDFs (evidence: `server/src/controllers/cmsGuideController.js`)
- Icon file storage → Supabase Storage: stores files (evidence: `server/src/services/iconStorageService.js`)
- Guide PDF storage → Supabase Storage: stores files (evidence: `server/src/services/guideStorageService.js`)
- Help-center visitor → Public route handlers: requests content
- Public route handlers → Public content delivery: routes requests (evidence: `server/src/routes/faqRoutes.js`)
- Help-center visitor → Search: searches content
- Help-center visitor → Content feedback: submits feedback
- Content feedback → PostgreSQL: records feedback (evidence: `server/src/controllers/feedbackController.js`)
