# jinendra/my-static-web-app architecture

> Architecture diagram of the GitHub repository jinendra/my-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-static-web-app
- Repository: https://github.com/jinendra/my-static-web-app

## Overview

#### Purpose and Repository Shape
This is a Microsoft Learn starter repository for deploying a shopping-themed static frontend to Azure Static Web Apps. It contains four independent implementations of the same conceptual application—Angular, React, Svelte, and Vue—not one integrated multi-framework runtime. The referenced Azure Functions API starter is external and is not present in this tree.

#### Application Entry Points
Each framework is a separately buildable Node.js application:
- Angular bootstraps from `angular-app/src/main.ts` into its root module and component: `angular-app/src/app/app.module.ts`, `angular-app/src/app/app.component.ts`.
- React renders from `react-app/src/index.js` through `react-app/src/App.js`.
- Svelte mounts from `svelte-app/src/main.js` into `svelte-app/src/App.svelte`.
- Vue mounts from `vue-app/src/main.js` into `vue-app/src/app.vue`.

#### Shared Product-Domain Experience
All variants implement product browsing under a common shopping UI pattern: application shell/navigation, About and not-found views, product list/detail-oriented views, and reusable presentation components.
- Angular product domain: `angular-app/src/app/products/products.module.ts`, `angular-app/src/app/products/products.component.ts`, `angular-app/src/app/products/product-list.component.ts`.
- React product domain: `react-app/src/products/Products.js`, `react-app/src/products/ProductList.js`, `react-app/src/products/useProducts.js`.
- Svelte product domain: `svelte-app/src/products/Products.svelte`, `svelte-app/src/products/ProductList.svelte`.
- Vue product domain: `vue-app/src/views/products/products.vue`, `vue-app/src/views/products/product-list.vue`.

#### Routing and Page Composition
Navigation is client-side and routes page-level views into a persistent app shell. Angular has an explicit router definition in `angular-app/src/app/router.ts`; Vue uses `vue-app/src/router.js`. Svelte includes redirect/not-found route presentation components in `svelte-app/src/components/Redirect.svelte` and `svelte-app/src/components/PageNotFound.svelte`; React composes equivalent app and not-found UI through `react-app/src/App.js` and `react-app/src/components/NotFound.js`.

#### State and Data Boundary
Product state is framework-local rather than shared across apps. Angular uses an entity-oriented store with an in-memory data service, making its API boundary replaceable: `angular-app/src/app/store/store.module.ts`, `angular-app/src/app/store/entity-metadata.ts`, `angular-app/src/app/in-memory-data.service.ts`. React has the strongest async/API separation—actions, reducer, saga, and API module: `react-app/src/store/product.actions.js`, `react-app/src/store/product.reducer.js`, `react-app/src/store/product.saga.js`, `react-app/src/store/product.api.js`. Svelte and Vue hold local product-store modules: `svelte-app/src/store/store.js`, `svelte-app/src/store/product-data.js`, `vue-app/src/store/modules/products.js`.

#### Reusable UI Layer
Each app separates page/domain composition from reusable shell and content controls, including header/navigation, cards, modal, list headers, and footer buttons. Representative paths are `angular-app/src/app/core/components/header-bar.component.ts`, `react-app/src/components/HeaderBar.js`, `svelte-app/src/components/HeaderBar.svelte`, and `vue-app/src/components/header-bar.vue`. This layer is the primary cross-framework feature-parity boundary.

#### Deployment and Runtime Infrastructure
All applications run through Node.js package scripts and framework-specific build systems, then emit static assets for Azure Static Web Apps. Per-app Static Web Apps routing/deployment configuration exists at `angular-app/staticwebapp.config.json`, `react-app/staticwebapp.config.json`, `svelte-app/staticwebapp.config.json`, and `vue-app/staticwebapp.config.json`. Angular includes a development proxy (`angular-app/proxy.conf.json`), indicating local API integration. Azure Static Web Apps is the target hosting/service boundary; Azure Functions is the intended optional serverless API runtime, supplied from a separate repository.

