# nhasan143/govcon-digest architecture

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

- Interactive diagram: https://gitdiagram.com/nhasan143/govcon-digest
- Repository: https://github.com/nhasan143/govcon-digest

## Overview

Govcon Digest is a news and magazine site with a Payload CMS newsroom. Readers browse and search reporting, while editors manage publication through the CMS; the homepage’s sampled code fetches published content through the CMS helper and renders curated hero and section rails. Separate capabilities include author/topic pages, newsletter and contact forms, feeds and sitemaps, and editorial access controls. Source evidence is uneven: sampled imports and calls support the homepage, newsletter, and selected CMS relationships; unsampled routes are represented as capability areas without speculative wiring.

Main entry points: [`payload.config.ts`](https://github.com/nhasan143/govcon-digest/blob/main/payload.config.ts) (Payload CMS), [`app/(frontend)/page.tsx`](https://github.com/nhasan143/govcon-digest/blob/main/app/(frontend)/page.tsx) (Homepage), [`app/api/newsletter/route.ts`](https://github.com/nhasan143/govcon-digest/blob/main/app/api/newsletter/route.ts) (Newsletter signup), [`app/(payload)/newsroom/[[...segments]]/page.tsx`](https://github.com/nhasan143/govcon-digest/blob/main/app/(payload)/newsroom/%5B%5B...segments%5D%5D/page.tsx) (Newsroom workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_reader["Reader experience"]
  node_homepage["Homepage<br/>[page.tsx]"]
  node_homeblocks["Hero and rails<br/>[HomeHero.tsx]"]
  node_articlepages["Article pages<br/>[page.tsx]"]
  node_categorypages["Category pages<br/>[page.tsx]"]
  node_search["Search<br/>[page.tsx]"]
  node_authors["Author pages<br/>[page.tsx]"]
  node_topics["Topic directory"]
end

subgraph group_editorial["Editorial CMS"]
  node_payload["Payload CMS<br/>[payload.config.ts]"]
  node_newscollection[("News collection<br/>[Posts.ts]")]
  node_cmsworkspace["Newsroom workspace<br/>[page.tsx]"]
  node_editorialtools["Editorial tools"]
  node_cmslogin["CMS sign-in<br/>[page.tsx]"]
  node_subscribers[("Subscribers<br/>[Subscribers.ts]")]
end

subgraph group_engagement["Audience engagement"]
  node_newsletter["Newsletter signup<br/>[route.ts]"]
  node_formaction["Subscription action<br/>[forms.ts]"]
  node_contact["Contact forms<br/>[contact.ts]"]
  node_feeds["RSS feed<br/>[route.ts]"]
  node_newsmap["News sitemap<br/>[route.ts]"]
end

subgraph group_platform["Content platform"]
  node_cmsread["Content queries<br/>[cms.ts]"]
  node_categories["Category registry<br/>[categories.ts]"]
  node_articlemodel["Article model<br/>[index.ts]"]
  node_db[("SQLite or SQL database")]
end

node_visitor(("Reader"))
node_editor(("Editor"))

node_visitor -->|"opens"| node_homepage
node_homepage -->|"fetches posts"| node_cmsread
node_homepage -->|"selects sections"| node_categories
node_homepage -->|"renders"| node_homeblocks
node_cmsread -->|"maps posts"| node_articlemodel
node_visitor -.->|"opens"| node_articlepages
node_visitor -.->|"browses"| node_categorypages
node_visitor -.->|"searches"| node_search
node_visitor -.->|"browses"| node_authors
node_visitor -.->|"browses"| node_topics
node_editor -->|"signs in"| node_cmslogin
node_cmslogin -->|"authenticates"| node_payload
node_editor -.->|"manages content"| node_cmsworkspace
node_cmsworkspace -->|"loads interface"| node_editorialtools
node_payload -.->|"manages"| node_newscollection
node_payload -.->|"persists content"| node_db
node_visitor -->|"submits signup"| node_newsletter
node_newsletter -->|"calls"| node_formaction
node_visitor -.->|"submits inquiry"| node_contact
node_newsletter -.->|"stores subscriber"| node_subscribers
node_visitor -->|"requests feed"| node_feeds
node_visitor -->|"requests sitemap"| node_newsmap
node_newsmap -->|"queries news"| node_payload
node_payload -.->|"reads and writes"| node_db

click node_homepage "https://github.com/nhasan143/govcon-digest/blob/main/app/(frontend)/page.tsx"
click node_homeblocks "https://github.com/nhasan143/govcon-digest/blob/main/components/home/HomeHero.tsx"
click node_articlepages "https://github.com/nhasan143/govcon-digest/blob/main/app/(frontend)/%5Bcategory%5D/%5Bslug%5D/page.tsx"
click node_categorypages "https://github.com/nhasan143/govcon-digest/blob/main/app/(frontend)/%5Bcategory%5D/page.tsx"
click node_search "https://github.com/nhasan143/govcon-digest/blob/main/app/(frontend)/search/page.tsx"
click node_authors "https://github.com/nhasan143/govcon-digest/blob/main/app/(frontend)/author/%5Bslug%5D/page.tsx"
click node_topics "https://github.com/nhasan143/govcon-digest/blob/main/components/topics/TopicsDirectory.tsx"
click node_cmsread "https://github.com/nhasan143/govcon-digest/blob/main/lib/cms.ts"
click node_categories "https://github.com/nhasan143/govcon-digest/blob/main/lib/categories.ts"
click node_articlemodel "https://github.com/nhasan143/govcon-digest/blob/main/types/index.ts"
click node_payload "https://github.com/nhasan143/govcon-digest/blob/main/payload.config.ts"
click node_newscollection "https://github.com/nhasan143/govcon-digest/blob/main/payload/collections/Posts.ts"
click node_cmsworkspace "https://github.com/nhasan143/govcon-digest/blob/main/app/(payload)/newsroom/%5B%5B...segments%5D%5D/page.tsx"
click node_editorialtools "https://github.com/nhasan143/govcon-digest/blob/main/payload/components/EditorialDashboard.tsx"
click node_cmslogin "https://github.com/nhasan143/govcon-digest/blob/main/app/(cms-login)/newsroom/sign-in/page.tsx"
click node_newsletter "https://github.com/nhasan143/govcon-digest/blob/main/app/api/newsletter/route.ts"
click node_formaction "https://github.com/nhasan143/govcon-digest/blob/main/app/actions/forms.ts"
click node_subscribers "https://github.com/nhasan143/govcon-digest/blob/main/payload/collections/Subscribers.ts"
click node_contact "https://github.com/nhasan143/govcon-digest/blob/main/app/actions/contact.ts"
click node_feeds "https://github.com/nhasan143/govcon-digest/blob/main/app/feed.xml/route.ts"
click node_newsmap "https://github.com/nhasan143/govcon-digest/blob/main/app/news-sitemap.xml/route.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_homepage,node_homeblocks,node_articlepages,node_categorypages,node_search,node_authors,node_topics toneBlue
class node_payload,node_newscollection,node_cmsworkspace,node_editorialtools,node_cmslogin,node_subscribers toneAmber
class node_newsletter,node_formaction,node_contact,node_feeds,node_newsmap toneMint
class node_cmsread,node_categories,node_articlemodel,node_db toneRose
class node_visitor,node_editor toneIndigo
```

## Components

### Reader experience

- [Homepage](https://github.com/nhasan143/govcon-digest/blob/main/app/(frontend)/page.tsx): `app/(frontend)/page.tsx`
- [Hero and rails](https://github.com/nhasan143/govcon-digest/blob/main/components/home/HomeHero.tsx): `components/home/HomeHero.tsx`
- [Article pages](https://github.com/nhasan143/govcon-digest/blob/main/app/(frontend)/%5Bcategory%5D/%5Bslug%5D/page.tsx): `app/(frontend)/[category]/[slug]/page.tsx`
- [Category pages](https://github.com/nhasan143/govcon-digest/blob/main/app/(frontend)/%5Bcategory%5D/page.tsx): `app/(frontend)/[category]/page.tsx`
- [Search](https://github.com/nhasan143/govcon-digest/blob/main/app/(frontend)/search/page.tsx): `app/(frontend)/search/page.tsx`
- [Author pages](https://github.com/nhasan143/govcon-digest/blob/main/app/(frontend)/author/%5Bslug%5D/page.tsx): `app/(frontend)/author/[slug]/page.tsx`
- [Topic directory](https://github.com/nhasan143/govcon-digest/blob/main/components/topics/TopicsDirectory.tsx): `components/topics/TopicsDirectory.tsx`

### Editorial CMS

- [Payload CMS](https://github.com/nhasan143/govcon-digest/blob/main/payload.config.ts): `payload.config.ts`
- [News collection](https://github.com/nhasan143/govcon-digest/blob/main/payload/collections/Posts.ts): `payload/collections/Posts.ts`
- [Newsroom workspace](https://github.com/nhasan143/govcon-digest/blob/main/app/(payload)/newsroom/%5B%5B...segments%5D%5D/page.tsx): `app/(payload)/newsroom/[[...segments]]/page.tsx`
- [Editorial tools](https://github.com/nhasan143/govcon-digest/blob/main/payload/components/EditorialDashboard.tsx): `payload/components/EditorialDashboard.tsx`
- [CMS sign-in](https://github.com/nhasan143/govcon-digest/blob/main/app/(cms-login)/newsroom/sign-in/page.tsx): `app/(cms-login)/newsroom/sign-in/page.tsx`
- [Subscribers](https://github.com/nhasan143/govcon-digest/blob/main/payload/collections/Subscribers.ts): `payload/collections/Subscribers.ts`

### Audience engagement

- [Newsletter signup](https://github.com/nhasan143/govcon-digest/blob/main/app/api/newsletter/route.ts): `app/api/newsletter/route.ts`
- [Subscription action](https://github.com/nhasan143/govcon-digest/blob/main/app/actions/forms.ts): `app/actions/forms.ts`
- [Contact forms](https://github.com/nhasan143/govcon-digest/blob/main/app/actions/contact.ts): `app/actions/contact.ts`
- [RSS feed](https://github.com/nhasan143/govcon-digest/blob/main/app/feed.xml/route.ts): `app/feed.xml/route.ts`
- [News sitemap](https://github.com/nhasan143/govcon-digest/blob/main/app/news-sitemap.xml/route.ts): `app/news-sitemap.xml/route.ts`

### Content platform

- [Content queries](https://github.com/nhasan143/govcon-digest/blob/main/lib/cms.ts): `lib/cms.ts`
- [Category registry](https://github.com/nhasan143/govcon-digest/blob/main/lib/categories.ts): `lib/categories.ts`
- [Article model](https://github.com/nhasan143/govcon-digest/blob/main/types/index.ts): `types/index.ts`
- **SQLite or SQL database**

### Other components

- **Reader**
- **Editor**

## Connections

- Reader → Homepage: opens (evidence: `app/(frontend)/page.tsx`)
- Homepage → Content queries: fetches posts (evidence: `app/(frontend)/page.tsx`)
- Homepage → Category registry: selects sections (evidence: `app/(frontend)/page.tsx`)
- Homepage → Hero and rails: renders (evidence: `app/(frontend)/page.tsx`)
- Content queries → Article model: maps posts (evidence: `lib/cms.ts`)
- Reader → Article pages: opens
- Reader → Category pages: browses
- Reader → Search: searches
- Reader → Author pages: browses
- Reader → Topic directory: browses
- Editor → CMS sign-in: signs in (evidence: `app/(cms-login)/newsroom/sign-in/page.tsx`)
- CMS sign-in → Payload CMS: authenticates (evidence: `app/(cms-login)/newsroom/sign-in/page.tsx`)
- Editor → Newsroom workspace: manages content
- Newsroom workspace → Editorial tools: loads interface
- Payload CMS → News collection: manages
- Payload CMS → SQLite or SQL database: persists content
- Reader → Newsletter signup: submits signup (evidence: `app/api/newsletter/route.ts`)
- Newsletter signup → Subscription action: calls (evidence: `app/api/newsletter/route.ts`)
- Reader → Contact forms: submits inquiry
- Newsletter signup → Subscribers: stores subscriber
- Reader → RSS feed: requests feed (evidence: `app/feed.xml/route.ts`)
- Reader → News sitemap: requests sitemap (evidence: `app/news-sitemap.xml/route.ts`)
- News sitemap → Payload CMS: queries news (evidence: `app/news-sitemap.xml/route.ts`)
- Payload CMS → SQLite or SQL database: reads and writes
