What it is
Plain is a minimal note-taking web app with real-time collaboration and natural-language search. Users write notes in a rich-text editor, edit them together with other people, and search them by meaning instead of exact words. I built it alone at the Devfolio Tryouts hackathon.
The problem
The hackathon brief asked for a minimal, collaborative note-taking app with search enhanced by RAG (retrieval-augmented generation). In RAG search, the app converts notes and queries into vectors (embeddings) and retrieves the notes closest in meaning to the query. The brief combines three pieces: an editor, multi-user editing, and semantic search. Plain puts all three in one small app. Its interface takes cues from Google Keep, Apple Notes, Notion, Google Docs, and SimpleNote.
How it works
Plain is a SvelteKit full-stack app with these parts:
- Editor. Tiptap, a rich-text editor framework, handles note editing.
- Collaboration and history. Several users can edit a note at once, with merge handling for concurrent edits. Each note keeps version snapshots that a user can roll back to.
- Data. PostgreSQL stores the data through the Prisma ORM. The pgvector extension stores note embeddings.
- Search. Transformers.js generates embeddings in the app with the
all-MiniLM-L6-v2model. The AI SDK connects the app to language models. - Authentication. Better Auth handles sign-in.
- Hosting. Vercel deploys the app on each push to
main.
Design decisions
Embeddings generated locally. Transformers.js runs a small embedding model inside the app, so search does not need a hosted embedding API. An OpenAI key is optional and applies only to the language-model features. The trade-off, as an inference, is that a small local model gives coarser matches than a large hosted one.
Vectors in the main database. Notes and embeddings share one PostgreSQL database through pgvector. The alternative is a dedicated vector store. A single database avoids keeping two stores in sync, which is a reasonable fit for a 12-hour build (an inference, not a stated reason).
Reference
| Layer | Choice | Use |
|---|---|---|
| Framework | SvelteKit, Svelte 5 | App and routes |
| UI | Tailwind CSS, shadcn-svelte, bits-ui | Styling and components |
| Editor | Tiptap | Rich-text editing |
| Database | PostgreSQL, Prisma, pgvector | Notes, versions, embeddings |
| Search | Transformers.js, AI SDK | Embeddings and language-model calls |
| Auth | Better Auth | Sign-in |
| Hosting | Vercel | Deployment |
Outcome
I built Plain alone in 12 hours at the Devfolio Tryouts hackathon on 8 November 2025, at Devfolio's headquarters in Bangalore. The hackathon entry records the result as "selected".
The repository and the hosted demo are no longer reachable, so this page links neither.