Contributing to Logchef
July 1, 2026 ยท View on GitHub
Thank you for your interest in contributing to Logchef! We welcome contributions from the community.
Getting Started
Development Setup
# Clone the repository
git clone https://github.com/mr-karan/logchef.git
cd logchef
For detailed setup instructions, see our Development Setup Guide.
Quick Start
# Generate database code
just sqlc-generate
# Start development infrastructure (ClickHouse, Dex OIDC)
just dev-docker
# Build the application
just build
# Run with development config
just CONFIG=dev/config.toml run
Access Logchef at http://localhost:8125
Development Workflow
Making Changes
- Fork and clone the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes following our coding standards
- Run checks:
just check(runs format, vet, lint, sqlc, tests) - Commit your changes with clear, descriptive messages
- Push to your fork and create a pull request
Code Quality
Before submitting a PR, ensure:
# All checks pass
just check
# Tests pass with coverage
just test
# Code is formatted
just fmt
# No linting issues
just lint
Working with Database Changes
If your changes involve database modifications:
- Create migration files in
internal/store/sqlite/migrations/ - Update queries in
internal/store/sqlite/queries.sql - Regenerate SQLC code:
just sqlc-generate - Update models in
pkg/models/if needed
Frontend Development
cd frontend/
# Development server
pnpm dev
# Type checking
pnpm typecheck
# Build
pnpm build
Contribution Guidelines
Code Style
Backend (Go):
- Follow standard Go conventions and idioms
- Use
gofmtfor formatting (automated viajust fmt) - Write meaningful variable and function names
- Add comments for exported functions and complex logic
- Keep functions focused and reasonably sized
Frontend (Vue/TypeScript):
- Follow TypeScript best practices
- Use Composition API for Vue components
- Properly type all props, emits, and composables
- Use Pinia stores for state management
- Follow existing component patterns in
src/components/ui/
Commit Messages
Write clear, concise commit messages:
- Use present tense ("Add feature" not "Added feature")
- Use imperative mood ("Move cursor to..." not "Moves cursor to...")
- First line should be 50 characters or less
- Reference issues and pull requests when relevant
Examples:
feat: add AI-powered query suggestions
fix: resolve race condition in connection pooling
docs: update development setup instructions
refactor: simplify user authentication flow
Pull Request Process
- Title: Use a clear, descriptive title
- Description: Explain what changes you made and why
- Testing: Describe how you tested your changes
- Screenshots: Include screenshots for UI changes
- Documentation: Update docs if adding/changing features
- Breaking Changes: Clearly mark any breaking changes
Testing
- Write tests for new functionality
- Ensure existing tests pass
- Maintain or improve code coverage
- Test edge cases and error conditions
Run tests:
# With coverage
just test
# Without coverage (faster)
just test-short
Project Structure
Backend (Go)
internal/app/- Application bootstrap and dependency injectioninternal/server/- HTTP handlers, middleware, routinginternal/core/- Business logic (users, teams, sources, logs)internal/clickhouse/- ClickHouse client and connection managementinternal/store/sqlite/- SQLite metadata storage with SQLCinternal/auth/- OIDC authenticationinternal/config/- Configuration management
Frontend (Vue 3 + TypeScript)
src/views/- Page-level componentssrc/components/- Reusable UI components (Radix Vue + Tailwind)src/stores/- Pinia state managementsrc/api/- API client functionssrc/services/- Business logic and query processing
Architecture Patterns
Backend Patterns
- Dependency Injection: App struct contains all dependencies
- SQLC Integration: Type-safe SQL queries
- Connection Pooling: ClickHouse Manager maintains pools per source
- Middleware Chain: Authentication, CORS, logging
- Error Handling: Standardized responses via
server/response.go
Frontend Patterns
- Pinia Stores: Centralized state management
- Composables: Reusable logic in
src/composables/ - API Layer: Centralized with error handling
- Component Architecture: Shadcn/ui-style with TypeScript
Resources
- Documentation: https://logchef.app
- Development Setup: https://logchef.app/contributing/setup
- Architecture: https://logchef.app/core/architecture
- Roadmap: https://logchef.app/contributing/roadmap
- Development Patterns: See CLAUDE.md
Getting Help
- Issues: Open an issue on GitHub for bugs or feature requests
- Discussions: Use GitHub Discussions for questions and ideas
- Documentation: Check the docs at https://logchef.app
License
By contributing to Logchef, you agree that your contributions will be licensed under the AGPLv3 License.
Recognition
Contributors will be recognized in our release notes and README. Thank you for helping make Logchef better!