7 Commits
Author SHA1 Message Date
CatoandClaude 45fd5e076a docs: archive 2025 plans that read as current (#1351)
Forty-five 2025 plans, assessments, design scenarios, status reports and
superseded business docs move to docs/archive/ (same relative path). Each
described a plan or a snapshot as if it were the running system: strict:false,
a five-table schema, an "organization" entity, price_sats, a Gemini /api/chat
widget, a /auth/forgot-password page, Google Places, building group labels and
contract voting flows that never landed.

Fixed in place: NAVIGATION_UX_DESIGN.md (referenced by .claude/rules) gains a
status note naming what shipped and where; GENERIC_API_HANDLERS.md lists the
handler options the code actually takes; datetime_standards.md points at
scripts/dev/; CONTRIBUTING.md describes the auto-merge shipping flow. Inbound
links repointed (SECURITY.md at the root, SUPABASE_SCHEMA_GUIDE.md for schema).


Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 14:25:12 +02:00
CatoandClaude Opus 5.5 24c3d140ae docs: archive point-in-time records, fix live docs against the tree (#1349)
* docs: archive point-in-time records, drop broken guide symlinks

Status reports, progress trackers, audits, session summaries, completed
migration plans and the 2025 roadmap move to docs/archive/ (same relative
path), with a README saying they describe the day they were written.
.ai-guides/ held only symlinks into a docs/guides/ai/ that no longer
exists, tests/unit/docs/ held a stray copy of an old getting-started page,
and docs/operations/PORT_MANAGEMENT_README.md duplicated port-management.md;
all three are deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD

* docs: correct drifted paths, links and versions in current docs

Fix in place the reference docs agents use: point paths at where the code
lives now (src/stores/auth.ts, src/lib/supabase/*, scripts/dev/*,
docs/reference/api/CONVENTIONS.md, the squashed baseline migration),
rewrite the development, features, operations and API index pages to list
documents that exist, say plainly where something is gone (/api/metrics,
the CSP report route, .envrc in the repo, Loki's `migrate` script), and
correct the Next.js major. docs-truth findings: 468 -> 2 (both "Next 30/90
Days" headings in the legal overview, a checker false positive).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 14:09:06 +02:00
CatoandClaude Opus 5.5 b774f06de7 docs: correct drift in agent instructions, README and ops docs (#1348)
* docs: correct drift in agent instructions, README and ops docs

- Auto-merge sweep lives in bitbaum/fleet, not bitbaum/dotfiles; cd.yml is
  dispatch-only (handed off by ci.yml post-main), not a workflow_run listener
- Design-system docs match globals.css / tailwind.config.ts: warm accent
  #ff5c00, bg-bitcoinOrange (no bitcoin-orange utility), tiffany/orange are
  legacy; display typography is shipped
- .claude rules: real paths (src/lib/validation/, entityCrudHandler.ts,
  standardResponse.ts, withZod/withRateLimit/withRequestId, services/actors),
  real Button/Alert APIs, real rate limits, search via @bitbaum/searchkit,
  real payment modules, PostgREST instead of the POSTGRES_URL tunnel,
  lint-staged pre-commit, eslint.config.mjs
- README/AGENTS/REVIEW: Next 16 / TS 6 / Tailwind 4, pnpm, messaging is not
  E2E-encrypted yet, beta not Live, CD deploys, migrations apply on deploy
- docs/: deploy process, CI/CD, migrations guide, moved docs/ paths, stale
  CLI-entity and edge-function docs flagged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD

* style(docs): prettier on the docs touched by the drift fix

lint-staged would have run this; the commit was made without hooks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 12:07:09 +02:00
c022bfdf46 docs: sync docs with actual stack (#890)
Truth-sweep of the living docs against repo ground truth (pnpm 11.25.0,
Node 24, Vitest, zod 4, TS 6, Next 16/React 19, self-hosted Supabase with
file-based migrations applied on deploy):

- npm/npx commands -> pnpm / pnpm exec / pnpm dlx; `run X -- --flag`
  loses the `--`; package-lock.json -> pnpm-lock.yaml
- jest -> Vitest (config names, vi.fn/vi.spyOn, reporter examples,
  debug commands, framework mentions)
- retired mcp_supabase_* examples -> current mechanisms: PostgREST
  reads, migrations as supabase/migrations/*.sql applied on deploy,
  box psql for DDL
- version claims: TypeScript 5.x -> 6.x, Node 20 -> 24, Next.js 15 ->
  16, React 18 -> 19; CI described as Node 24 + pnpm
- nonexistent scripts replaced with real ones (test:comprehensive:* ->
  test:*, diag:supabase -> scripts/diagnostics/*, db:migrate/test:
  migration -> deploy-applied migrations / migration-replay.yml)
- infrastructure.md deploy claim fixed: cd.yml deploys main after green
  CI (doc said pushes to main do NOT deploy)
- zod 4 API: z.record now takes key+value schemas


Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn

Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-09-04 17:02:55 +00:00
GandClaude Fable 5 ebb82d20ee fix(security): SSRF guard for webhooks + entity-registry SSOT + CI test gating (#447)
* fix(security): SSRF guard for webhook URLs; scrub committed Supabase PATs

- Webhook URLs are fetched server-side and the response body is readable
  by the endpoint owner, so internal targets (localhost, RFC1918,
  link-local/cloud metadata, CGNAT, reserved) are now rejected at mint
  time and re-checked before every delivery (src/lib/security/ssrfGuard.ts,
  30 unit tests). Dev keeps localhost receivers working.
- Delete scripts/db/apply-migration.sh (orphaned one-off carrying a
  hardcoded sbp_ token for the retired managed-cloud project) and redact
  the second dead token in docs/archive. Both tokens are dead — the
  managed Supabase Cloud project was retired 2026-06.
- Add .gitleaks.toml: the default ruleset has no Supabase PAT pattern
  (why these sat unflagged); new sbp_ rule with the two dead historical
  tokens allowlisted so the full-history CI scan stays green.
- Update SECURITY.md and API conventions doc (webhooks section was still
  marked "planned — not yet built"; now documents the shipped behavior
  including the URL policy).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TxtUEaJPtYviTwrr5Sf7Pn

* perf(timeline): batch feed enrichment; parallelize reply tree and nudges

- getEnrichedUserFeed did up to 3 single-row lookups PER EVENT (~60
  round-trips for a 20-item dashboard/timeline page) while the batched
  enrichEventsForDisplay (3 queries total, already used elsewhere) sat
  unused — switch to it and zip the social counters back in by index.
- getReplies awaited each reply subtree sequentially — now Promise.all,
  so thread latency no longer grows linearly with reply count.
- generateNudges queried each entity type serially on the force-dynamic
  /api/cat/nudges path — now parallel.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TxtUEaJPtYviTwrr5Sf7Pn

* fix(entities): registry is the one source for ownership columns; guard it in CI

- entityListHandler now derives the ownership column from the entity
  registry's userIdField instead of defaulting to 'user_id'; drop the
  redundant userIdField:'actor_id' literals from the 8 list routes.
- The profile-entities route kept its own copy of the ownership map,
  which had drifted (research: 'user_id') — consolidated onto
  getUserIdField().
- createResearch inserted without actor_id even though
  research_entities.actor_id is NOT NULL on the live schema — research
  creation could not succeed. Dual-write user_id + actor_id, same
  pattern as ai_assistants.
- New CI guard: entity-registry-live-schema.test.ts asserts every
  registry tableName / userIdField / priceColumn exists in
  scripts/db/live-schema.json (the live-DB snapshot the deploy pipeline
  refreshes).
- Mark src/types/database.ts as known-stale in its header: it disagrees
  with the live schema (missing actor_id on several tables, missing
  events/user_documents entirely) and gen:types writes a different file
  that nothing imports — do not treat it as schema ground truth.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TxtUEaJPtYviTwrr5Sf7Pn

* test(ci): gate every Jest suite; repair Jest-30-broken scripts; coverage floor

- test:unit only matched __tests__/unit, silently excluding 22 suites /
  ~280 tests under tests/unit (webhook signature crypto, idempotency
  keys, hasScope authorization) plus smoke/create/env — nothing gated
  them. The pattern now matches everything Jest discovers (94 suites,
  1095 tests, ~5s), so CI and the git hooks run the full fast suite.
- test:security / test:integration / test:performance / test:auth used
  the singular --testPathPattern flag that Jest 30 hard-rejects (and
  test:auth pointed at a directory that doesn't exist) — all four were
  broken; security:scan errored because of it. Repaired with plural
  flags, real patterns, and --passWithNoTests where the target set is
  currently empty.
- Add a coverage ratchet floor in jest.config.js just below measured
  coverage so it can only move up.
- Update developer docs that still showed the removed singular flag.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TxtUEaJPtYviTwrr5Sf7Pn

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-27 09:30:15 +02:00
Georgy ButaevandClaude Opus 4.8 ef740ba66b docs: correct stale Vercel deploy claims to self-hosted Hetzner reality
OrangeCat deploys self-hosted on Hetzner (bitbaum, behind Caddy); there
is no Vercel anymore. Brought present-tense docs/config in line:

- developer-guide.md: 'Deployment: Vercel' -> self-hosted; replaced the
  'git push -> Vercel' production block + Vercel env-var section
- scripts/health-check.js: setup hints no longer say 'vercel env pull';
  point at /opt/orangecat/app/.env on the box
- .env.example: dropped the dead VERCEL_* env block + 'vercel login' /
  'vercel env pull' instructions; replaced with self-host notes
- DEPLOYMENT_CHECKLIST.md: '6) Vercel Deployment' -> Self-Hosted (Hetzner)
- INTEGRATION_DEPLOY_CHECKLIST.md: customer (FleetCrown) is self-hosted
  too — 'set Vercel env vars / redeploy' -> edit .env + restart service
- removed dead vercel.json (no live reference; only past-tense comments)

Supabase references left untouched — self-hosted Supabase is the real,
current stack. Historical/archive docs (DECOMMISSION-CLOUD, archive/**)
preserved. LICENSE / legal / .mailmap real-name left for a separate
identity decision.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 20:10:11 +02:00
Your Name 5cd7495b78 feat: Complete entity relationship system - 11 APIs connecting profiles, organizations, campaigns, projects
- Added intelligent onboarding with AI analysis and personalized recommendations
- Implemented organization creation with founder membership and role-based access
- Built 11 production APIs for full entity relationships:
  * Profile endpoints: campaigns, projects, organizations
  * Organization endpoints: campaigns, projects, member management
  * Project endpoints: campaigns, add/remove campaigns
  * Campaign endpoints: stats and enhanced detail
- Enhanced UX with guest-first campaign creation flow
- Fixed sidebar naming consistency (Campaigns vs Fundraising)
- Improved onboarding with interactive category cards and clean animations
- Added comprehensive documentation and integration guides
- Implemented proper JSX structure and TypeScript fixes
2025-10-18 09:44:02 +02:00