Files
2026-10-30 16:35:46 +02:00

70 lines
1.6 KiB
Markdown

# Contributing to DB Monitor
Thank you for your interest in contributing to DB Monitor!
## Development Setup
### Prerequisites
- Go 1.21+
- Docker & Docker Compose
- A PostgreSQL instance for testing
### Local Development
```bash
# Clone
git clone https://github.com/mahmoud/db-monitor.git
cd db-monitor
# Set up environment
cp .env.example .env
# Edit .env with your test PostgreSQL connection
# Run locally
go run .
# Or with Docker
docker compose up --build
```
### Project Structure
```
├── main.go # Entry point
├── config/ # Configuration
├── collector/ # PostgreSQL metrics collection
├── storage/ # SQLite time-series storage
├── api/ # REST API handlers
├── alert/ # Alert engine
└── web/ # Web dashboard (HTML/CSS/JS)
```
## How to Contribute
1. Fork the repository
2. Create a feature branch: `git checkout -b feature/my-feature`
3. Make your changes
4. Test with `docker compose up --build`
5. Commit: `git commit -m "feat: add my feature"`
6. Push: `git push origin feature/my-feature`
7. Open a Pull Request
## Code Style
- Follow standard Go conventions (`gofmt`, `golint`)
- Keep functions focused and well-documented
- Web UI changes should maintain the existing design language
## Ideas for Contributions
- MySQL / Redis / MongoDB collectors
- Additional alerting channels (Slack, Discord, webhook)
- Authentication / multi-user support
- Custom dashboard layouts
- Data export (CSV, JSON)
## License
By contributing, you agree that your contributions will be licensed under the MIT License.