# nguyendoanhien/fuse-theme architecture

> Architecture diagram of the GitHub repository nguyendoanhien/fuse-theme, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nguyendoanhien/fuse-theme
- Repository: https://github.com/nguyendoanhien/fuse-theme

## Overview

##### Project type and purpose
- This is a frontend-only Angular 8 application: a Material Design Admin Template (“Fuse”).
- It ships with a shared UI library (@fuse), dozens of feature modules (Apps, Pages, UI, Documentation), routing, NgRx store, SCSS theming, and a fake-DB service for demo data.

##### File structure
- Top-level Angular CLI config: angular.json, tsconfig*.json, package.json.
- src/@fuse: shared UI library (components, directives, pipes, services, SCSS themes).
- src/app:
– Core/AppModule: app.component.*, app.module.ts, routing & theming.
– Layout module: header, footer, navigation, chat-panel, quick-panel.
– main/apps: feature modules (chat, calendar, e-commerce, mail, todo, etc.) – each lazy-loaded.
– main/pages: standalone pages (login, error pages, profile, pricing, etc.).
– main/ui: UI showcase modules for cards, forms, typography, page-layouts.
– documentation: live docs & examples of @fuse components & 3rd-party integrations.
– navigation: routing config and multi-language support.
– store: NgRx (actions, reducers, effects) and router integration.
- assets/: static images, fonts, and dozens of Angular Material code examples.
- e2e/ & test.ts: Protractor and Karma setup.

