# Module: fe-website (`b2g_website/`)
Purpose: public marketing website (Angular ^21.2, standalone, Tailwind) — Kong's `/` catch-all route. Owner: Sanjay.
Entry points: `src/main.ts`, `src/app/app.config.ts`, `src/app/app.routes.ts` (routes `home`, `b2gnetworkform`, `sustainabilitysolution`, `oman-green-cluster`, `contactus`, `terms-dialog`, lazy `auth`; `**` → `''` → `home`). Feature folders under `src/app/features/` (about, auth, b2gnetworkform, contactus, home, omangreencluster, services, sustainabilitysolution, terms-dialog).
Build: `npx ng build --configuration=docker` (Docker/CI; output `dist/b2g-frontend/browser`). Other configs: `production` (outputHashing none), `uat`, `development` (which swaps in `environment.demo.ts`). `ng serve`, `ng test` (Karma). No lint script.
Talks to (via `environment.docker.ts`, root-relative): `usermgmt` `/usermg/web`; `contactEndpoints.*` → `/micro/web/master/master/...` (contact query lists, country list/codes, captcha config). External: PostHog, GTM (`gtmEnabled: false` in docker), `translateApi` (office LAN host, not containerized).
Invariants:
- `const KONG = ''` in `src/environments/environment.docker.ts` — never `http://localhost:8000` (CI bundle guard in `ci/pipeline.py` fails the build).
- Keep the `docker` configuration in `angular.json` with `baseHref: "/"`; never pass an absolute `--base-href`.
- Resolve `package.json` + `package-lock.json` together; `npm ci --legacy-peer-deps` is required (`ngx-numeric-captcha` peer range stops at Angular 20).
- `gtmId`/`gtmEnabled` must exist in every environment file — `gtm.service.ts` reads both and the build fails TS2339 without them.
- Keep the `/healthz` and `/assets/env.js` no-store locations in `docker/nginx-spa.conf`.
Gotchas:
- As the `/` catch-all, any mistyped platform URL (wrong prefix, missing Kong route) lands here and redirects to `/home` instead of 404ing — check the request path before debugging this app.
- The project in `angular.json` is named `b2g-frontend` (same as the portal), hence `dist/b2g-frontend/browser`; don't confuse the two.
- No `assets/env.js` and no `spa-entrypoint.sh` in this image (unlike fe-b2g/fe-gmarket).
- `.dockerignore` is a copy of b2g_filems_fe's (its comments mention filems); harmless but misleading.
- Local compose (port 4203) bind-mounts host-built `dist/` — rebuild on the host after changes.
Prod debugging: CloudWatch `/ecs/b2g-prod/fe-website` (demo: `/ecs/b2g-demo/fe-website`); health on :80 (`/healthz`); ECS service `fe-website`, task family `b2g-fe-website` / `b2g-demo-fe-website`; browser devtools network tab for 4xx/CORS. Runbooks: `docs/runbooks/`.
