How jinendra/my-first-static-web-app works
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 Angular CLI config · app.module.ts Application module · main.ts Angular bootstrap · swa-cli.config.json SWA CLI config
Components 18
Browser Application
Angular source and browser runtime.
- HTML shell
src/index.html - Angular bootstrap
src/main.ts - Browser polyfills
src/polyfills.ts - Global styles
src/styles.css - Application module · Assembles framework and application dependencies.
src/app/app.module.ts - Root component · Current primary visible UI entry point.
src/app/app.component.ts
Build & Deployment
CLI build and Azure Static Web Apps delivery.
- Angular CLI config · Defines development, test, and production behavior.
angular.json - App TypeScript config
tsconfig.app.json - Development environment
src/environments/environment.ts - Production environment · Typically substituted during production builds.
src/environments/environment.prod.ts - Static site assets · Browser application delivered without a server runtime.
- SWA CLI config
swa-cli.config.json - Static Web Apps config
staticwebapp.config.json - Azure Static Web Apps
Validation
Separate unit and browser-level test entry points.
- Unit test bootstrap
src/test.ts - Karma config
karma.conf.js - End-to-end tests
- Protractor config
e2e/protractor.conf.js
Connections 18
- 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