# 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/
# Never deploy from a laptop. Merge a pull request instead: git checkout -b fix/short-description git commit -m "fix: ..." git ship # The merge to main runs deploy-and-release.yml, which tests and deploys
cd functions && npm install && npm run build # Compiled output: functions/lib/
gh secret set ANTHROPIC_API_KEY # The next deploy writes it into functions/.env, which the functions load # Do NOT use gcloud run services update or firebase.json secrets
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 | GitHub Actions secret | Anthropic API key. The deploy job writes it into functions/.env for the Cloud Functions, and the release-notes job uses it too |
| WIF_PROVIDER | GitHub Actions secret | Workload Identity Federation provider resource name |
NODE_TLS_REJECT_UNAUTHORIZED. It turns off certificate checks while the Firebase CLI sends the deploy token. CI deploys without it.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, and a key set with gcloud run services update --update-env-vars is lost on the next deploy. The deploy job writes the GitHub secret into functions/.env, which each deployed revision keeps.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 |