[integrations] Add open-brain-rest Edge Function#129
[integrations] Add open-brain-rest Edge Function#129alanshurafa wants to merge 2 commits intoNateBJones-Projects:mainfrom
Conversation
REST API gateway providing 12+ endpoints for the Open Brain thoughts database. Required backend for the Next.js dashboard (issue NateBJones-Projects#124). Includes: - Deno/Hono Edge Function with search, capture, browse, CRUD, stats, reflections, duplicates, and ingest endpoints - 5 SQL migrations: schema extensions with serial_id surrogate key (supports both UUID and BIGSERIAL base schemas), reflections table, ingestion tables, 8 RPCs, and full-text search index - Utility modules for embedding, classification, and sensitivity detection - README with step badges, credential tracker, and troubleshooting Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds the Deno/Hono REST API handler (index.ts) and shared utility modules for embedding, classification, and sensitivity detection. Files placed under function/ (not supabase/) to avoid the root .gitignore rule that excludes supabase/ directories. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Code reviewFound 4 issues:
SQL sets OB1/integrations/open-brain-rest/sql/04-rpcs.sql Lines 67 to 69 in 903eec3 TypeScript checks OB1/integrations/open-brain-rest/function/index.ts Lines 327 to 329 in 903eec3 Same mismatch exists for
SQL return type (no OB1/integrations/open-brain-rest/sql/04-rpcs.sql Lines 251 to 262 in 903eec3 TypeScript reads missing fields: OB1/integrations/open-brain-rest/function/index.ts Lines 642 to 650 in 903eec3
OB1/integrations/open-brain-rest/sql/01-schema-extensions.sql Lines 56 to 58 in 903eec3
OB1/integrations/open-brain-rest/sql/04-rpcs.sql Lines 333 to 335 in 903eec3 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
|
@claude review this PR |
1 similar comment
|
@claude review this PR |
|
Claude finished @matthallett1's task in 2m 25s —— View job PR Review:
|
|
Closing this PR as part of the OB1 Alpha Milestone consolidation. This feature is being rebuilt as one of 12 clean, gate-compliant PRs that together form the alpha upgrade path. The consolidated PRs will be submitted once verified on the fork. See the full plan for details. |
|
Closing as part of the OB1 Alpha Milestone consolidation. This feature is being rebuilt as one of 12 clean, gate-compliant PRs that together form the alpha upgrade path. The consolidated PRs will be submitted once verified on the fork. |
Contribution Type
/recipes)/schemas)/dashboards)/integrations)What does this do?
Adds the
open-brain-restEdge Function — a REST API gateway that provides 12 required endpoints for the Next.js dashboard plus 4 optional ingest endpoints. This resolves issue #124, which reported that the dashboard's backend dependency was missing from the repo.Includes 5 SQL migration files, the Deno/Hono Edge Function source, and utility modules for embedding generation, metadata classification, and sensitivity detection.
The integration introduces a
serial_id BIGINTsurrogate key on thethoughtstable to support both UUID-based installs (from the getting-started guide) and BIGSERIAL-based installs (k8s variant) — the dashboard's numeric ID expectations work with either schema.Requirements
Checklist
README.mdwith prerequisites, step-by-step instructions, and expected outcomemetadata.jsonhas all required fieldsCloses #124 (together with the companion dashboard update PR)