Guidelines
Complete guide for contributing to Vectora: setup, code, commits, PRs, and best practices.
Setup
git clone https://github.com/kaffyn/vectora
cd vectora
go mod tidy
go build -o vectora ./cmd/vectoraCode Style
- Golang: Go 1.22+, follow Go Code Review Comments
- Formatting:
gofmtorgoimports - Linting:
golangci-lint(rungolangci-lint run) - Tests:
go test, coverage >80%
Git Workflow
- Fork repo
- Create branch:
git checkout -b feature/your-feature - Commit: conventional commits (
feat:,fix:,docs:) - Push:
git push origin feature/your-feature - PR with clear description
PR Requirements
- Tests passing (
go test ./...) - Clean linting (
golangci-lint run) - No
fmt.Printf(use internal logger) - Updated documentation (PT + EN)
- PR description explains the WHY
Commit Message Format
type(scope): brief description
Longer explanation if needed.
Closes #123Types: feat, fix, docs, test, refactor, perf, chore
Documentation
- Update CHANGELOG.md
- Add JSDoc/GoDoc for public functions
- Portuguese + English (i18n)
Testing
go test ./... # Run all tests
go test -v ./pkg/core # Test specific package
go test -coverprofile=coverage.out ./... # Coverage reportPerformance
- Benchmark before/after:
go test -bench=. ./... - Vector search must be < 500ms
- Do not add heavy dependencies
Security
- Use BYOK for APIs
- No hardcoded secrets
- Run
go nancyorgovulncheckbefore the PR
Questions?
- GitHub Discussions: github.com/kaffyn/vectora/discussions
- Issues: github.com/kaffyn/vectora/issues
Part of the Vectora ecosystem · Open Source (MIT) · Contributors