A full-stack note-taking application with automatic version control. Built with FastAPI (Python) for the backend and Streamlit for the frontend, this app allows users to create, view, and search notes β each update creating a new version.
- Backend: FastAPI + SQLite
- Frontend: Streamlit (React under the hood)
- Search Autocomplete: Custom Trie-based prefix matching
- Data Persistence: SQLite (auto-generated on startup)
- π Create notes with title, content, and tags
- π Each update creates a new version automatically
- π Smart title-based search using Trie data structure
- ποΈ View note content and all versions
- π Create notes via a separate tab
- π View full notes in a new browser tab
- πΎ Simple local database (SQLite)
versioned-notes-api/
βββ main.py # FastAPI app entry
βββ crud.py # DB access logic
βββ models.py # Pydantic schemas
βββ database.py # SQLite setup
βββ routers/
β βββ notes.py # API routes
βββ trie.py # TitleTrie class
βββ streamlit_frontend.py # Main UI (search/view)
βββ new_note_form.py # Create new note page
βββ view_note.py # Full-screen note viewer
βββ requirements.txt
βββ README.md
git clone https://github.com/your-username/versioned-notes-api.git
cd versioned-notes-apipip install -r requirements.txtThis includes
fastapi,uvicorn,pydantic,streamlit, andrequests.
uvicorn main:app --reloadRuns on: http://localhost:8000
Open 3 terminals and run:
streamlit run streamlit_frontend.pystreamlit run new_note_form.py --server.port 8502streamlit run view_note.py --server.port 8503Then visit:
- localhost:8501 β Search/view notes
- localhost:8502 β Create new notes
- localhost:8503 β View notes in full window
A custom TitleTrie is used to support fast title-based prefix matching and metadata retrieval. It auto-loads from the DB on startup.
GET /search-title?q=proj
β returns matches: [{ title, version, timestamp }]- βοΈ Editable notes (update latest version)
- π Diff between versions
- ποΈ Export notes as
.txtor.pdf - π Add user authentication
- βοΈ Deploy via Render, Railway or HuggingFace Spaces
MIT License Β© 2025 Paul Gaikwad
Built to never lose track of your thoughts β one version at a time.