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-api
pip install -r requirements.txt
This includes
fastapi
,uvicorn
,pydantic
,streamlit
, andrequests
.
uvicorn main:app --reload
Runs on: http://localhost:8000
Open 3 terminals and run:
streamlit run streamlit_frontend.py
streamlit run new_note_form.py --server.port 8502
streamlit run view_note.py --server.port 8503
Then 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
.txt
or.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.