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!