尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Personal code snippet manager with AI search and descriptions, plus an MCP server so you can save and find snippets from Claude Code. Next.js, Prisma, Supabase Postgres, Claude API.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗A code snippet manager you can search by describing what the code does. Claude Code and Cursor can search it too.
snippr.dev. The demo there needs no account and deletes itself after 24 hours.
Snippr is a portfolio project, so the reasoning is part of what's on show. Every significant choice has a decision record saying what else was considered and what it costs, and the architecture doc describes how it all fits together today.
Accounts hold 50 snippets, and the demo holds 10.
"Wait for the user to stop typing before firing a request" doesn't share a word with "Debounce: runs a function only after calls have paused for a given delay." Claude gets the query and a numbered list of every snippet's title, language, tags, and description, and answers with the numbers that match. Results come from the whole library, and the heading says so.
Make a token on the Connect page, paste one line into your client, and ask it for "my debounce snippet" from any project. The server has three tools:
| Tool | Does |
|---|---|
search_snippets | AI search over your whole library |
get_snippet | One snippet by id |
save_snippet | Saves a new snippet, with the same limits as the app |
Tokens are stored as hashes and shown once. Each tool calls the same function as the matching API endpoint, so the ownership checks, the snippet cap, and the AI rate limit apply without a second copy of them.
Both themes are the same components on different values. Components only use tokens named by role (bg-surface, text-fg-muted), and the 8-bit theme is one block of CSS that overrides them, with its own fonts and syntax colors. The choice is kept in a cookie, so the server sends the right theme with the first byte and nothing flashes.
flowchart LR
Browser["Browser"]
Client["MCP client<br/>Claude Code, Cursor"]
subgraph Vercel["One Next.js app on Vercel"]
Pages["Pages<br/>rendered on the server"]
API["Route Handlers<br/>/api/snippets, /api/folders, ..."]
MCP["MCP server<br/>/api/mcp"]
Lib["src/lib<br/>ownership, validation, caps, rate limits"]
end
DB[("Postgres<br/>Supabase")]
Claude["Claude Haiku 5.5"]
Browser --> Pages
Browser -- "session cookie" --> API
Client -- "Bearer token" --> MCP
API --> Lib
MCP --> Lib
Pages -- "Prisma" --> DB
Lib -- "Prisma" --> DB
Lib --> Claude
The parts most worth reading, each with the decision record behind it:
401 without one), checks ownership of every record it touches by id (403), and puts userId in the where clause of every read and write. The rules live in src/lib, tested against an in-memory store with two users, and the database side is tested against a real Postgres, so a query that forgets userId fails (0018, 0020).502 when it fails. Features take that call as an argument, so their tests use a fake Claude. Each user gets 30 calls an hour per feature, counted in Postgres (0023, 0011).The screenshots above are taken by a script against the real app, so they can be retaken whenever the interface changes (0032).
You need Node.js 20.12 or newer, Docker Desktop, a GitHub OAuth app, and an Anthropic API key. Google sign-in is optional.
git clone https://github.com/RyanDanielWalker/snippr.git
cd snippr
npm install
cp .env.example .env # then fill it in
npm run db:up # Postgres in Docker
npm run db:migrate # create the tables
npm run dev # http://localhost:3000
The development guide explains each environment variable, the test suites, and how changes ship.
MIT. The fonts in assets/fonts keep their own licenses, the SIL Open Font License, in the files beside them.
next build, and Vercel holds each deploy until CI passes: lint, types, unit tests, migrations on an empty Postgres, the database tests, and the end-to-end tests (0016, 0020).