Inspiration
Library catalog cards were a brilliant idea: one card per item, each one describing it, filed so anyone could find it again. Today we can search for almost anything, but finding information isn't the same as keeping it. What I read online gets buried in bookmarks and tabs, and soon loses its connection to where it came from.
I wanted a personal library built on that old idea: save the sources worth keeping, describe each one properly, and be able to find it again. AI can help with the slow part, describing each source, as long as the person stays in charge of what gets saved.
What it does
CardVault turns saved sources into structured knowledge cards.
- Capture a source. Paste text, or give the address of a public web page. CardVault keeps the original exactly as it was saved, with its source link and details.
- Catalog it. Each card gets a catalog entry: a title, a short description, facts, subject headings, keywords and related concepts. Write it yourself, or ask Muse (Meta's AI model) to draft it. Muse runs only when you ask, and its suggestions arrive as a draft marked as AI-generated. You edit, then save or discard. Nothing changes until you decide.
- Make it yours. Add private notes, file cards into collections, and label them with tags.
- Rediscover it. Search your vault by keyword, follow related concepts from one card to another, and check your home page for daily recommendations from the Community Catalog. Each one says why it was picked: "Based on your interest in Cybersecurity", or "Shares 'Typography' with a card in your vault".
- Share if you choose. Cards are private by default. Publishing goes through a confirmation that lists what becomes public. Other members, and guests without an account, can read published cards, and members can save their own copy, with the original author's name kept on it.
Every card keeps three layers apart: the original source, your notes, and the catalog entry, so nothing silently overwrites anything else.
How I built it
I built CardVault solo with Kiro, using it as a development partner from the first spec to the final polish.
- Steering files. Three always-on guides (product, tech and structure) set the vision and the rules: Express is the only public API, every database query is scoped to the signed-in user, and "AI assists, the user decides".
- Spec-driven development. Seven feature specs (authentication, card management, catalog management, AI cataloging, URL ingestion, discovery and semantic search), each with requirements, a design and a task list. 111 tasks are done, each one tracked against its spec.
- Agent hooks. On every save, Kiro type-checks the Express API and the Nuxt frontend, and syntax-checks the FastAPI service.
- Agentic implementation and review. Kiro wrote and refactored code across all three services, designed the database migrations, researched the Meta Model API documentation, debugged deployment problems on Railway, and ran read-only audits before the demo.
The architecture has three services:
- Nuxt 4 + Vue 3.5 + TypeScript for the frontend.
- Express 5 + TypeScript + Zod + PostgreSQL for the API. It owns authentication, every database query, publishing and recommendations.
- FastAPI + Python, an internal-only AI service that calls Muse through the Meta Model API and checks its output before returning it.
Everything is deployed on Railway. Recommendations deliberately use no AI call: they're ranked from the catalog metadata cards already have, so loading Home costs nothing and every pick can be explained.
Challenges I ran into
- An AI provider that said "model not found". Meta's API answered
404 model_not_foundfor every model when the response schema contained nested objects. Flattening the schema fixed it, and I added a fallback model for that error. - Reasoning tokens eating the answer. Muse's hidden reasoning counts against the output budget, so some requests ran out before writing anything. Raising the budget and checking for truncated answers first fixed it.
- Websites that block automated readers. Some sites answer with Cloudflare challenges, especially to datacenter addresses. CardVault now explains these refusals and offers "Paste the text instead". For MediaWiki sites such as Bulbapedia and Fandom, it reads the article through the site's own official API instead. It never disguises itself as a browser.
- Fetching web pages safely. Reading any URL a user gives is a classic server-side request forgery risk. The fetcher checks that every resolved address is public, and enforces timeouts, size limits and a redirect limit.
- Cookies across Railway subdomains. The frontend and API live on different
*.up.railway.appsites, so a same-site proxy keeps the HttpOnly auth cookies working. Refresh tokens rotate safely. - Useful recommendations without embeddings. Early versions matched broad headings like "Science" to everything, and read "art" as matching "Martial arts". Weighting headings by how specific they are, linking cards through related concepts, and matching interests regardless of word order fixed that.
- Making the copy honest. Reviews caught interface text promising things the app didn't do, such as search by meaning and automatic AI. I rewrote it to match the real behaviour.
Accomplishments that I am proud of
- A clear product model: source, catalog entry, private library, optional publishing.
- AI that helps without taking over. Muse drafts, the user decides, and failures never change a card.
- Privacy built into the data layer: public responses use a fixed list of public fields, every query is scoped to its user, and notes, collections and tags are never shared.
- Recommendations that always explain themselves, with room for discovery beyond your usual topics.
- A Community Catalog of 100+ cards from real sources such as NASA, NIST, the Stanford Encyclopedia of Philosophy and MIT OpenCourseWare.
- 372 Express tests (including integration tests against an isolated PostgreSQL database) and 74 FastAPI tests.
- Rate limits on login, registration and public browsing.
What I learned
- Specs and steering keep an AI partner on course. Written requirements and rules made Kiro's work consistent across many sessions, and made it easy to check what was really done.
- Verify before you claim. Several "done" features turned out to have gaps once checked against the real code. Evidence-based reviews became part of the workflow.
- AI output needs guardrails. Checking that Muse's facts and related concepts actually appear in the source, and rejecting copied text, matters as much as the prompt.
- Simple, explainable ranking goes a long way. Metadata-based recommendations, with a reason for every pick, were good enough for an MVP and easy to debug.
What's next for CardVault
- Semantic search and related cards, using embeddings stored in PostgreSQL with pgvector.
- Recommendation feedback, such as "show me fewer like this".
- Choosing which Muse suggestions to keep, instead of saving the whole draft at once.
- More ways to capture, while keeping the original source preserved.
Built With
- argon2
- express.js
- fastapi
- javascript
- jest
- jwt
- kiro
- meta-model-api
- muse
- node.js
- nuxt
- postgresql
- pydantic
- pytest
- python
- railway
- typescript
- vue.js
- zod