Skip to content

Guidelines

PT | EN

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/vectora

Code Style

  • Golang: Go 1.22+, follow Go Code Review Comments
  • Formatting: gofmt or goimports
  • Linting: golangci-lint (run golangci-lint run)
  • Tests: go test, coverage >80%

Git Workflow

  1. Fork repo
  2. Create branch: git checkout -b feature/your-feature
  3. Commit: conventional commits (feat:, fix:, docs:)
  4. Push: git push origin feature/your-feature
  5. 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 #123

Types: 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 report

Performance

  • 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 nancy or govulncheck before the PR

Questions?


Part of the Vectora ecosystem · Open Source (MIT) · Contributors