##### README
- Confirms use of Angular CLI for development (`ng serve`), building (`ng build`), unit tests (`ng test`), e2e tests (`ng e2e`).
- No backend code – data is faked locally via fake-db service.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Build System
    subgraph "Build System" 
        CLI["Angular CLI / Webpack"]:::build
        click CLI "https://github.com/nguyendoanhien/fuse-theme/blob/master/angular.json"
        click CLI "https://github.com/nguyendoanhien/fuse-theme/blob/master/package.json"
    end

    CLI -->|build| Bundle["AppBundle (dist)"]:::build
    Bundle -->|serves| Browser["Browser / Client"]:::external

    %% Core & Bootstrap
    Browser -->|loads index.html| Bootstrap["Bootstrap (main.ts)"]:::build
    click Bootstrap "https://github.com/nguyendoanhien/fuse-theme/blob/master/src/main.ts"
    Bootstrap -->|initializes| AppModule["AppModule"]:::module
    click AppModule "https://github.com/nguyendoanhien/fuse-theme/blob/master/src/app/app.module.ts"

    %% Shared UI Library
    subgraph "Shared UI Library (@fuse)" 
        FuseModule["fuse.module.ts"]:::module
        click FuseModule "https://github.com/nguyendoanhien/fuse-theme/blob/master/src/@fuse/fuse.module.ts"
        SharedModule["shared.module.ts"]:::module
        click SharedModule "https://github.com/nguyendoanhien/fuse-theme/blob/master/src/@fuse/shared.module.ts"
        Components["Components"]:::module
        click Components "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/@fuse/components"
        Directives["Directives"]:::module
        click Directives "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/@fuse/directives"
        Pipes["Pipes"]:::module
        click Pipes "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/@fuse/pipes"
        Services["Services"]:::service
        click Services "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/@fuse/services"
        SCSS["SCSS Themes"]:::module
        click SCSS "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/@fuse/scss"
    end
    AppModule -->|imports| FuseModule
    AppModule -->|imports| SharedModule

    %% Core Module
    subgraph "Core Module"
        AppComp["AppComponent"]:::module
        click AppComp "https://github.com/nguyendoanhien/fuse-theme/blob/master/src/app/app.component.ts"
        Theme["app.theme.scss"]:::module
        click Theme "https://github.com/nguyendoanhien/fuse-theme/blob/master/src/app/app.theme.scss"
        Navigation["Navigation & Routing"]:::module
        click Navigation "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/app/navigation"
        FuseConfig["Fuse Config"]:::module
        click FuseConfig "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/app/fuse-config"
    end
    AppModule --> AppComp
    AppModule --> Theme
    AppModule --> Navigation
    AppModule --> FuseConfig

    %% Layout Module
    subgraph "Layout Module"
        LayoutMod["layout.module.ts"]:::module
        click LayoutMod "https://github.com/nguyendoanhien/fuse-theme/blob/master/src/app/layout/layout.module.ts"
        subgraph "Components"
            ChatPanel["Chat Panel"]:::module
            Footer["Footer"]:::module
            Navbar["Navbar"]:::module
            QuickPanel["Quick Panel"]:::module
            Toolbar["Toolbar"]:::module
            Content["Content"]:::module
        end
        subgraph "Layouts"
            Horizontal["Horizontal (layout-1,2,3)"]:::module
            Vertical["Vertical (layout-1,2,3)"]:::module
        end
        click ChatPanel "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/app/layout/components/chat-panel"
        click Footer "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/app/layout/components/footer"
        click Navbar "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/app/layout/components/navbar"
        click QuickPanel "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/app/layout/components/quick-panel"
        click Toolbar "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/app/layout/components/toolbar"
        click Content "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/app/layout/components/content"
        click Horizontal "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/app/layout/horizontal"
        click Vertical "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/app/layout/vertical"
    end
    AppModule --> LayoutMod

    %% Feature Modules
    subgraph "Feature Modules"
        subgraph "Apps" 
            Apps[/"Apps (lazy)"/]:::module
            click Apps "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/app/main/apps"
        end
        subgraph "Pages"
            Pages[/"Pages (lazy)"/]:::module
            click Pages "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/app/main/pages"
        end
        subgraph "UI Showcase"
            UIShowcase[/"UI Showcase (lazy)"/]:::module
            click UIShowcase "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/app/main/ui"
        end
        subgraph "Documentation"
            Docs[/"Documentation (lazy)"/]:::module
            click Docs "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/app/main/documentation"
        end
    end
    Navigation -->|lazy-load| Apps
    Navigation -->|lazy-load| Pages
    Navigation -->|lazy-load| UIShowcase
    Navigation -->|lazy-load| Docs

    %% State Management
    subgraph "State Management (NgRx)" 
        Actions["Actions"]:::state
        Reducers["Reducers"]:::state
        Effects["Effects"]:::state
        StoreModule["StoreModule"]:::state
        RouterStore["Router Store"]:::state
        click Actions "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/app/store/actions"
        click Reducers "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/app/store/reducers"
        click Effects "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/app/store/effects"
        click StoreModule "https://github.com/nguyendoanhien/fuse-theme/blob/master/src/app/store/store.module.ts"
    end
    AppModule --> StoreModule

    %% Service Layer & Fake-DB
    subgraph "Service Layer"
        HTTPServices["HTTP Services"]:::service
        FakeDB["Fake-DB Service"]:::service
        click FakeDB "https://github.com/nguyendoanhien/fuse-theme/blob/master/src/app/fake-db/fake-db.service.ts"
    end
    Effects --> HTTPServices
    Effects --> FakeDB

    %% Data Flow
    AppComp -->|dispatches| Actions
    Effects -->|calls| HTTPServices
    HTTPServices -->|fetch| FakeDB
    FakeDB -->|response| Effects
    Effects -->|updates| Reducers
    Reducers -->|update| StoreModule
    StoreModule -->|state| AppComp

    %% Assets & Examples
    subgraph "Assets & Examples"
        MatExamples["Material Examples"]:::assets
        click MatExamples "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/assets/angular-material-examples"
        Icons["Icons"]:::assets
        click Icons "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/assets/icons"
        Images["Images"]:::assets
        click Images "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/assets/images"
    end
    Bundle --> Assets["Assets"]:::assets
    Assets --> MatExamples
    Assets --> Icons
    Assets --> Images

    %% Environments & Polyfills
    subgraph "Environments & Polyfills"
        Env["Environments"]:::assets
        click Env "https://github.com/nguyendoanhien/fuse-theme/tree/master/src/environments"
        Polyfills["Polyfills"]:::assets
        click Polyfills "https://github.com/nguyendoanhien/fuse-theme/blob/master/src/polyfills.ts"
        IndexHTML["index.html"]:::assets
        click IndexHTML "https://github.com/nguyendoanhien/fuse-theme/blob/master/src/index.html"
    end
    Bootstrap --> Env
    Bootstrap --> Polyfills
    Bootstrap --> IndexHTML

    classDef build fill:#E0F7FA,stroke:#006064;
    classDef module fill:#BBDEFB,stroke:#0D47A1;
    classDef service fill:#C8E6C9,stroke:#1B5E20;
    classDef state fill:#FFE082,stroke:#FF6F00;
    classDef assets fill:#EEEEEE,stroke:#616161;
    classDef external fill:#F0F4C3,stroke:#827717;
```
