# suejinkim20/bdc-web architecture

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

- Interactive diagram: https://gitdiagram.com/suejinkim20/bdc-web
- Repository: https://github.com/suejinkim20/bdc-web

## Overview

1. This is a monorepo for the BDC web platform with three Astro applications, one shared design package, and one Python service. The top-level boundary is clear: `apps/` contains user-facing sites, `packages/` contains reusable styling, and `services/` contains backend infrastructure.

2. `apps/site` is the public-facing marketing and information site. It is mostly static content built from Astro pages and MDX, with a few React islands used where interaction is required, such as search and parts of the global header. Its content model is page-centric and organized around about/data/help/news sections.

3. `apps/docs` is a separate documentation site. It uses Astro with Starlight and is structured like a technical docs portal: hierarchical markdown/MDX content, a sidebar config, and tests around navigation behavior. Its architecture is content-led rather than component-heavy.

4. `apps/consortium` is an internal portal for consortium operations. It is fully static, with no SSR runtime, and prerenders dynamic routes at build time. It combines Astro components with MDX/YAML content to surface member directory data, RFCs, meeting materials, BAMs, working groups, onboarding/offboarding resources, and form links.

5. The consortium app’s data flow is mostly build-time content ingestion. Member records, recurring meetings, and related structured data come from local YAML files, while narrative and document pages come from MDX and markdown under `src/content`. Dynamic pages such as member detail pages and document trees are generated from this content during the build.

6. `packages/uswds-theme` is a shared presentation layer package. It encapsulates USWDS theme customization in SCSS partials, so the apps can share consistent typography, color, and navigation styling without duplicating design-system overrides.

7. `services/freshdesk` is the only explicit backend service in the repo. It is a Python-based proxy intended for AWS Lambda, and it acts as a boundary around Freshdesk API access rather than being part of the static site runtime. In architecture terms, it supports support/contact workflows external to the Astro apps.

8. Content and routing are file-based throughout the repo. The public site and docs use nested `src/content` and `src/pages` structures for article, event, and topic routes; the consortium app uses route groups for resources, directories, and document archives. This makes navigation and content ownership map directly to the filesystem.

9. The main runtime boundary is “static at build time” versus “interactive in the browser.” Most pages are pre-rendered HTML, while client JavaScript is limited to targeted components in `apps/site` where interaction or state is necessary. The consortium app is especially strict here, with no server adapter and no runtime API dependencies for its content pages.

10. Quality gates are enforced at the monorepo level and per app. CI runs formatting/linting with Biome, builds the apps, executes Vitest suites, and performs accessibility checks with Playwright and axe-core. That means architecture decisions are constrained by static build success, content correctness, and accessibility compliance rather than by server uptime or API availability.

