Your personal code library. Save, organize, search, and share code snippets — built for developers who are tired of losing useful code.
🔗 Live demo: https://codevault-production-86f2.up.railway.app
- Snippet management — Create, edit, delete snippets with syntax highlighting for 25+ languages
- Full-text search — Search across title, tags, and code content instantly
- Public & private snippets — Share what's useful, keep the rest private
- Explore page — Browse public snippets from all developers
- Stars & forks — Star snippets you like, fork ones you want to modify
- Public profiles — Every user gets a profile at
/u/username - REST API — Full API at
/api/v1/snippetswith Bearer token auth - Embeddable widgets — Embed any public snippet on any website via iframe
- GitHub Gist import — Import snippets directly from a Gist URL
- JSON export — Export your entire vault as a JSON file
- Rate limiting — 100 API requests per hour per key
| Layer | Technology |
|---|---|
| Backend | PHP 8.2 (no frameworks) |
| Database | Supabase (PostgreSQL) |
| Frontend | Vanilla HTML, CSS, JavaScript |
| Syntax highlighting | Prism.js |
| Deployment | Railway + Docker |
Requirements: PHP 8.2+ with pdo_pgsql, Apache2 with mod_rewrite, Supabase account
1. Clone the repo
git clone https://github.com/IManss-ai/codevault.git
cd codevault2. Set up environment
cp .env.example .env3. Fill in .env
DB_HOST=your-supabase-host
DB_PORT=5432
DB_NAME=postgres
DB_USER=postgres.your-project-id
DB_PASS=your-password
BASE_URL=/codevault
4. Place the project in your Apache web root, enable AllowOverride All, and visit http://localhost/codevault
- Fork this repo
- Create a new project on Railway → Deploy from GitHub
- Add these environment variables:
DB_HOSTDB_PORTDB_NAMEDB_USERDB_PASSBASE_URL - Set
BASE_URLto your Railway domain (e.g.https://yourapp.up.railway.app) - Railway builds and deploys automatically via Dockerfile
Base URL: /api/v1/snippets — Authenticate with Authorization: Bearer YOUR_API_KEY
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/snippets |
List your snippets |
| GET | /api/v1/snippets/:id |
Get a snippet |
| POST | /api/v1/snippets |
Create a snippet |
| PUT | /api/v1/snippets/:id |
Update a snippet |
| DELETE | /api/v1/snippets/:id |
Delete a snippet |
Full docs at /docs on the live site.
MIT
