# codebykwakes/lucy-zion-thatcher architecture

> Architecture diagram of the GitHub repository codebykwakes/lucy-zion-thatcher, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/codebykwakes/lucy-zion-thatcher
- Repository: https://github.com/codebykwakes/lucy-zion-thatcher

## Overview

##### Project type and purpose
- This is a full-stack single-page application built with Angular and managed in an Nx monorepo.
- It serves as a content-driven site (blogs, pages, testimonials) likely backed by a headless CMS (see `shared/domain/utils/directus.util.ts`).
- It is intended for static hosting (Netlify) and uses Nx for build orchestration, code sharing, and testing.

##### File structure
- Top-level “modules” folder groups domain modules by feature: `blogs`, `pages`, `testimonials`, plus cross-cutting `core` and `shared`.
- Each module has sub-folders:
– `api`: HTTP / data-access libraries
– `domain`: state management (NgRx + domain logic)
– `feature`: Angular components & routes
– `ui`: presentational components (in core and shared)
- The “styles” folder is a standalone SCSS library.
- The `src` folder contains the Angular application shell (`app.component.ts`, `app.routes.ts`) which pulls together the modules.
- Config files: Nx (`nx.json`, `project.json`), TypeScript (`tsconfig.*.json`), lint, jest, Cypress (e2e).

##### README for additional insights
- Confirms usage of Nx CLI (`nx serve`, `nx build`).