Main entry points: [`apps/site`](https://github.com/suejinkim20/bdc-web/tree/main/apps/site) (Site), [`apps/consortium`](https://github.com/suejinkim20/bdc-web/tree/main/apps/consortium) (Consortium), [`packages/uswds-theme`](https://github.com/suejinkim20/bdc-web/tree/main/packages/uswds-theme) (USWDS theme), [`apps/docs`](https://github.com/suejinkim20/bdc-web/tree/main/apps/docs) (Docs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_repo_apps["apps"]
  node_apps_site["Site<br/>Astro app"]
  node_site_pages["Site pages<br/>file-based routes"]
  node_site_components["Site UI<br/>components"]
  node_site_content["Site content<br/>content layer"]
  node_site_search["Search island<br/>React island<br/>[SearchInput.tsx]"]
  node_apps_docs["Docs<br/>Astro app"]
  node_docs_content["Docs content<br/>docs tree"]
  node_docs_sidebar["Sidebar config<br/>navigation config<br/>[sidebar.ts]"]
  node_apps_consortium["Consortium<br/>Astro app"]
  node_consortium_pages["Portal pages<br/>static routes"]
  node_consortium_content["Portal content<br/>build content"]
  node_consortium_components["Portal components<br/>astro components"]
  node_consortium_directory["Directory routes<br/>dynamic pages<br/>[[id].astro]"]
  node_consortium_docs["Document routes<br/>prerendered routes<br/>[[...slug].astro]"]
end

subgraph group_repo_packages["packages"]
  node_theme_pkg["USWDS theme<br/>shared package"]
  node_theme_scss["Theme partials<br/>scss overrides"]
end

subgraph group_repo_services["services"]
  node_freshdesk_service["Freshdesk<br/>lambda proxy"]
  node_freshdesk_handler["API handler<br/>python service<br/>[handler.py]"]
end

subgraph group_repo_ci["ci"]
  node_ci_workflow["CI checks<br/>build pipeline<br/>[ci.yaml]"]
end

node_root["BDC web<br/>monorepo"]

node_root -->|"contains"| node_apps_site
node_root -->|"contains"| node_apps_docs
node_root -->|"contains"| node_apps_consortium
node_root -->|"contains"| node_theme_pkg
node_root -->|"contains"| node_freshdesk_service
node_root -->|"checks"| node_ci_workflow
node_apps_site -->|"routes"| node_site_pages
node_apps_site -->|"uses"| node_site_components
node_apps_site -->|"reads"| node_site_content
node_site_components -->|"includes"| node_site_search
node_apps_docs -->|"publishes"| node_docs_content
node_apps_docs -->|"navigates"| node_docs_sidebar
node_apps_consortium -->|"routes"| node_consortium_pages
node_apps_consortium -->|"ingests"| node_consortium_content
node_apps_consortium -->|"renders"| node_consortium_components
node_consortium_pages -->|"generates"| node_consortium_directory
node_consortium_pages -->|"generates"| node_consortium_docs
node_consortium_content -->|"feeds"| node_consortium_directory
node_consortium_content -->|"feeds"| node_consortium_docs
node_theme_pkg -->|"contains"| node_theme_scss
node_apps_site -->|"shares"| node_theme_pkg
node_apps_docs -->|"shares"| node_theme_pkg
node_apps_consortium -->|"shares"| node_theme_pkg
node_freshdesk_service -->|"implements"| node_freshdesk_handler
node_freshdesk_service -.->|"supports"| node_apps_site

click node_apps_site "https://github.com/suejinkim20/bdc-web/tree/main/apps/site"
click node_site_pages "https://github.com/suejinkim20/bdc-web/tree/main/apps/site/src/pages"
click node_site_components "https://github.com/suejinkim20/bdc-web/tree/main/apps/site/src/components"
click node_site_content "https://github.com/suejinkim20/bdc-web/tree/main/apps/site/src/content"
click node_site_search "https://github.com/suejinkim20/bdc-web/blob/main/apps/site/src/components/layout/SearchInput.tsx"
click node_apps_docs "https://github.com/suejinkim20/bdc-web/tree/main/apps/docs"
click node_docs_content "https://github.com/suejinkim20/bdc-web/tree/main/apps/docs/src/content/docs"
click node_docs_sidebar "https://github.com/suejinkim20/bdc-web/blob/main/apps/docs/src/config/sidebar.ts"
click node_apps_consortium "https://github.com/suejinkim20/bdc-web/tree/main/apps/consortium"
click node_consortium_pages "https://github.com/suejinkim20/bdc-web/tree/main/apps/consortium/src/pages"
click node_consortium_content "https://github.com/suejinkim20/bdc-web/tree/main/apps/consortium/src/content"
click node_consortium_components "https://github.com/suejinkim20/bdc-web/tree/main/apps/consortium/src/components"
click node_consortium_directory "https://github.com/suejinkim20/bdc-web/blob/main/apps/consortium/src/pages/consortium-directory/[id].astro"
click node_consortium_docs "https://github.com/suejinkim20/bdc-web/blob/main/apps/consortium/src/pages/consortium-resources/rfcs/[...slug].astro"
click node_theme_pkg "https://github.com/suejinkim20/bdc-web/tree/main/packages/uswds-theme"
click node_theme_scss "https://github.com/suejinkim20/bdc-web/tree/main/packages/uswds-theme/src"
click node_freshdesk_service "https://github.com/suejinkim20/bdc-web/tree/main/services/freshdesk"
click node_freshdesk_handler "https://github.com/suejinkim20/bdc-web/blob/main/services/freshdesk/handler.py"
click node_ci_workflow "https://github.com/suejinkim20/bdc-web/blob/main/.github/workflows/ci.yaml"

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_apps_site,node_site_pages,node_site_components,node_site_content,node_site_search,node_apps_docs,node_docs_content,node_docs_sidebar,node_apps_consortium,node_consortium_pages,node_consortium_content,node_consortium_components,node_consortium_directory,node_consortium_docs toneBlue
class node_theme_pkg,node_theme_scss toneAmber
class node_freshdesk_service,node_freshdesk_handler toneMint
class node_ci_workflow toneRose
class node_root toneNeutral
```

## Components

### apps

User-facing Astro applications

- [Site](https://github.com/suejinkim20/bdc-web/tree/main/apps/site): Astro app · Public marketing and information site · `apps/site`
- [Site pages](https://github.com/suejinkim20/bdc-web/tree/main/apps/site/src/pages): file-based routes · Public site pages and route-driven content sections · `apps/site/src/pages`
- [Site UI](https://github.com/suejinkim20/bdc-web/tree/main/apps/site/src/components): components · Shared UI plus targeted browser islands · `apps/site/src/components`
- [Site content](https://github.com/suejinkim20/bdc-web/tree/main/apps/site/src/content): content layer · MDX and structured content for news, events, publications, and site data · `apps/site/src/content`
- [Search island](https://github.com/suejinkim20/bdc-web/blob/main/apps/site/src/components/layout/SearchInput.tsx): React island · Client-side interaction for search inside the otherwise static site · `apps/site/src/components/layout/SearchInput.tsx`
- [Docs](https://github.com/suejinkim20/bdc-web/tree/main/apps/docs): Astro app · Starlight-based documentation portal · `apps/docs`
- [Docs content](https://github.com/suejinkim20/bdc-web/tree/main/apps/docs/src/content/docs): docs tree · Hierarchical markdown and MDX documentation structure · `apps/docs/src/content/docs`
- [Sidebar config](https://github.com/suejinkim20/bdc-web/blob/main/apps/docs/src/config/sidebar.ts): navigation config · Docs navigation structure and its validation · `apps/docs/src/config/sidebar.ts`
- [Consortium](https://github.com/suejinkim20/bdc-web/tree/main/apps/consortium): Astro app · Internal portal for consortium operations · `apps/consortium`
- [Portal pages](https://github.com/suejinkim20/bdc-web/tree/main/apps/consortium/src/pages): static routes · File-based portal routes including directory, resources, and generated archives · `apps/consortium/src/pages`
- [Portal content](https://github.com/suejinkim20/bdc-web/tree/main/apps/consortium/src/content): build content · MDX, markdown, and YAML content ingested at build time · `apps/consortium/src/content`
- [Portal components](https://github.com/suejinkim20/bdc-web/tree/main/apps/consortium/src/components): astro components · Page shells and content renderers for resources, meetings, and forms · `apps/consortium/src/components`
- [Directory routes](https://github.com/suejinkim20/bdc-web/blob/main/apps/consortium/src/pages/consortium-directory/[id].astro): dynamic pages · Member directory detail and listing routes generated from content · `apps/consortium/src/pages/consortium-directory/[id].astro`
- [Document routes](https://github.com/suejinkim20/bdc-web/blob/main/apps/consortium/src/pages/consortium-resources/rfcs/[...slug].astro): prerendered routes · RFC and meeting-material archive routes built from content slugs · `apps/consortium/src/pages/consortium-resources/rfcs/[...slug].astro`

### packages

Shared reusable styling and design

- [USWDS theme](https://github.com/suejinkim20/bdc-web/tree/main/packages/uswds-theme): shared package · Shared presentation-layer theme customizations · `packages/uswds-theme`
- [Theme partials](https://github.com/suejinkim20/bdc-web/tree/main/packages/uswds-theme/src): scss overrides · USWDS color, typography, nav, and initialization partials · `packages/uswds-theme/src`

### services

Backend infrastructure and integrations

- [Freshdesk](https://github.com/suejinkim20/bdc-web/tree/main/services/freshdesk): lambda proxy · Python proxy boundary for Freshdesk API access · `services/freshdesk`
- [API handler](https://github.com/suejinkim20/bdc-web/blob/main/services/freshdesk/handler.py): python service · Lambda-facing handler and proxy implementation · `services/freshdesk/handler.py`

### ci

Monorepo quality gates and build checks

- [CI checks](https://github.com/suejinkim20/bdc-web/blob/main/.github/workflows/ci.yaml): build pipeline · Formatting, linting, builds, tests, and accessibility checks · `.github/workflows/ci.yaml`

### Other components

- **BDC web**: monorepo · Top-level monorepo boundary for the BDC web platform

## Connections

- BDC web → Site: contains · Top-level monorepo boundary includes the public site
- BDC web → Docs: contains · Top-level monorepo boundary includes the docs app
- BDC web → Consortium: contains · Top-level monorepo boundary includes the consortium portal
- BDC web → USWDS theme: contains · Top-level monorepo boundary includes shared styling
- BDC web → Freshdesk: contains · Top-level monorepo boundary includes backend support service
- BDC web → CI checks: checks · Repository-level CI constrains all major subsystems
- Site → Site pages: routes · Site pages are file-based Astro routes
- Site → Site UI: uses · Pages compose shared UI components and layouts
- Site → Site content: reads · Public site content is sourced from MDX and structured data
- Site UI → Search island: includes · Interactive browser behavior is limited to targeted React islands
- Docs → Docs content: publishes · Docs app is driven by the documentation content tree
- Docs → Sidebar config: navigates · Sidebar config defines portal navigation and ordering
- Consortium → Portal pages: routes · Consortium portal is organized as static file-based routes
- Consortium → Portal content: ingests · Portal content is built from local MDX, markdown, and YAML
- Consortium → Portal components: renders · Astro components render content-led pages and reusable sections
- Portal pages → Directory routes: generates · Directory views are built from member records at build time
- Portal pages → Document routes: generates · Resource and archive routes expand from content slugs
- Portal content → Directory routes: feeds · Member and recurring-meeting data power directory pages
- Portal content → Document routes: feeds · RFCs and meeting materials power prerendered document trees
- USWDS theme → Theme partials: contains · Shared package centralizes SCSS theme overrides
- Site → USWDS theme: shares · Public site consumes the shared USWDS theme package
- Docs → USWDS theme: shares · Docs app inherits the shared design layer
- Consortium → USWDS theme: shares · Consortium portal reuses the shared design layer
- Freshdesk → API handler: implements · Python handler provides the Lambda proxy boundary
- Freshdesk → Site: supports · Service supports support/contact workflows around the public site
