Thank you for your interest in contributing to Vesper! This document provides guidelines and instructions for contributing to the project.
- Code of Conduct
- Getting Started
- Development Setup
- How to Contribute
- Development Workflow
- Coding Standards
- Testing
- Pull Request Process
- Reporting Bugs
- Suggesting Features
We expect all contributors to be respectful and professional. Please:
- Be welcoming and inclusive
- Be respectful of differing viewpoints and experiences
- Accept constructive criticism gracefully
- Focus on what is best for the community
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/vesper.git cd vesper - Add the upstream repository:
git remote add upstream https://github.com/Adjanour/vesper.git
- Go 1.24 or higher
- SQLite (embedded via modernc.org/sqlite)
- Git
- Optional: Air for hot reload during development
-
Install dependencies:
make install
-
Run database migrations:
make migrate
-
Build the project:
make build
-
Run the server:
make run
The server will start on http://localhost:8080.
For development with automatic reloading:
# Install Air (if not already installed)
go install github.com/cosmtrek/air@latest
# Run in dev mode
make devThere are many ways to contribute to Vesper:
- Bug fixes: Fix existing issues
- New features: Implement features from the roadmap
- Documentation: Improve or add documentation
- Tests: Add test coverage
- Code quality: Refactor and improve code quality
- Examples: Add example code or tutorials
-
Create a feature branch:
git checkout -b feat/your-feature-name # or git checkout -b fix/your-bug-fixUse prefixes:
feat/for new featuresfix/for bug fixesdocs/for documentationrefactor/for code refactoringtest/for adding tests
-
Make your changes:
- Write clear, concise code
- Follow the coding standards (see below)
- Add tests for new functionality
- Update documentation as needed
-
Test your changes:
make test make lint -
Commit your changes:
git add . git commit -m "feat: add your feature description"
Follow Conventional Commits:
feat:for new featuresfix:for bug fixesdocs:for documentation changesrefactor:for code refactoringtest:for test additions
-
Keep your branch up to date:
git fetch upstream git rebase upstream/main
-
Push to your fork:
git push origin feat/your-feature-name
-
Open a Pull Request on GitHub
- Follow standard Go conventions and idioms
- Use
gofmtfor code formatting (automatically done bymake fmt) - Use meaningful variable and function names
- Keep functions small and focused
- Add comments for exported functions and complex logic
- Place new models in
internal/models/ - Place API handlers in
internal/api/ - Place database operations in
internal/database/ - Keep business logic separate from HTTP handlers
- Use domain-specific errors defined in
internal/database/db.go - Return appropriate HTTP status codes
- Provide clear error messages
// Good
func (q *Queries) GetTask(ctx context.Context, id string) (*models.Task, error) {
row := q.db.QueryRowContext(ctx, getTaskSQL, id)
var t models.Task
err := row.Scan(&t.ID, &t.Title, &t.Start, &t.End, &t.Status, &t.UserID)
if err != nil {
if errors.Is(err, sql.ErrNoRows) {
return nil, ErrNotFound
}
return nil, err
}
return &t, nil
}While the project is in early stages, we encourage adding tests:
# Run all tests
make test
# Run tests with coverage
go test -cover ./...
# Run tests for a specific package
go test -v ./internal/database/-
Ensure all tests pass and code is formatted
-
Update the README.md if you've added new features or changed behavior
-
Update API.md if you've modified API endpoints
-
Add or update tests for your changes
-
Write a clear PR description:
- Explain what changes you made
- Why you made them
- How to test them
- Link to any related issues
-
Request a review from maintainers
-
Address review feedback promptly
-
Once approved, a maintainer will merge your PR
Use conventional commit format in PR titles:
feat: add Google Calendar syncfix: correct task overlap detectiondocs: improve API documentation
Found a bug? Please create an issue with:
- Clear title describing the bug
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Environment details (OS, Go version, etc.)
- Any relevant logs or error messages
Have an idea for a new feature?
- Check existing issues to avoid duplicates
- Open a new issue with:
- Clear description of the feature
- Use cases and benefits
- Possible implementation approach (optional)
- Wait for feedback from maintainers before starting work
vesper/
├── cmd/
│ └── server/ # Main application entry point
├── internal/
│ ├── api/ # HTTP handlers and routing
│ ├── database/ # Database operations and migrations
│ └── models/ # Data models
├── data/ # SQLite database storage (gitignored)
├── API.md # API documentation
├── CONTRIBUTING.md # This file
├── Makefile # Build and development tasks
└── README.md # Project overview
- Questions? Open a discussion on GitHub
- Stuck? Comment on your PR or issue
- Need clarification? Reach out to the maintainers
All contributors will be recognized in the project. Thank you for helping make Vesper better!
Happy Contributing! 🚀