Main entry points: [`react-app/src/App.js`](https://github.com/jinendra/my-static-web-app/blob/main/react-app/src/App.js) (React app and routes), [`svelte-app/src/App.svelte`](https://github.com/jinendra/my-static-web-app/blob/main/svelte-app/src/App.svelte) (Svelte app shell), [`angular-app/src/main.ts`](https://github.com/jinendra/my-static-web-app/blob/main/angular-app/src/main.ts) (Angular bootstrap), [`vue-app/src/main.js`](https://github.com/jinendra/my-static-web-app/blob/main/vue-app/src/main.js) (Vue mount)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_angular["Angular app"]
  node_ng_entry["Angular bootstrap<br/>entrypoint<br/>[main.ts]"]
  node_ng_router["Angular router<br/>client routing<br/>[router.ts]"]
  node_ng_products["Angular products<br/>product feature<br/>[products.module.ts]"]
  node_ng_state[("Angular entity store<br/>state and data<br/>[store.module.ts]")]
  node_ng_ui["Angular shared UI<br/>presentation components"]
  node_ng_swa["Angular SWA config<br/>deployment config"]
end

subgraph group_react["React app"]
  node_react_entry["React render<br/>entrypoint<br/>[index.js]"]
  node_react_shell["React app and routes<br/>client shell<br/>[App.js]"]
  node_react_products["React products<br/>product feature<br/>[Products.js]"]
  node_react_state[("React async product state<br/>actions, reducer, saga, API<br/>[product.saga.js]")]
  node_react_ui["React shared UI<br/>presentation components<br/>[HeaderBar.js]"]
  node_react_swa["React SWA config<br/>deployment config"]
end

subgraph group_svelte["Svelte app"]
  node_svelte_entry["Svelte mount<br/>entrypoint<br/>[main.js]"]
  node_svelte_shell["Svelte app shell<br/>client shell<br/>[App.svelte]"]
  node_svelte_products["Svelte products<br/>product feature<br/>[Products.svelte]"]
  node_svelte_state[("Svelte product store<br/>local state<br/>[store.js]")]
  node_svelte_ui["Svelte shared UI<br/>presentation components<br/>[HeaderBar.svelte]"]
  node_svelte_swa["Svelte SWA config<br/>deployment config"]
end

subgraph group_vue["Vue app"]
  node_vue_entry["Vue mount<br/>entrypoint<br/>[main.js]"]
  node_vue_router["Vue router<br/>client routing<br/>[router.js]"]
  node_vue_products["Vue products<br/>product feature<br/>[products.vue]"]
  node_vue_state[("Vue product store<br/>local state<br/>[products.js]")]
  node_vue_ui["Vue shared UI<br/>presentation components<br/>[header-bar.vue]"]
  node_vue_swa["Vue SWA config<br/>deployment config"]
end

node_azure_swa{{"Azure Static Web Apps<br/>static hosting"}}
node_azure_functions{{"External Azure Functions API<br/>optional serverless API"}}

node_ng_entry -->|"initializes"| node_ng_router
node_ng_router -->|"routes to"| node_ng_products
node_ng_products -->|"reads products"| node_ng_state
node_ng_entry -->|"renders shell"| node_ng_ui
node_ng_swa -->|"deploys static assets"| node_azure_swa
node_ng_state -.->|"replaceable API target"| node_azure_functions
node_react_entry -->|"renders"| node_react_shell
node_react_shell -->|"composes"| node_react_products
node_react_products -->|"uses"| node_react_state
node_react_shell -->|"renders"| node_react_ui
node_react_swa -->|"deploys static assets"| node_azure_swa
node_react_state -.->|"API target"| node_azure_functions
node_svelte_entry -->|"mounts"| node_svelte_shell
node_svelte_shell -->|"composes"| node_svelte_products
node_svelte_products -->|"uses"| node_svelte_state
node_svelte_shell -->|"renders"| node_svelte_ui
node_svelte_swa -->|"deploys static assets"| node_azure_swa
node_vue_entry -->|"initializes"| node_vue_router
node_vue_router -->|"routes to"| node_vue_products
node_vue_products -->|"uses"| node_vue_state
node_vue_entry -->|"renders shell"| node_vue_ui
node_vue_swa -->|"deploys static assets"| node_azure_swa

click node_ng_entry "https://github.com/jinendra/my-static-web-app/blob/main/angular-app/src/main.ts"
click node_ng_router "https://github.com/jinendra/my-static-web-app/blob/main/angular-app/src/app/router.ts"
click node_ng_products "https://github.com/jinendra/my-static-web-app/blob/main/angular-app/src/app/products/products.module.ts"
click node_ng_state "https://github.com/jinendra/my-static-web-app/blob/main/angular-app/src/app/store/store.module.ts"
click node_ng_ui "https://github.com/jinendra/my-static-web-app/blob/main/angular-app/src/app/core/components/header-bar.component.ts"
click node_ng_swa "https://github.com/jinendra/my-static-web-app/blob/main/angular-app/staticwebapp.config.json"
click node_react_entry "https://github.com/jinendra/my-static-web-app/blob/main/react-app/src/index.js"
click node_react_shell "https://github.com/jinendra/my-static-web-app/blob/main/react-app/src/App.js"
click node_react_products "https://github.com/jinendra/my-static-web-app/blob/main/react-app/src/products/Products.js"
click node_react_state "https://github.com/jinendra/my-static-web-app/blob/main/react-app/src/store/product.saga.js"
click node_react_ui "https://github.com/jinendra/my-static-web-app/blob/main/react-app/src/components/HeaderBar.js"
click node_react_swa "https://github.com/jinendra/my-static-web-app/blob/main/react-app/staticwebapp.config.json"
click node_svelte_entry "https://github.com/jinendra/my-static-web-app/blob/main/svelte-app/src/main.js"
click node_svelte_shell "https://github.com/jinendra/my-static-web-app/blob/main/svelte-app/src/App.svelte"
click node_svelte_products "https://github.com/jinendra/my-static-web-app/blob/main/svelte-app/src/products/Products.svelte"
click node_svelte_state "https://github.com/jinendra/my-static-web-app/blob/main/svelte-app/src/store/store.js"
click node_svelte_ui "https://github.com/jinendra/my-static-web-app/blob/main/svelte-app/src/components/HeaderBar.svelte"
click node_svelte_swa "https://github.com/jinendra/my-static-web-app/blob/main/svelte-app/staticwebapp.config.json"
click node_vue_entry "https://github.com/jinendra/my-static-web-app/blob/main/vue-app/src/main.js"
click node_vue_router "https://github.com/jinendra/my-static-web-app/blob/main/vue-app/src/router.js"
click node_vue_products "https://github.com/jinendra/my-static-web-app/blob/main/vue-app/src/views/products/products.vue"
click node_vue_state "https://github.com/jinendra/my-static-web-app/blob/main/vue-app/src/store/modules/products.js"
click node_vue_ui "https://github.com/jinendra/my-static-web-app/blob/main/vue-app/src/components/header-bar.vue"
click node_vue_swa "https://github.com/jinendra/my-static-web-app/blob/main/vue-app/staticwebapp.config.json"

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_ng_entry,node_ng_router,node_ng_products,node_ng_state,node_ng_ui,node_ng_swa toneBlue
class node_react_entry,node_react_shell,node_react_products,node_react_state,node_react_ui,node_react_swa toneAmber
class node_svelte_entry,node_svelte_shell,node_svelte_products,node_svelte_state,node_svelte_ui,node_svelte_swa toneMint
class node_vue_entry,node_vue_router,node_vue_products,node_vue_state,node_vue_ui,node_vue_swa toneRose
class node_azure_swa,node_azure_functions toneNeutral
```

## Components

### Angular app

- [Angular bootstrap](https://github.com/jinendra/my-static-web-app/blob/main/angular-app/src/main.ts): entrypoint · Bootstraps the root module and app component. · `angular-app/src/main.ts`
- [Angular router](https://github.com/jinendra/my-static-web-app/blob/main/angular-app/src/app/router.ts): client routing · `angular-app/src/app/router.ts`
- [Angular products](https://github.com/jinendra/my-static-web-app/blob/main/angular-app/src/app/products/products.module.ts): product feature · Product module and list/detail composition. · `angular-app/src/app/products/products.module.ts`
- [Angular entity store](https://github.com/jinendra/my-static-web-app/blob/main/angular-app/src/app/store/store.module.ts): state and data · Entity state can swap the in-memory API boundary. · `angular-app/src/app/store/store.module.ts`
- [Angular shared UI](https://github.com/jinendra/my-static-web-app/blob/main/angular-app/src/app/core/components/header-bar.component.ts): presentation components · `angular-app/src/app/core/components/header-bar.component.ts`
- [Angular SWA config](https://github.com/jinendra/my-static-web-app/blob/main/angular-app/staticwebapp.config.json): deployment config · `angular-app/staticwebapp.config.json`

### React app

- [React render](https://github.com/jinendra/my-static-web-app/blob/main/react-app/src/index.js): entrypoint · Renders the application shell. · `react-app/src/index.js`
- [React app and routes](https://github.com/jinendra/my-static-web-app/blob/main/react-app/src/App.js): client shell · Composes pages and equivalent not-found UI. · `react-app/src/App.js`
- [React products](https://github.com/jinendra/my-static-web-app/blob/main/react-app/src/products/Products.js): product feature · `react-app/src/products/Products.js`
- [React async product state](https://github.com/jinendra/my-static-web-app/blob/main/react-app/src/store/product.saga.js): actions, reducer, saga, API · Saga mediates product loading through the API module. · `react-app/src/store/product.saga.js`
- [React shared UI](https://github.com/jinendra/my-static-web-app/blob/main/react-app/src/components/HeaderBar.js): presentation components · `react-app/src/components/HeaderBar.js`
- [React SWA config](https://github.com/jinendra/my-static-web-app/blob/main/react-app/staticwebapp.config.json): deployment config · `react-app/staticwebapp.config.json`

### Svelte app

- [Svelte mount](https://github.com/jinendra/my-static-web-app/blob/main/svelte-app/src/main.js): entrypoint · Mounts the root app. · `svelte-app/src/main.js`
- [Svelte app shell](https://github.com/jinendra/my-static-web-app/blob/main/svelte-app/src/App.svelte): client shell · Includes redirect and not-found route presentation. · `svelte-app/src/App.svelte`
- [Svelte products](https://github.com/jinendra/my-static-web-app/blob/main/svelte-app/src/products/Products.svelte): product feature · `svelte-app/src/products/Products.svelte`
- [Svelte product store](https://github.com/jinendra/my-static-web-app/blob/main/svelte-app/src/store/store.js): local state · `svelte-app/src/store/store.js`
- [Svelte shared UI](https://github.com/jinendra/my-static-web-app/blob/main/svelte-app/src/components/HeaderBar.svelte): presentation components · `svelte-app/src/components/HeaderBar.svelte`
- [Svelte SWA config](https://github.com/jinendra/my-static-web-app/blob/main/svelte-app/staticwebapp.config.json): deployment config · `svelte-app/staticwebapp.config.json`

### Vue app

- [Vue mount](https://github.com/jinendra/my-static-web-app/blob/main/vue-app/src/main.js): entrypoint · Mounts the root app. · `vue-app/src/main.js`
- [Vue router](https://github.com/jinendra/my-static-web-app/blob/main/vue-app/src/router.js): client routing · `vue-app/src/router.js`
- [Vue products](https://github.com/jinendra/my-static-web-app/blob/main/vue-app/src/views/products/products.vue): product feature · `vue-app/src/views/products/products.vue`
- [Vue product store](https://github.com/jinendra/my-static-web-app/blob/main/vue-app/src/store/modules/products.js): local state · `vue-app/src/store/modules/products.js`
- [Vue shared UI](https://github.com/jinendra/my-static-web-app/blob/main/vue-app/src/components/header-bar.vue): presentation components · `vue-app/src/components/header-bar.vue`
- [Vue SWA config](https://github.com/jinendra/my-static-web-app/blob/main/vue-app/staticwebapp.config.json): deployment config · `vue-app/staticwebapp.config.json`

### Other components

- **Azure Static Web Apps**: static hosting · Target hosting boundary for each independently built frontend.
- **External Azure Functions API**: optional serverless API · Referenced starter API is outside this repository.

## Connections

- Angular bootstrap → Angular router: initializes
- Angular router → Angular products: routes to
- Angular products → Angular entity store: reads products
- Angular bootstrap → Angular shared UI: renders shell
- Angular SWA config → Azure Static Web Apps: deploys static assets
- Angular entity store → External Azure Functions API: replaceable API target
- React render → React app and routes: renders
- React app and routes → React products: composes
- React products → React async product state: uses
- React app and routes → React shared UI: renders
- React SWA config → Azure Static Web Apps: deploys static assets
- React async product state → External Azure Functions API: API target
- Svelte mount → Svelte app shell: mounts
- Svelte app shell → Svelte products: composes
- Svelte products → Svelte product store: uses
- Svelte app shell → Svelte shared UI: renders
- Svelte SWA config → Azure Static Web Apps: deploys static assets
- Vue mount → Vue router: initializes
- Vue router → Vue products: routes to
- Vue products → Vue product store: uses
- Vue mount → Vue shared UI: renders shell
- Vue SWA config → Azure Static Web Apps: deploys static assets
