Loading...
Loading...
Monorepo, CI/CD golden path, preview environments, codegen, and internal SDKs for platform engineers.
Module 17 · Frontend Platform & Developer Experience
Monorepo vs polyrepo, CI/CD golden path, preview environments, codegen, lint gates, dependency policy, and internal SDK patterns for platform engineers.
Build the golden path for 30+ teams: monorepo topology, CI/CD pipelines, preview environments, API codegen, lint gates, dependency policy, and internal SDKs that wrap auth, flags, and analytics.
Frontend platform engineering is how staff-level engineers scale developer velocity across dozens of teams — not by reviewing every PR, but by building the golden path everyone ships through.
This module covers repository topology (monorepo, polyrepo, MFE), CI/CD pipelines with affected-only builds, preview environments per PR, OpenAPI/GraphQL codegen, lint gates, dependency policy, and internal SDK patterns.
You will learn to design self-service platforms with guardrails: bundle size gates, Lighthouse CI, merge queues, and adoption metrics that prove platform ROI.
Staff track module — complete Senior Track (Modules 1–15) and Staff Frontend System Design (Module 16) first.
Staff and principal interviews increasingly test platform thinking — how you scale developer velocity without becoming an approval bottleneck. Golden path CI, preview envs, and internal SDKs are the patterns that separate senior feature work from staff platform strategy.
The golden path that 50 teams ship through without friction.
A frontend platform is the internal product that product teams build on — app shell, design system, CI/CD, codegen, and SDKs. Staff engineers design platforms that maximize developer velocity while enforcing quality guardrails.
Repository topology drives CI cost, dependency sharing, and team autonomy.
| Model | Best for | Trade-off |
|---|---|---|
| Monorepo | Shared code, atomic refactors, one CI graph | Scale requires Turborepo/Nx; large clone |
| Polyrepo | Hard team boundaries, independent versioning | Duplication; cross-repo changes painful |
| MFE + polyrepo | Independent deploy per product surface | Runtime integration complexity |
| Monorepo + MFE | Shared DS/tooling + deployable remotes | Highest platform investment |
Staff decision
Every team follows the same pipeline — lint, test, build, deploy.
# Golden path template (conceptual) on: pull_request jobs: validate: - pnpm lint && pnpm typecheck - pnpm test --filter=...[origin/main] - pnpm build --filter=...[origin/main] preview: - deploy-preview --pr=$PR_NUMBER
Every PR gets a URL — the highest-ROI platform feature.
| Concern | Pattern |
|---|---|
| Cost | Cap concurrent previews; TTL 7 days |
| Secrets | Non-prod keys only; never prod DB |
| MFE previews | Shell loads remote from preview URL via manifest override |
Generated types eliminate client-server drift.
// Generated hook pattern import { useGetUser } from "@corp/api-client"; function Profile({ id }: { id: string }) { const { data, error, isLoading } = useGetUser(id); // Types match OpenAPI schema — drift fails CI }
Automated enforcement beats documentation.
| Gate | Tool | Blocks merge when |
|---|---|---|
| Lint + format | ESLint, Prettier | Style violations or a11y rules fail |
| Types | tsc --noEmit | Type errors anywhere in affected packages |
| Bundle size | size-limit / custom | Main chunk exceeds budget |
| Lighthouse CI | lhci | LCP/CLS regression vs baseline |
| A11y | eslint-plugin-jsx-a11y, axe in CI | Critical violations |
Gradual adoption
Control supply chain risk without blocking innovation.
Wrap cross-cutting concerns once — auth, analytics, feature flags.
Product teams import @corp/auth-sdk instead of reimplementing token refresh, analytics, or flag clients.
| SDK | Encapsulates | Versioning |
|---|---|---|
| @corp/auth-sdk | SSO, refresh, session | Semver; shell pins minimum |
| @corp/analytics | Consent-gated events, PII redaction | Major = event schema change |
| @corp/flags | LaunchDarkly wrapper, local overrides | Patch-safe defaults |
| @corp/ui | Design system components | See Design Systems module |
Platform design points staff interviewers score.
Frontend platform and developer experience interview questions.
Test your understanding — 5 questions
Product teams complain the platform team is a bottleneck: every new route needs a platform PR approval. What is the correct structural fix?