How jinendra/my-static-web-app works
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: App.js React app and routes · App.svelte Svelte app shell · main.ts Angular bootstrap · main.js Vue mount
Components 26
Angular app
- Angular bootstrap · Bootstraps the root module and app component.
angular-app/src/main.ts - Angular router
angular-app/src/app/router.ts - Angular products · Product module and list/detail composition.
angular-app/src/app/products/products.module.ts - Angular entity store · Entity state can swap the in-memory API boundary.
angular-app/src/app/store/store.module.ts - Angular shared UI
angular-app/src/app/core/components/header-bar.component.ts - Angular SWA config
angular-app/staticwebapp.config.json
React app
- React render · Renders the application shell.
react-app/src/index.js - React app and routes · Composes pages and equivalent not-found UI.
react-app/src/App.js - React products
react-app/src/products/Products.js - React async product state · Saga mediates product loading through the API module.
react-app/src/store/product.saga.js - React shared UI
react-app/src/components/HeaderBar.js - React SWA config
react-app/staticwebapp.config.json
Svelte app
- Svelte mount · Mounts the root app.
svelte-app/src/main.js - Svelte app shell · Includes redirect and not-found route presentation.
svelte-app/src/App.svelte - Svelte products
svelte-app/src/products/Products.svelte - Svelte product store
svelte-app/src/store/store.js - Svelte shared UI
svelte-app/src/components/HeaderBar.svelte - Svelte SWA config
svelte-app/staticwebapp.config.json
Vue app
- Vue mount · Mounts the root app.
vue-app/src/main.js - Vue router
vue-app/src/router.js - Vue products
vue-app/src/views/products/products.vue - Vue product store
vue-app/src/store/modules/products.js - Vue shared UI
vue-app/src/components/header-bar.vue - Vue SWA config
vue-app/staticwebapp.config.json
Other components
- Azure Static Web Apps · Target hosting boundary for each independently built frontend.
- External Azure Functions API · Referenced starter API is outside this repository.
Connections 22
- 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