diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e5be2c28..64f80d29 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,323 +1,353 @@ # Contributing to OpenFrame CLI -We're excited that you're interested in contributing to OpenFrame CLI! This guide will help you get started with contributing to the project. +Welcome to the OpenFrame CLI community! We're excited to have you contribute to our mission of simplifying Kubernetes cluster management and GitOps workflows for MSP environments. -## Getting Started +## ๐Ÿš€ Quick Start for Contributors -### Prerequisites +### Prerequisites for Development -Before you begin, ensure you have: +- **Go 1.21+** - [Install Go](https://golang.org/doc/install) +- **Docker 20.10+** - [Get Docker](https://docs.docker.com/get-docker/) +- **Git** - [Install Git](https://git-scm.com/downloads) +- **Make** - For build automation -- Go 1.24.6 or higher -- Docker 20.10+ (with daemon running) -- kubectl 1.25+ -- Helm 3.10+ -- K3D 5.0+ -- Git +**Hardware Requirements:** +- Minimum: 24GB RAM, 6 CPU cores, 50GB disk +- Recommended: 32GB RAM, 12 CPU cores, 100GB disk -### Development Environment Setup +### Development Setup -1. **Fork and Clone the Repository** ```bash -# Fork the repo on GitHub, then clone your fork -git clone https://github.com/YOUR_USERNAME/openframe-cli.git +# 1. Clone the repository +git clone https://github.com/flamingo-stack/openframe-cli.git cd openframe-cli -# Add upstream remote -git remote add upstream https://github.com/flamingo-stack/openframe-cli.git +# 2. Install dependencies +go mod download +go mod tidy + +# 3. Build the CLI +go build -o openframe ./main.go + +# 4. Run tests +go test ./... + +# 5. Verify your setup +./openframe --help ``` -2. **Set Up Your Development Environment** +## ๐Ÿ—๏ธ Development Workflow -Follow the [Development Environment Setup](./docs/development/setup/environment.md) guide for detailed IDE configuration, tools, and environment variables. +### Setting Up Your Development Environment -3. **Install Go Tools** ```bash -# Install essential Go development tools -go install golang.org/x/tools/cmd/goimports@latest -go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest -go install github.com/rakyll/gotest@latest +# Set up development environment variables +export OPENFRAME_DEV_MODE=true +export OPENFRAME_LOG_LEVEL=debug + +# Configure Git (if not already done) +git config --global user.name "Your Name" +git config --global user.email "your.email@example.com" ``` -4. **Build and Test** -```bash -# Build the project -go build -o openframe main.go +### Making Changes -# Run tests -go test ./... +1. **Create a feature branch**: + ```bash + git checkout -b feature/your-feature-name + ``` + +2. **Make your changes** following our coding standards + +3. **Test locally**: + ```bash + # Run unit tests + go test ./... + + # Run with race detection + go test -race ./... + + # Test the CLI functionality + ./openframe bootstrap test-cluster --verbose + ``` + +4. **Lint your code**: + ```bash + golangci-lint run + ``` + +5. **Commit and push**: + ```bash + git add . + git commit -m "feat(component): add new feature + + - Detailed description of the change + - Why this change is needed + - Any breaking changes + + Closes #123" + git push origin feature/your-feature-name + ``` + +## ๐Ÿ“ Contribution Guidelines + +### Code Standards + +- **Test Coverage**: Minimum 80% for new code +- **Linting**: All code must pass `golangci-lint` +- **Documentation**: Public APIs must have Go doc comments +- **Error Handling**: All errors must be properly handled and meaningful +- **Logging**: Use structured logging with appropriate levels + +### Commit Message Format + +Follow the conventional commit format: -# Run linter -golangci-lint run ``` +(): -## Development Workflow + -### Branch Management +