You know that feeling when you've written a perfect regex, or a clean auth middleware, and then two weeks later you're digging through 6 old projects trying to find it?
That's what SnipVault solves.
It's a personal code snippet manager β you save snippets with tags and a language label, and later you just search and copy. That's it. No cloud, no account, runs locally.
git clone https://github.com/ashish7802/SnipVault.git
cd SnipVault
# Backend
cd backend
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000
# Frontend (new terminal)
cd frontend
npm install && npm run devFrontend runs on http://localhost:5173, API on http://localhost:8000, and Swagger docs at /docs.
- Save snippets with a title, language, tags, and optional description
- Search by title or tag instantly
- Syntax highlighted code blocks with one-click copy
- Delete with a confirmation prompt
- Fully local β SQLite, no external services
Gists are public by default and have no tag-based search. Notes apps don't do syntax highlighting. SnipVault is just a focused tool for one specific problem β storing and finding code you already wrote.
Backend is FastAPI + SQLAlchemy on SQLite. Frontend is React 18 with Vite and TailwindCSS. Syntax highlighting via react-syntax-highlighter.
SnipVault/
βββ backend/
β βββ app/
β βββ main.py β routes + CORS
β βββ models.py β DB models
β βββ schemas.py β Pydantic schemas
β βββ crud.py β DB operations
β βββ database.py β SQLite setup
β
βββ frontend/
βββ src/
βββ App.jsx
βββ components/
β βββ SnippetForm.jsx
β βββ SnippetCard.jsx
β βββ SearchBar.jsx
βββ services/
βββ api.js
| Method | Endpoint | Description |
|---|---|---|
| POST | /snippets |
Create a snippet |
| GET | /snippets |
Get all snippets |
| GET | /snippets?search=xyz |
Search snippets |
| DELETE | /snippets/{id} |
Delete a snippet |
- Edit snippets inline
- JWT auth
- Export to GitHub Gist
- Browser extension
PRs are welcome. If you add something useful, open a PR and I'll review it.
Built by Ashish Yadav β drop a β if it was useful