# jinendra/my-first-static-web-app architecture

> Architecture diagram of the GitHub repository jinendra/my-first-static-web-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jinendra/my-first-static-web-app
- Repository: https://github.com/jinendra/my-first-static-web-app

## Overview

#### Purpose and deployment model
This is an Angular CLI starter for a static site intended for Azure Static Web Apps. It has no visible backend/API implementation; the deliverable is a browser application built into static assets and deployed through Azure Static Web Apps tooling. Core deployment configuration is in `staticwebapp.config.json` and `swa-cli.config.json`.

#### Application bootstrap
The browser loads `src/index.html`, then Angular starts from `src/main.ts`. Global browser compatibility setup is loaded through `src/polyfills.ts`, while cross-application CSS is in `src/styles.css`.

#### Angular composition root
`src/app/app.module.ts` is the Angular module boundary and assembles framework/application dependencies. `src/app/app.component.ts` is the visible root component and therefore the current primary UI entry point. The tree contains no feature modules, routing configuration, services, or domain model layers.

#### Build and runtime pipeline
Angular CLI configuration in `angular.json` defines development, test, and production build behavior. TypeScript application compilation is scoped by `tsconfig.app.json`; environment-specific values are supplied by `src/environments/environment.ts` and `src/environments/environment.prod.ts`, typically swapped during production builds.

#### Local development and Azure integration
The intended local entry command is `npm run swa:start`, which uses `swa-cli.config.json` to coordinate Angular development/build output with the Azure Static Web Apps CLI. Azure login and deployment are exposed through npm scripts and target the Azure Static Web Apps service; no server runtime is represented in the repository.

#### Validation boundaries
Unit-test bootstrapping enters through `src/test.ts` and uses Karma configuration from `karma.conf.js`. Browser-level end-to-end validation is separated under `e2e/`, with Protractor driven by `e2e/protractor.conf.js`. These validate the deployed/browser-facing Angular surface rather than constituting application runtime components.

