A full-stack developer issue tracker with MongoDB backend. Store bugs, errors, and solutions with powerful search, filtering, and organization features.
Ever fixed a bug and forgotten the solution six months later? BugVault is your personal knowledge base for every error and fix you encounter. Now with MongoDB for persistence, search, and scalability.
- Input Sanitization: All inputs sanitized with DOMPurify to prevent XSS
- Rate Limiting: Protection against DoS attacks (100 req/15min per IP)
- Security Headers: Helmet.js for CSP, X-Frame-Options, and more
- CORS Protection: Configurable allowed origins
- Zero Vulnerabilities: All dependencies audited and up-to-date
See SECURITY.md for security policy and AUDIT.md for the full security audit.
- 📝 Quick Capture — Log issues with error messages, context, and solutions
- 🔍 Full-Text Search — Instant MongoDB text search with highlighted results
- 🏷️ Smart Filtering — Filter by project, tags, or date range
- 📦 RESTful API — Clean API for all CRUD operations
- 🎨 Dark Theme — Easy on the eyes during late-night debugging
- 📌 Pin Issues — Keep important bugs at the top
- 📋 Bulk Operations — Select and manage multiple issues at once
- 🔖 Advanced Filtering — Complex queries with pagination and sorting
- 💾 MongoDB Storage — Persistent, scalable database
- 📥 Import/Export — Full JSON backup for portability
- 🐳 Docker Ready — One command to run the entire stack
- 🔄 Seed Data — Import sample bugs to get started
Write solutions with basic markdown:
- bold, italic,
inline code - Code blocks for snippets
- Clickable links
# Clone the repository
git clone https://github.com/tahseen137/bugvault.git
cd bugvault
# Start the entire stack (MongoDB + App)
docker-compose up
# Optional: Seed with sample data
docker-compose exec app npm run seedVisit http://localhost:3000 🎉
Prerequisites: Node.js 18+ and MongoDB 7+
# Clone the repository
git clone https://github.com/tahseen137/bugvault.git
cd bugvault
# Install dependencies
npm install
# Create .env file
cp .env.example .env
# Start MongoDB (if not running)
# macOS: brew services start mongodb-community
# Linux: sudo systemctl start mongod
# Windows: net start MongoDB
# Seed the database (optional)
npm run seed
# Start the server
npm startVisit http://localhost:3000 🎉
GET /api/bugs— List all bugs (with filters, search, pagination)GET /api/bugs/:id— Get single bugPOST /api/bugs— Create new bugPUT /api/bugs/:id— Update bugDELETE /api/bugs/:id— Delete bugPOST /api/bugs/bulk-delete— Bulk delete bugs
GET /api/bugs/meta/projects— List unique projectsGET /api/bugs/meta/tags— List unique tags
POST /api/bugs/import— Import bugs from JSONGET /api/bugs/export/all— Export all bugs as JSON
GET /api/health— Health check endpoint
?search=error # Full-text search
?project=my-app # Filter by project
?tags=react,api # Filter by tags
?dateFrom=2025-01-01 # Filter by created date
?dateTo=2025-12-31 # Filter by created date
?sort=newest # Sort: newest, oldest, title
?limit=50 # Pagination limit
?offset=0 # Pagination offset
- Click + New Issue
- Fill in details:
- Title — Brief description (required)
- Error Message — Stack trace or error output
- Solution — How you fixed it (supports markdown)
- Project — Group related issues
- Tags — Keywords like
react,api,auth - Context — Additional notes or links
- Click Save Issue
- Click Select button
- Check issues to select
- Choose action: Delete, Change Project, or Add Tags
- Export: Click Export to download all bugs as JSON
- Import: Click Import and select a JSON file (merges with existing data)
The project includes sample-bugs.json with 25 realistic developer issues:
# Using Docker
docker-compose exec app npm run seed
# Local development
npm run seed- Node.js + Express — RESTful API server
- MongoDB + Mongoose — Database and ODM
- express-validator — Input validation
- Vanilla JavaScript — No frameworks, just clean code
- Modern CSS — CSS Grid, Flexbox, custom properties
- Fetch API — RESTful API communication
- Docker + docker-compose — Containerization
- Health checks — Built-in monitoring
bugvault/
├── models/ # Mongoose schemas
│ └── Bug.js
├── routes/ # Express routes
│ └── bugs.js
├── public/ # Frontend files
│ ├── index.html
│ ├── css/
│ │ └── styles.css
│ └── js/
│ └── app.js
├── server.js # Express server
├── seed.js # Database seeding script
├── package.json
├── Dockerfile
├── docker-compose.yml
├── .env.example
├── sample-bugs.json # Sample data
├── legacy-index.html # Original localStorage version
└── README.md
- mongo — MongoDB 7 database (port 27017)
- app — BugVault application (port 3000)
mongo_data— Persistent MongoDB storage
# Start services
docker-compose up
# Start in background
docker-compose up -d
# View logs
docker-compose logs -f app
# Stop services
docker-compose down
# Clean everything (removes volumes)
docker-compose down -v
# Rebuild containers
docker-compose buildCreate a .env file (see .env.example):
MONGO_URI=mongodb://mongo:27017/bugvault
PORT=3000
NODE_ENV=development# Install dependencies
npm install
# Start with auto-reload
npm run dev
# Seed database
npm run seed# Health check
curl http://localhost:3000/api/health
# Create bug
curl -X POST http://localhost:3000/api/bugs \
-H "Content-Type: application/json" \
-d '{
"title": "Test Bug",
"error": "Error message here",
"project": "test-project",
"tags": ["test"]
}'
# List bugs
curl http://localhost:3000/api/bugs?limit=10{
title: String (required),
error: String,
context: String,
solution: String,
project: String,
tags: [String],
pinned: Boolean,
createdAt: Date (auto),
updatedAt: Date (auto)
}- Full-text search on
title,error,solution - Index on
projectfor fast filtering - Index on
tagsfor tag queries - Compound index on
pinned+createdAtfor sorting
Found a bug? (Ironic, right?) Open an issue or submit a pull request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - see LICENSE file for details.
The original single-file version is preserved as legacy-index.html. To migrate your data:
- Export data from the old version (click Export)
- Start the new MongoDB version
- Click Import and select your JSON file
- All your bugs will be imported! 🎉
# Set production environment
export NODE_ENV=production
# Update MONGO_URI in .env to your production MongoDB
# Start services
docker-compose up -d- Connect your GitHub repository
- Set environment variables:
MONGO_URI— Your MongoDB connection string (e.g., MongoDB Atlas)PORT— 3000 (or platform default)NODE_ENV— production
- Deploy!
Built with ☕ by developers, for developers. Keep track of your bugs before they track you down.
Version 2.0 — Now with MongoDB, RESTful API, and Docker support!
Star this repo if you find it useful!