You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(share): public notes API with metadata for portfolio consumption (#166)
## Summary
- **Extended `sharedNotes` schema** with `tags`, `backlinks`,
`wordCount`, and `notebookName` columns (all `NOT NULL DEFAULT` —
backward-compatible)
- **Added `GET /share/public/:userId`** list endpoint with pagination
(`?limit=20&offset=0`) and permissive CORS for cross-origin portfolio
consumption
- **Enriched `GET /share/:slug`** detail endpoint to return metadata
(tags, backlinks, wordCount, notebookName)
- **Updated `POST /share`** to accept and persist metadata fields (Zod
defaults keep old clients working)
- **Desktop app** now sends full note metadata (tags, wordCount,
notebookName, backlinks) when sharing
- **Hand-corrected migration** (`0005`) uses safe `ALTER TABLE ADD
COLUMN` instead of Drizzle's auto-generated `CREATE TABLE`
## Test plan
- [x] `pnpm typecheck` passes (17/17 tasks)
- [x] `pnpm test` passes (42/42 tests across 7 test files)
- [ ] Manual: share a note from desktop → verify API receives
tags/wordCount/notebookName
- [ ] Manual: `curl
"https://api.readied.app/share/public/<userId>?limit=5"` returns
paginated notes with metadata
- [ ] Manual: `curl "https://api.readied.app/share/<slug>"` returns
enriched response with tags/backlinks
- [ ] Manual: fetch from different origin (portfolio domain) succeeds
for `/share/public/*` (CORS)
- [ ] Run `pnpm db:migrate` on staging to verify migration applies
cleanly
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added ability to share notes with enhanced metadata including tags,
word count, and notebook context.
* Introduced public notes listing endpoint with pagination support.
* **Documentation**
* Updated documentation component infrastructure for improved content
rendering.
* **Style**
* Refined color and gradient utilities across the web interface for
improved visual consistency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments