The Atlas
MikeAzureDev's documentation, bound to its code
Journeys
First hour with the fork
What this fork is, the rules that keep it shippable, and how to get it running — the orientation every newcomer needs before editing anything.
5 stops →A request through the backend
Follow an authenticated browser request from the auth middleware, through the access checks, to the data layer — and see why @supabase/supabase-js is still the data client.
5 stops →The Entra ID rewrite
From the provider-abstraction design to the token validator and the install flow that configures it — and where the shipped code deliberately diverges from the plan.
5 stops →From Bicep to a running deployment
The infrastructure model end to end — network, compute, secrets — then the runbook that turns it into a live environment and the migration job that seeds the schema.
6 stops →Keeping the fork publishable
The discipline that lets a private Azure fork ship AGPL source without leaking deployment IP: the three-repo, three-tier model, the upstream PRs, and the leakage gates.
5 stops →Getting Started
The front door to MikeOSS.Azure — an AGPL fork of the upstream Mike legal-AI app re-platformed to run entirely inside a customer's Azure tenant. README picks your deployment path; AGENTS.md is the load-bearing rulebook every human or agent must read before touching code; the agent-handoff log is the "where we left off" state.
- Agent Guidance Before touching backend/frontend code, env files, storage, or auth — non-negotiable.
- Agent handoff — 2026-05-05 Resuming the migration work and needing the prior branch state and next-issue order.
- Contributing Before opening your first PR.
- MikeOSS.Azure Your very first stop — pick how you want to run or deploy Mike.
Architecture Decisions
The "why" behind the migration. The AzureMove proposal is the originating research and decision record; the Postgres ADR series (001–004) settles the database move off Supabase onto Azure Postgres Flexible Server, all traffic routed through self-hosted PostgREST. The prescriptive ADRs predate some of the shipped code — drift between them is real and shown on /drift.
- 001 — Database platform and SKU Provisioning or sizing the database, or weighing HA/cost tradeoffs.
- 002 — PostgREST and access pattern Touching the data-access layer or the frontend↔backend boundary.
- 003 — Schema migrations Adding a schema change or wiring the deploy/migrate pipeline.
- 004 — EntraID hand-off Picking up the auth work after infra and DB are provisioned — this is the backlog.
- Azure Migration Research Proposal You want the rationale and decision history behind the whole migration.
- Postgres migration decisions First stop in the Postgres folder — the decided-vs-deferred map.
Auth & Identity
The Entra ID rewrite: a provider-abstraction seam (supabase | local | entra) that emits a normalized principal, JWKS token validation, tenant/group guardrails, and the backend-owned provider-selection flow. The design docs are aspirational in places; what actually shipped is narrower (e.g. PostgREST JWT validation was removed in entra mode rather than switched to JWKS).
- Auth Provider Selection Flow Working on the login flow or adding an auth provider.
- Entra ID Implementation Deep Dive Planning the auth rewrite or wanting the 'why' behind the provider seam.
- Entra ID PR-Ready Task Breakdown Picking up an auth task and wanting acceptance criteria per workstream.
- Entra ID token lifecycle
- Word Add-in — Entra Sign-in Setup
Data & Storage
Where bytes live. The R2→Azure Blob migration behind an unchanged four-method storage interface (MI auth, backend download proxy, no SAS to clients); the email decision (ACS when a feature needs it, resend removed); and the upstream-sync log that records every schema decision across migrations 0000–0015.
- 001 — Blob storage platform Implementing or reviewing storage, or changing the storage backend.
- 001 — Email service Implementing the first email feature — the build-now checklist and provider choice.
- Email decisions Before building any email/notification feature.
- Storage decisions First stop in the storage folder — the R2→Azure decision frame.
- Upstream sync log Running an upstream sync, or wondering why a migration looks the way it does.
Infrastructure & Deploy
How the stack is provisioned. A single VNet with private-only Postgres, three workloads on one Container Apps Environment, Key Vault + Managed Identity for secrets, and one parameterized Bicep template that serves both managed CI and customer self-host. Observability was provisioned, then removed from the template and pushed to the hardening backlog.
- 001 — Network topology Provisioning connectivity or debugging DB reachability / egress.
- 002 — Compute platform Provisioning compute or reasoning about cold-start / scaling cost.
- 003 — Secrets and identity Adding a secret or wiring identity / Key Vault access.
- 004 — Bicep and manual provisioning Provisioning the stack via Bicep or CLI, or reproducing the environment.
- 005 — Container images Managing images/registry, upgrading PostgREST, or restoring observability.
- Infrastructure decisions First stop in the infra folder — the whole-system picture.
Install & Marketplace
Getting Mike into customers' hands: the ~10-minute no-Bicep self-host walkthrough, the Azure Marketplace Managed Application package and its pre-flight harness, the operator-side /install configurator and its PowerShell scripts, and the QA leakage gates that keep deploy IP out of the public fork.
- `/install` operator scripts Running or auditing the /install flow, or recovering a locked-out install.
- Chat inspector CLI
- Deploying Mike to Azure — minimal self-host Standing Mike up fast as a self-hoster or small team — the main deploy guide.
- Marketplace re-publish — ARM-TTK pre-flight & cert-policy hardening Republishing the Marketplace offer or building release tooling.
- Mike AI — Azure Marketplace package Building or editing the marketplace package, or reasoning about customer image pulls.
- scripts/install Touching the install configurator's script-serving path.
- scripts/qa — pre-publication checks Before every migration to the public fork and every marketplace submission.
- Updating the Marketplace Listing Publishing a marketplace release — the operational checklist.
Runbooks
Operational replay and safety. The dev-deployment runbook reproduces rg-mike-dev step by step; the local-stack and entra-local-auth runbooks stand up the inner loop; safe-local-testing draws the test-data boundary; and the production-hardening audit lists every Critical/High gap before customer data.
- Azure production-hardening backlog Before any customer-facing deploy or Marketplace submission.
- Dev environment deployment runbook Reproducing or auditing the dev environment.
- Local development stack — step by step Standing up the fastest no-Azure inner loop.
- Runbook: Local Microsoft Entra ID Authentication Setting up local Microsoft auth — read the corrections block first.
- Safe Local Testing Before any testing that touches documents or live services.
Fork & Publication Strategy
The discipline that keeps this fork publishable: a three-repo topology (private source-of-truth, public AGPL fork, private deploy repo), a three-tier file policy (A=upstream PRs, B=app code, C=deploy IP), the local-first "refactor-before-remove" rule, and the fork-delta ledger that makes upstream rebases tractable.
- Agent runbook — executing the migration Actually executing a publication run.
- Configuration extraction and sanitization Immediately before any Tier B push — the leak-prevention gate.
- Fork delta — files diverged from upstream Rebasing onto an upstream release or auditing the divergence surface.
- Internal-only agent rules — tier classification and AGPL publication Introducing new code in the private fork — read before opening a PR.
- Local-First, Upstream-Compatible Migration Strategy Making a divergence decision or setting up local dev — the 'why' behind the adapters.
- Migration analysis — splitting this fork for AGPL publication Starting any migration or publication work — the orientation map.
- Per-file classification Deciding where a file ships, or adding a new file.
- Session summary — 2026-05-08 → 2026-05-10 Reconstructing publication history or the origin of the leakage doctrine.
- Tier A — upstream PR plan Extracting clean upstream PRs.
- Tier B — public AGPL fork publication plan (Repo 2) Producing the public-fork publication.
- Tier C — private deploy repo publication plan (Repo 3) Publishing the private deploy repo, or reasoning about the deploy/app split.
- Tier C — proprietary retention (rationale) Questioning a Tier C assignment or the marketplace-IP boundary.
Roadmap & Specs (PRDs)
The OSS-2..5 PRDs: targeted divergence-paydown and feature work surfaced by upstream syncs — restoring sharer display names, post-sync cleanups, an admin GDPR-erasure endpoint, and reconciling upstream's TablePrimitive UI with the static-export constraint. Each pairs a design spec with a story ticket.
- Feature: sharer display-name resolution (Entra) Implementing OSS-2 — the full analysis and both options.
- Harden sharer display-name resolution (Entra-native, no Graph) Triage, or wanting OSS-2's acceptance criteria.
- OSS-3 — Odds and ends from the upstream-sync merge Picking up post-sync cleanup — check the status flags first.
- OSS-4 — Admin-initiated erasure of an Entra user's app data (GDPR) Triage, or wanting OSS-4's acceptance criteria and dependencies.
- OSS-5 — Design: reconciling the table-primitive UI with static export Tackling the table-primitive rewrite — a focused branch outside a sync batch.
- OSS-5 — Port upstream's table-primitive / project-page UI into the static-export idiom Roadmap planning — the one-time effort to stop the recurring rejection.
- OSS-6 — Adopt upstream's restructured frontend and workflow engine
- OSS-6 — Design: adopt upstream's restructured frontend and workflow engine
- OSS-6 — progress (handoff)
- Spec: Admin-initiated erasure of an Entra user's app data Implementing OSS-4 — the table-by-table erasure guarantee and reuse map.
Migration Issues
The 49 numbered Azure-migration issue specs — the granular execution record from Bicep foundations through auth, frontend, CI/CD, and the forensic marketplace-install gap registries (036/040). Indexed for full-text search; the README is the authoritative status index.
- 001-bicep-infra-foundation
- 002-acr-and-postgrest-mirror
- 003-postgres-provisioning
- 004-schema-migration-tooling
- 005-storage-provisioning-and-blob-adapter
- 006-cae-postgrest-backend-deployment
- 006.1-storage-provider-interface
- 006.2-auth-provider-interface
- 007-cicd-pipeline
- 008-backend-auth-provider-abstraction
- 009-backend-entra-jwt-validation
- 010-tenant-group-enforcement
- 011-user-bootstrap-and-profile-endpoints
- 012-frontend-userprofile-refactor
- 013-frontend-msal-auth-provider
- 014-postgrest-jwt-switch-to-jwks
- 015-managed-identity-db-auth
- 036 — Marketplace install gaps surfaced during 2026-05-12 install
- 036a — Marketplace install: plan + alternatives
- 037 — Decouple migrate-job DB connection from `AUTH_PROVIDER`
- 038 — `/install` first-visit bootstrap without a token paste
- 039 — Provision Entra app registrations at Bicep deploy time
- 040 — `/install` configurator UX gripes (live capture)
- 041 — Download click crash-loops the backend (missing download-signing-secret)
- Azure / Entra ID migration — issue index
- Issue 007 — CI/CD pipeline implementation plan
- Issue 008.0 — local auth provider + full-stack local dev
- Issue 015 — Managed Identity DB auth implementation plan
- Issue 016 — Azure Marketplace Listing + Full Deployment Automation
- Issue 017 — Local-First Auth Boundary
- Issue 018 — Frontend API Token Boundary
- Issue 019 — Frontend Hosted Dependency Isolation
- Issue 020 — Azure Blob Storage First, R2 Fallback Isolated
- Issue 021 — Backend PostgREST Client Boundary
- Issue 022 — Frontend deployment to Azure
- Issue 023 — Install configurator (`/install` + downloadable scripts)
- Issue 024 — PostgREST Caddy Sidecar for Local-Prod Parity
- Issue 025 — Lock Down or Remove the PostgREST Diagnostics Page
- Issue 026 — Surface Silent Frontend Fallbacks in Chat Flow
- Issue 027 — MSAL Silent Token Refresh on the Frontend
- Issue 028 — Move Backend API to `/api/*` Prefix
- Issue 029 — Reconcile Bicep with the live Container App state
- Issue 030 — Custom domain for the backend Container App
- Issue 030 — Runtime Config Endpoint (kill `NEXT_PUBLIC_ENTRA_*`)
- Issue 031 — Comprehensive logging (server + client)
- Issue 031 — Supabase Placeholder Removal
- Issue 032 — Retire `frontend/.env.production`
- Issue 033 — `deploy.ps1` `NEXT_PUBLIC_API_BASE_URL` build-arg
- Issue 034 — Execute Tier A upstream PRs
- Issue 035 — First Tier B + Tier C publication windows
Logs & Sessions
Working memory: dated session logs capturing what shipped and what broke, the Atlas's own doc-build changelog, and the .claude/ agent tooling (slash commands and skills) that drives day-to-day work in this repo.
- better-sqlite3 Rebuild
- Deep Modules
- Doc-build log Auditing how this Atlas was built, or before running an --update pass.
- Good and Bad Tests
- Implement Plan
- Implementation Plan
- Improve Codebase Architecture
- Interface Design for Testability
- Mike Azure Credential Boundary
- Mike marketplace release pilot
- Mike test maintenance
- Mike upgrade walkthrough generator
- PRD to Issues
- Pre-Merge Review
- Refactor Candidates
- Reference
- Research Codebase
- Session 2026-05-07 / 2026-05-08 — V1 gap analysis + slice 9 ship Assessing V1 readiness or debugging the install/Graph flows.
- Set Git Identity: Allen Morgan
- Set Git Identity: David Cresswell
- Set Git Identity: Dominika Morgan
- Show Git Identity Options
- SKILL
- SKILL
- Test Surface Review
- Test-Driven Development
- Test-suite gotchas — institutional memory
- Updating from upstream (dev-side entry point)
- When to Mock