{
  "markdown": "# Arkova MVP\n\nDocument anchoring system with cryptographic fingerprinting and on-chain verification.\n\n## Local Source Of Truth\n\nThe canonical local Arkova checkout is:\n\n```bash\n/Volumes/Extreme/Arkova/arkova-mvpcopy-main\n```\n\nUse that path for day-to-day work on `main`. Desktop copies, archived folders, backup drives, and PR worktrees are not the source of truth. See [docs/ops/local-source-of-truth.md](docs/ops/local-source-of-truth.md) before moving, deleting, or backing up local Arkova files.\n\n---\n\n## Running Arkova MVP Locally\n\nThis guide provides step-by-step instructions for setting up and running the Arkova MVP on your local development machine.\n\n### Prerequisites\n\nBefore starting, ensure you have the following installed:\n\n| Requirement | Version | Verify Command |\n|-------------|---------|----------------|\n| Node.js | 20.x or higher | `node --version` |\n| npm | 10.x or higher | `npm --version` |\n| Docker | Latest | `docker --version` |\n| Supabase CLI | Latest | `supabase --version` |\n| Git | Latest | `git --version` |\n\n**Install Supabase CLI (if not installed):**\n\n```bash\nnpm install -g supabase\n```\n\n---\n\n### Step 1: Clone the Repository\n\n```bash\ngit clone <repository-url>\ncd <project-directory>\n```\n\n---\n\n### Step 2: Set Up Environment Files\n\n**⚠️ WARNING: Never commit `.env` files with real credentials.**\n\n#### Frontend Environment\n\n```bash\ncp .env.example .env\n```\n\nEdit `.env` and configure:\n\n```bash\n# Supabase (Vite requires VITE_ prefix for client-side variables)\nVITE_SUPABASE_URL=http://127.0.0.1:54321\nVITE_SUPABASE_ANON_KEY=<your-anon-key-from-supabase-start>\n\nNODE_ENV=development\n```\n\n#### Worker Service Environment\n\n```bash\ncp services/worker/.env.example services/worker/.env\n```\n\nEdit `services/worker/.env` and configure:\n\n```bash\nWORKER_PORT=3001\nNODE_ENV=development\nLOG_LEVEL=info\n\nSUPABASE_URL=http://127.0.0.1:54321\nSUPABASE_SERVICE_ROLE_KEY=<your-service-role-key-from-supabase-start>\n\n# For local development, use mocks\nUSE_MOCKS=true\n```\n\n---\n\n### Step 3: Install Dependencies\n\n#### Frontend Dependencies\n\n```bash\nnpm install\n```\n\n#### Worker Dependencies\n\n```bash\ncd services/worker\nnpm install\ncd ../..\n```\n\n---\n\n### Step 4: Start Supabase\n\n```bash\nsupabase start\n```\n\nThis command will:\n- Start PostgreSQL on port 54322\n- Start the API on port 54321\n- Start Studio (admin UI) on port 54323\n\n**⚠️ IMPORTANT: Copy the output keys!**\n\nThe command outputs `anon key` and `service_role key`. You need these for your `.env` files.\n\nExample output:\n```\nAPI URL: http://127.0.0.1:54321\nanon key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\nservice_role key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\n```\n\n---\n\n### Step 5: Reset Database\n\nThis runs all migrations and seeds demo data:\n\n```bash\nsupabase db reset\n```\n\n**⚠️ WARNING: This command drops all data. Only run on local development databases.**\n\n---\n\n### Step 6: Regenerate TypeScript Types\n\nAfter any database changes, regenerate types:\n\n```bash\nnpm run gen:types\n```\n\nThis updates `src/types/database.types.ts` with the current schema.\n\n---\n\n### Step 7: Run Tests\n\n#### All Tests\n\n```bash\nnpm test\n```\n\n#### RLS Integration Tests\n\n```bash\nnpm run test:rls\n```\n\n**⚠️ NOTE: RLS tests require Supabase to be running.**\n\n#### Type Checking\n\n```bash\nnpm run typecheck\n```\n\n#### Linting\n\n```bash\nnpm run lint\n```\n\n#### UI Copy Lint (Terminology Check)\n\n```bash\nnpm run lint:copy\n```\n\n---\n\n### Step 8: Start the Frontend\n\n```bash\nnpm run dev\n```\n\nThe frontend will be available at: `http://localhost:5173`\n\n---\n\n### Step 9: Start the Worker Service\n\nIn a new terminal:\n\n```bash\ncd services/worker\nnpm run dev\n```\n\nThe worker will be available at: `http://localhost:3001`\n\nHealth check endpoint: `http://localhost:3001/health`\n\n---\n\n### Sanity Checklist\n\nAfter setup, verify the following:\n\n- [ ] `supabase status` shows all services running\n- [ ] `http://127.0.0.1:54323` (Studio) is accessible\n- [ ] `npm test` passes\n- [ ] `npm run test:rls` passes\n- [ ] `npm run lint` passes\n- [ ] `npm run lint:copy` passes\n- [ ] Frontend loads at `http://localhost:5173`\n- [ ] Worker health check returns `{\"status\":\"healthy\"}`\n\n---\n\n### Demo Users\n\nThe seed data includes these test users:\n\n| Email | Password | Role | Organization |\n|-------|----------|------|--------------|\n| admin@umich-demo.arkova.io | Demo1234! | ORG_ADMIN | University of Michigan Registrar |\n| registrar@umich-demo.arkova.io | Demo1234! | ORG_MEMBER | University of Michigan Registrar |\n| admin@midwest-medical.arkova.io | Demo1234! | ORG_ADMIN | Midwest Medical Board |\n| individual@demo.arkova.io | Demo1234! | INDIVIDUAL | None |\n\n---\n\n### Common Mistakes\n\n| Problem | Solution |\n|---------|----------|\n| Supabase won't start | Ensure Docker is running: `docker ps` |\n| RLS tests fail | Run `supabase db reset` to apply latest migrations |\n| Types out of sync | Run `npm run gen:types` after schema changes |\n| Port already in use | Kill existing processes: `lsof -i :54321` |\n| Copy lint fails | Check for forbidden terms (wallet, hash, block, transaction, crypto) |\n| Worker won't start | Ensure `.env` is configured in `services/worker/` |\n\n---\n\n### Where Governance Rules Live\n\n| Document | Location |\n|----------|----------|\n| Document Index | `docs/confluence/00_index.md` |\n| Development Guidelines | `CLAUDE.md` |\n| Architecture Overview | `docs/confluence/01_architecture_overview.md` |\n| Data Model | `docs/confluence/02_data_model.md` |\n| Security & RLS | `docs/confluence/03_security_rls.md` |\n| Audit Events | `docs/confluence/04_audit_events.md` |\n| Retention Policy | `docs/confluence/05_retention_legal_hold.md` |\n| On-Chain Policy | `docs/confluence/06_on_chain_policy.md` |\n| Seed Data Guide | `docs/confluence/07_seed_clickthrough.md` |\n| Payments | `docs/confluence/08_payments_entitlements.md` |\n| Webhooks | `docs/confluence/09_webhooks.md` |\n| Worker Service | `docs/confluence/10_anchoring_worker.md` |\n| Proof Packages | `docs/confluence/11_proof_packages.md` |\n| Identity & Access | `docs/confluence/12_identity_access.md` |\n| Feature Flags | `docs/confluence/13_switchboard.md` |\n| KMS Operations | `docs/confluence/14_kms_operations.md` |\n| Operational Runbook | `docs/confluence/15_operational_runbook.md` |\n| Zero Trust Architecture | `docs/confluence/15_zero_trust_edge_architecture.md` |\n| Incident Response | `docs/confluence/16_incident_response.md` |\n| Data Classification | `docs/confluence/17_data_classification.md` |\n\n---\n\n### Required End-of-Task Checks\n\nBefore completing any development task:\n\n```bash\n# 1. Run all tests\nnpm test\n\n# 2. Run RLS tests\nnpm run test:rls\n\n# 3. Type check\nnpm run typecheck\n\n# 4. Lint code\nnpm run lint\n\n# 5. Check UI terminology\nnpm run lint:copy\n\n# 6. Regenerate types if schema changed\nnpm run gen:types\n\n# 7. Verify types are committed\ngit diff src/types/database.types.ts\n```\n\n**⚠️ IMPORTANT: All checks must pass before merging any code.**\n\n---\n\n### Stopping Services\n\n```bash\n# Stop Supabase\nsupabase stop\n\n# Stop frontend\n# Press Ctrl+C in the terminal running npm run dev\n\n# Stop worker\n# Press Ctrl+C in the terminal running the worker\n```\n\n---\n\n### Full Reset\n\nTo completely reset your local environment:\n\n```bash\nsupabase stop\nsupabase start\nsupabase db reset\nnpm run gen:types\n```\n",
  "bytes": 7227,
  "sha": "ad8d3228bbb7b767f23841f2f80c03fc72371469d480d8106b37c07c07a4f43c",
  "repo_slug": "carson-see/arkovacarson",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_carson_see_arkova_verification_a905c6c5/readme"
}