How microsoft/frontend-bootcamp works
Project type and purpose
• This is a “monorepo” front-end workshop project: a collection of standalone React/TypeScript demos and exercises for a two-day bootcamp.
• It is *not* a single full-stack application but a multi-page, educational codebase. Each “stepX-YY” and “bonus-…” folder contains a mini-app (demo / exercise / final).
Top-level file-structure analysis
• package.json, tsconfig.json, webpack.config.js – define the build, bundling and TypeScript setup across all sub-folders.
• jest.config.js, jest.setup.js – unit-test configuration for “bonus-jest” and other testable modules.
• server/index.js + server/now.json – optional Node/Express (or Now/Vercel) server for production/static hosting.
• assets/ – shared CSS/JS used by the root index.html and step landing pages.
• azure-pipelines.yml & azure-pipelines.pr.yml – CI/CD in Azure Pipelines for build/test/deploy.
• step1-01 … step2-06 – sequential workshop modules. Each module has three variants (demo, lesson, exercise), typically containing HTML, a small React/TSX app, and CSS.
• bonus-servicecalls – a sample Redux + service-call demo.
• bonus-jest – a sample Jest testing exercise.
Key README insights
• “npm start” runs the inner-loop dev server (webpack-dev-server).
• “Demos” and “Exercises” are navigated via index.html at root; webpack watches all “step*/**/*.tsx/ts” and reloads on change.
• CI will lint, build, test (jest), and (via now.json) deploy to Vercel or static host.
A. Developer environment
– Node.js/NPM on local machine
– VS Code for editing
– Webpack Dev Server (localhost:3xxx)
B. Code Repository & CI/CD
– GitHub (origin)
– Azure Pipelines (build → test → deploy)
– Vercel/Now (static hosting via server/now.json)
C. Build & Bundling
– webpack.config.js + tsconfig.json
– Input: all “step*”, “bonus-*”, “markdownReadme”, “playground” sources
– Output: bundled JS/CSS per mini-app, served under distinct URLs or index.html routing
D. Front-end micro-apps
– Multi-page React+TSX apps under each step folder
– Shared assets (assets/*.css, *.js)
– Demo vs exercise vs final code variants
E. Testing
– Jest + ts-jest for unit tests (bonus-jest)
– jest.config.js roots tests in “bonus-jest” and possibly any .spec.ts(x) under step folders
F. Optional backend
– server/index.js – Express or Now server to serve static bundles or API mocks
– server/now.json – Vercel deployment configuration
Relationships & data-flow
1. Developer edits source → Webpack watches and rebuilds → Dev server serves updated bundles → Browser hot-reload
2. git push → Azure Pipelines triggers → Lint/Build/Unit-Tests → Artifact → Deploy to Vercel → Public URL serving static pages
3. In bonus-servicecalls, React components dispatch Redux actions → Service layer makes HTTP calls to an API endpoint (could be a mock or real backend) → Reducers update store → App UI re-renders
Architectural patterns & principles
• Monorepo with per-step micro-frontends: each lesson is self-contained.
• Component-based (React): each UI piece lives in its own folder under components/.
• State management examples escalate: plain React state → Context API → Redux store → Redux+service calls.
• TypeScript for type safety; tsconfig enables compile-time checking per folder.
• Centralized bundler (webpack) for all modules; shared config.
• CI-as-Code via azure-pipelines.yml and serverless deployment via now.json.
Technologies & frameworks
– Front-end: React, TypeScript, TSX, Redux (bonus), React Context
– Build tools: Webpack, Babel (via ts-loader or babel-loader), CSS loaders
– Testing: Jest + ts-jest
– CI/CD: Azure Pipelines
– Deployment: Now/Vercel (server/now.json)
– Editor: VS Code with recommended settings (.vscode folder)
Critical detail reminders
– Label every component clearly (e.g., “Webpack Dev Server”, “Azure Pipelines”)
– Include names of key config files (webpack.config.js, jest.config.js, now.json) near their respective tools