##### Detail
- SCSS library feeding into all UI libs.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Application Shell
    subgraph "Application Shell"
        direction TB
        AppComponent["App Component"]:::shell
        AppRoutes["App Routes"]:::shell
        MainTS["Main.ts"]:::shell
        IndexHTML["Index.html"]:::shell
    end

    %% Feature Layer
    subgraph "Feature Layer"
        direction TB
        BlogsFeature["Blogs Feature Library"]:::feature
        PagesFeature["Pages Feature Library"]:::feature
        TestimonialsFeature["Testimonials Feature Library"]:::feature
        CoreFeature["Core Feature Library"]:::feature
    end

    %% Domain Layer
    subgraph "Domain Layer"
        direction TB
        BlogsDomain["Blogs Domain Library"]:::domain
        PagesDomain["Pages Domain Library"]:::domain
        TestimonialsDomain["Testimonials Domain Library"]:::domain
        CoreDomain["Core Domain Library"]:::domain
        SharedDomain["Shared Domain Library"]:::shared
    end

    %% API Layer
    subgraph "API Layer"
        direction TB
        BlogsAPI["Blogs API Library"]:::api
        PagesAPI["Pages API Library"]:::api
        TestimonialsAPI["Testimonials API Library"]:::api
        CoreAPI["Core API Library"]:::api
    end

    %% UI Libraries
    subgraph "UI Libraries"
        direction TB
        PagesUI["Pages UI Library"]:::ui
        CoreUI["Core UI Library"]:::ui
        SharedUI["Shared UI Library"]:::shared
    end

    %% Shared Utilities
    subgraph "Shared Utilities"
        direction TB
        SharedModels["Shared Models Library"]:::shared
        SharedUtils["Shared Utils Library"]:::shared
    end

    %% Global Styles
    GlobalStyles["Global Styles Library"]:::styles

    %% External Services
    Directus["Headless CMS (Directus)"]:::external
    AssetHost["Asset Hosting"]:::external

    %% CI/CD
    subgraph "CI/CD Pipeline"
        direction TB
        GHActions["GitHub Actions"]:::cicd
        Jest["Jest Unit Tests"]:::cicd
        JestApp["Jest App Config"]:::cicd
        Cypress["Cypress E2E"]:::cicd
        E2ETests["E2E Tests"]:::cicd
        NetlifyDeploy["Netlify Deployment"]:::cicd
    end

    %% Dependencies
    AppComponent -->|imports| BlogsFeature
    AppComponent -->|imports| PagesFeature
    AppComponent -->|imports| TestimonialsFeature
    AppComponent -->|imports| CoreFeature

    BlogsFeature -->|depends on| BlogsDomain
    PagesFeature -->|depends on| PagesDomain
    TestimonialsFeature -->|depends on| TestimonialsDomain
    CoreFeature -->|depends on| CoreDomain

    BlogsDomain -->|uses| BlogsAPI
    PagesDomain -->|uses| PagesAPI
    TestimonialsDomain -->|uses| TestimonialsAPI
    CoreDomain -->|uses| CoreAPI

    BlogsFeature -->|imports| SharedDomain
    PagesFeature -->|imports| SharedDomain
    TestimonialsFeature -->|imports| SharedDomain
    CoreFeature -->|imports| SharedDomain

    BlogsFeature -->|imports| SharedUI
    PagesFeature -->|imports| SharedUI
    TestimonialsFeature -->|imports| SharedUI
    CoreFeature -->|imports| SharedUI

    BlogsFeature -->|imports| SharedModels
    PagesFeature -->|imports| SharedModels
    TestimonialsFeature -->|imports| SharedModels
    CoreFeature -->|imports| SharedModels

    BlogsFeature -->|imports| SharedUtils
    PagesFeature -->|imports| SharedUtils
    TestimonialsFeature -->|imports| SharedUtils
    CoreFeature -->|imports| SharedUtils

    PagesUI -->|uses| GlobalStyles
    CoreUI -->|uses| GlobalStyles
    SharedUI -->|uses| GlobalStyles

    BlogsAPI -->|HTTP calls| Directus
    PagesAPI -->|HTTP calls| Directus
    TestimonialsAPI -->|HTTP calls| Directus
    CoreAPI -->|HTTP calls| Directus

    BlogsAPI -->|fetch assets| AssetHost
    PagesAPI -->|fetch assets| AssetHost
    TestimonialsAPI -->|fetch assets| AssetHost
    CoreAPI -->|fetch assets| AssetHost

    %% CI/CD Flow
    GHActions -->|runs| Jest
    GHActions -->|runs| JestApp
    GHActions -->|runs| Cypress
    GHActions -->|runs| E2ETests
    GHActions -->|builds| NetlifyDeploy
    NetlifyDeploy -->|deploys| AppComponent

    %% Click events
    click AppComponent "https://github.com/codebykwakes/lucy-zion-thatcher/blob/main/src/app/app.component.ts"
    click AppRoutes "https://github.com/codebykwakes/lucy-zion-thatcher/blob/main/src/app/app.routes.ts"
    click MainTS "https://github.com/codebykwakes/lucy-zion-thatcher/blob/main/src/main.ts"
    click IndexHTML "https://github.com/codebykwakes/lucy-zion-thatcher/blob/main/src/index.html"
    click BlogsAPI "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/modules/blogs/api"
    click BlogsDomain "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/modules/blogs/domain"
    click BlogsFeature "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/modules/blogs/feature"
    click PagesAPI "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/modules/pages/api"
    click PagesDomain "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/modules/pages/domain"
    click PagesFeature "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/modules/pages/feature"
    click PagesUI "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/modules/pages/ui"
    click TestimonialsAPI "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/modules/testimonials/api"
    click TestimonialsDomain "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/modules/testimonials/domain"
    click TestimonialsFeature "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/modules/testimonials/feature"
    click CoreAPI "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/modules/core/api"
    click CoreDomain "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/modules/core/domain"
    click CoreFeature "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/modules/core/feature"
    click CoreUI "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/modules/core/ui"
    click SharedDomain "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/modules/shared/domain"
    click SharedModels "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/modules/shared/models"
    click SharedUI "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/modules/shared/ui"
    click SharedUtils "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/modules/shared/utils"
    click GlobalStyles "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/styles/src/lib/scss"
    click GHActions "https://github.com/codebykwakes/lucy-zion-thatcher/blob/main/.github/workflows/ci.yml"
    click NetlifyDeploy "https://github.com/codebykwakes/lucy-zion-thatcher/blob/main/netlify.toml"
    click Jest "https://github.com/codebykwakes/lucy-zion-thatcher/blob/main/jest.config.ts"
    click JestApp "https://github.com/codebykwakes/lucy-zion-thatcher/blob/main/jest.config.app.ts"
    click Cypress "https://github.com/codebykwakes/lucy-zion-thatcher/blob/main/e2e/cypress.config.ts"
    click E2ETests "https://github.com/codebykwakes/lucy-zion-thatcher/tree/main/e2e/src/e2e"

    %% Styles
    classDef shell fill:#FFFAE6,stroke:#333,stroke-width:1px
    classDef feature fill:#D6E9FE,stroke:#333,stroke-width:1px
    classDef domain fill:#E2F7E1,stroke:#333,stroke-width:1px
    classDef api fill:#FDEBD0,stroke:#333,stroke-width:1px
    classDef ui fill:#F5E1FE,stroke:#333,stroke-width:1px
    classDef shared fill:#E8E8E8,stroke:#333,stroke-width:1px
    classDef styles fill:#E0F7FA,stroke:#333,stroke-width:1px
    classDef external fill:#FFEBE6,stroke:#333,stroke-width:1px
    classDef cicd fill:#FFEADD,stroke:#333,stroke-width:1px
```