Main entry points: [`angular.json`](https://github.com/jinendra/my-first-static-web-app/blob/main/angular.json) (Angular CLI config), [`src/app/app.module.ts`](https://github.com/jinendra/my-first-static-web-app/blob/main/src/app/app.module.ts) (Application module), [`src/main.ts`](https://github.com/jinendra/my-first-static-web-app/blob/main/src/main.ts) (Angular bootstrap), [`swa-cli.config.json`](https://github.com/jinendra/my-first-static-web-app/blob/main/swa-cli.config.json) (SWA CLI config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Browser Application"]
  node_index["HTML shell<br/>browser entry<br/>[index.html]"]
  node_main["Angular bootstrap<br/>TypeScript entry<br/>[main.ts]"]
  node_polyfills["Browser polyfills<br/>compatibility setup<br/>[polyfills.ts]"]
  node_styles["Global styles<br/>CSS<br/>[styles.css]"]
  node_app_module["Application module<br/>Angular composition root<br/>[app.module.ts]"]
  node_app_component["Root component<br/>Angular UI root<br/>[app.component.ts]"]
end

subgraph group_build["Build &amp; Deployment"]
  node_angular_cli["Angular CLI config<br/>build configuration<br/>[angular.json]"]
  node_tsconfig["App TypeScript config<br/>compilation scope<br/>[tsconfig.app.json]"]
  node_environment_dev["Development environment<br/>environment values<br/>[environment.ts]"]
  node_environment_prod["Production environment<br/>environment values"]
  node_static_assets["Static site assets<br/>build output"]
  node_swa_cli_config["SWA CLI config<br/>local integration config"]
  node_swa_config["Static Web Apps config<br/>deployment configuration"]
  node_azure_swa{{"Azure Static Web Apps<br/>hosting service"}}
end

subgraph group_validation["Validation"]
  node_unit_tests["Unit test bootstrap<br/>Angular test entry<br/>[test.ts]"]
  node_karma["Karma config<br/>unit test runner config<br/>[karma.conf.js]"]
  node_e2e["End-to-end tests<br/>browser validation"]
  node_protractor["Protractor config<br/>E2E runner config<br/>[protractor.conf.js]"]
end

node_index -->|"loads"| node_main
node_main -->|"includes"| node_polyfills
node_main -->|"bootstraps"| node_app_module
node_app_module -->|"renders"| node_app_component
node_styles -->|"styles"| node_app_component
node_angular_cli -->|"scopes compilation with"| node_tsconfig
node_angular_cli -->|"uses for development"| node_environment_dev
node_angular_cli -->|"uses for production"| node_environment_prod
node_angular_cli -->|"builds"| node_static_assets
node_app_module -->|"compiled into"| node_static_assets
node_swa_cli_config -->|"coordinates local start"| node_angular_cli
node_swa_cli_config -->|"serves build output"| node_static_assets
node_static_assets -->|"deployed to"| node_azure_swa
node_swa_config -->|"configures"| node_azure_swa
node_unit_tests -->|"runs with"| node_karma
node_karma -.->|"validates"| node_app_module
node_e2e -->|"driven by"| node_protractor
node_protractor -.->|"validates browser surface"| node_azure_swa

click node_index "https://github.com/jinendra/my-first-static-web-app/blob/main/src/index.html"
click node_main "https://github.com/jinendra/my-first-static-web-app/blob/main/src/main.ts"
click node_polyfills "https://github.com/jinendra/my-first-static-web-app/blob/main/src/polyfills.ts"
click node_styles "https://github.com/jinendra/my-first-static-web-app/blob/main/src/styles.css"
click node_app_module "https://github.com/jinendra/my-first-static-web-app/blob/main/src/app/app.module.ts"
click node_app_component "https://github.com/jinendra/my-first-static-web-app/blob/main/src/app/app.component.ts"
click node_angular_cli "https://github.com/jinendra/my-first-static-web-app/blob/main/angular.json"
click node_tsconfig "https://github.com/jinendra/my-first-static-web-app/blob/main/tsconfig.app.json"
click node_environment_dev "https://github.com/jinendra/my-first-static-web-app/blob/main/src/environments/environment.ts"
click node_environment_prod "https://github.com/jinendra/my-first-static-web-app/blob/main/src/environments/environment.prod.ts"
click node_swa_cli_config "https://github.com/jinendra/my-first-static-web-app/blob/main/swa-cli.config.json"
click node_swa_config "https://github.com/jinendra/my-first-static-web-app/blob/main/staticwebapp.config.json"
click node_unit_tests "https://github.com/jinendra/my-first-static-web-app/blob/main/src/test.ts"
click node_karma "https://github.com/jinendra/my-first-static-web-app/blob/main/karma.conf.js"
click node_protractor "https://github.com/jinendra/my-first-static-web-app/blob/main/e2e/protractor.conf.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_index,node_main,node_polyfills,node_styles,node_app_module,node_app_component toneBlue
class node_angular_cli,node_tsconfig,node_environment_dev,node_environment_prod,node_static_assets,node_swa_cli_config,node_swa_config,node_azure_swa toneAmber
class node_unit_tests,node_karma,node_e2e,node_protractor toneMint
```

## Components

### Browser Application

Angular source and browser runtime.

- [HTML shell](https://github.com/jinendra/my-first-static-web-app/blob/main/src/index.html): browser entry · `src/index.html`
- [Angular bootstrap](https://github.com/jinendra/my-first-static-web-app/blob/main/src/main.ts): TypeScript entry · `src/main.ts`
- [Browser polyfills](https://github.com/jinendra/my-first-static-web-app/blob/main/src/polyfills.ts): compatibility setup · `src/polyfills.ts`
- [Global styles](https://github.com/jinendra/my-first-static-web-app/blob/main/src/styles.css): CSS · `src/styles.css`
- [Application module](https://github.com/jinendra/my-first-static-web-app/blob/main/src/app/app.module.ts): Angular composition root · Assembles framework and application dependencies. · `src/app/app.module.ts`
- [Root component](https://github.com/jinendra/my-first-static-web-app/blob/main/src/app/app.component.ts): Angular UI root · Current primary visible UI entry point. · `src/app/app.component.ts`

### Build & Deployment

CLI build and Azure Static Web Apps delivery.

- [Angular CLI config](https://github.com/jinendra/my-first-static-web-app/blob/main/angular.json): build configuration · Defines development, test, and production behavior. · `angular.json`
- [App TypeScript config](https://github.com/jinendra/my-first-static-web-app/blob/main/tsconfig.app.json): compilation scope · `tsconfig.app.json`
- [Development environment](https://github.com/jinendra/my-first-static-web-app/blob/main/src/environments/environment.ts): environment values · `src/environments/environment.ts`
- [Production environment](https://github.com/jinendra/my-first-static-web-app/blob/main/src/environments/environment.prod.ts): environment values · Typically substituted during production builds. · `src/environments/environment.prod.ts`
- **Static site assets**: build output · Browser application delivered without a server runtime.
- [SWA CLI config](https://github.com/jinendra/my-first-static-web-app/blob/main/swa-cli.config.json): local integration config · `swa-cli.config.json`
- [Static Web Apps config](https://github.com/jinendra/my-first-static-web-app/blob/main/staticwebapp.config.json): deployment configuration · `staticwebapp.config.json`
- **Azure Static Web Apps**: hosting service

### Validation

Separate unit and browser-level test entry points.

- [Unit test bootstrap](https://github.com/jinendra/my-first-static-web-app/blob/main/src/test.ts): Angular test entry · `src/test.ts`
- [Karma config](https://github.com/jinendra/my-first-static-web-app/blob/main/karma.conf.js): unit test runner config · `karma.conf.js`
- **End-to-end tests**: browser validation
- [Protractor config](https://github.com/jinendra/my-first-static-web-app/blob/main/e2e/protractor.conf.js): E2E runner config · `e2e/protractor.conf.js`

## Connections

- HTML shell → Angular bootstrap: loads
- Angular bootstrap → Browser polyfills: includes
- Angular bootstrap → Application module: bootstraps
- Application module → Root component: renders
- Global styles → Root component: styles
- Angular CLI config → App TypeScript config: scopes compilation with
- Angular CLI config → Development environment: uses for development
- Angular CLI config → Production environment: uses for production
- Angular CLI config → Static site assets: builds
- Application module → Static site assets: compiled into
- SWA CLI config → Angular CLI config: coordinates local start
- SWA CLI config → Static site assets: serves build output
- Static site assets → Azure Static Web Apps: deployed to
- Static Web Apps config → Azure Static Web Apps: configures
- Unit test bootstrap → Karma config: runs with
- Karma config → Application module: validates
- End-to-end tests → Protractor config: driven by
- Protractor config → Azure Static Web Apps: validates browser surface
