# From the dora-tma project root npx ng serve --configuration production --port 4201 # App: http://localhost:4201
firebase emulators:start # Emulator UI: http://localhost:4000 # Firestore: http://localhost:8080 # Auth: http://localhost:9099
npm run build:prod # Output: dist/dora-tma/browser/
# Full deploy (hosting + Firestore rules + Functions) NODE_TLS_REJECT_UNAUTHORIZED=0 firebase deploy # Hosting only NODE_TLS_REJECT_UNAUTHORIZED=0 firebase deploy --only hosting # Functions only NODE_TLS_REJECT_UNAUTHORIZED=0 firebase deploy --only functions
cd functions && npm install && npm run build # Compiled output: functions/lib/
gcloud run services update FUNCTION_NAME \ --update-env-vars ANTHROPIC_API_KEY=sk-ant-... \ --region us-central1 # Do NOT set this in firebase.json secrets[] β causes deploy-time 403s
NODE_TLS_REJECT_UNAUTHORIZED=0 firebase login --reauth
| Script | What it does |
|---|---|
| npm run build:prod | Production Angular build with optimization |
| npm run build | Development build (no optimization) |
| npm test | Run Karma/Jasmine unit tests |
| npm run lint | ESLint check across the project |
| npm install | Install dependencies β use this in CI, not npm ci |
| Route | Guard | Description |
|---|---|---|
| /auth/signin | noAuthGuard | Sign-in page |
| /auth/signup | noAuthGuard | Registration page |
| /auth/reset | noAuthGuard | Password reset |
| /invite/:token | noAuthGuard | Org invite link β auto-joins org on sign-up |
| /dashboard | authGuard | Role-aware dashboard (member or admin view) |
| /assessment/new | authGuard | Start a new assessment |
| /assessment/:id/capabilities | authGuard | Capability scoring wizard |
| /assessment/:id/summary | authGuard | Radar chart + composite score |
| /assessment/:id/results | authGuard | Per-capability AI assessments + recommendations |
| /history | authGuard | Past assessments list |
| /compare | adminGuard | Team comparison view |
| /org/insights | adminGuard | Org-level AI insights |
| Variable | Where set | Description |
|---|---|---|
| ANTHROPIC_API_KEY | Cloud Run (gcloud) | Anthropic API key for Claude Sonnet calls in Cloud Functions |
| WIF_PROVIDER | GitHub Actions secret | Workload Identity Federation provider resource name |
| ANTHROPIC_API_KEY | GitHub Actions secret | Separate key for AI release notes generation in CI |
firebase commands must be prefixed with the SSL bypass env var.firebaseextensions.instances.list is not included in any standard IAM role. Downgrading to v13.15.2 is the only fix.Timestamp objects, not JS Dates. Angular's | date pipe throws NG02100 on a raw Timestamp. Add a toDate() helper to the component and call it in the template.auth.currentUser is null immediately after a page load before the auth state is restored. Pattern: check authService.currentUserProfile first, then fall back to getUserProfile(auth.currentUser.uid) inside an authStateReady() callback.npm ci hard-fails on these; npm install is resilient. Also: lock files generated on Node 25 locally are missing Node 20 optional deps, causing npm ci to fail with "lock file out of sync".secrets: ["ANTHROPIC_API_KEY"] in firebase.json causes deploy-time 403 permission errors. Instead, set the key directly on the Cloud Run service using gcloud run services update --update-env-vars.firebase@10 is in package.json, you get a runtime error: "Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?" Fix: upgrade to firebase@11.| Setting | Value |
|---|---|
| Project ID | dora-tma |
| App site | https://dial-assessment.web.app |
| Docs site | https://dial-docs.web.app |
| Auth | Email/password |
| Functions runtime | Node.js 20 |
| Service account | firebase-adminsdk-fbsvc@dora-tma.iam.gserviceaccount.com |