Thank you for your interest in contributing to Mist! This document provides guidelines and instructions for contributing to this project.
- Code of Conduct
- Getting Started
- Development Environment
- Project Structure
- How to Contribute
- Coding Standards
- Testing
- Commit Messages
- Pull Request Process
- Release Process
- Getting Help
This project and everyone participating in it is governed by our commitment to:
- Be respectful and inclusive
- Welcome newcomers and help them learn
- Accept constructive criticism gracefully
- Focus on what's best for the community and users
- Show empathy towards others
Before you begin, ensure you have the following installed:
- Linux - any linux distro or wsl
- Go 1.22+ - Download
- Docker - Installation Guide
- Bun (for frontend development) - Install
- Git - Download
Optional but recommended:
- fyrer (for hot reloading during development):
cargo install fyrer
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/trymist/mist cd mist - Add the upstream remote:
git remote add upstream https://github.com/trymist/mist
The easiest way to start development:
docker compose -f "traefik-compose.yml" up -d
fyrerThis will automatically:
- Watch for file changes
- Rebuild the server when Go files change
- Rebuild the frontend when TypeScript/React files change
- Handle dependencies
If you prefer manual control:
Backend (Go):
cd server
go mod tidy
go run .Frontend (React/TypeScript):
cd dash
bun install
bun run devTraefik
docker compose -f "traefik-compose.yml" up -dCLI:
cd cli
go mod download
go build .mist/
├── server/
│ ├── api/ # API server
│ ├── compose/ # Docker Compose operations
│ ├── db/ # DB configurations/migrations
│ ├── git/ # Git helper functions
│ ├── models/ # Database models (GORM)
│ ├── queue/ # Deployment queue
│ ├── store/ # Database store
│ ├── utils/ # Utility functions
│ └── websockets/ # WebSocket handlers
├── dash/ # React frontend (Vite + TypeScript)
│ ├── src/
│ │ ├── components/ # UI components
│ │ ├── features/ # Feature modules
│ │ ├── hooks/ # React hooks
│ │ ├── pages/ # Page components
│ │ ├── services/ # API services
│ │ └── types/ # TypeScript types
│ └── package.json
├── cli/ # Go CLI tool
├── test/ # Go test suite
├── www/docs/ # VitePress documentation
└── traefik-compose.yml # Traefik configuration
- Backend: Go 1.22+, Gin framework, GORM, SQLite, Docker API
- Frontend: React 19, TypeScript, Vite, Tailwind CSS, Radix UI
- CLI: Go with cobra
- Documentation: VitePress
- Database: SQLite with GORM
Before creating a bug report:
- Check the existing issues to avoid duplicates
- Update to the latest version to see if the issue persists
When reporting bugs, include:
- Clear, descriptive title
- Steps to reproduce
- Expected vs actual behavior
- Environment details (OS, Docker version, Mist version)
- Relevant logs or screenshots
Enhancement suggestions are tracked as GitHub issues. When creating one:
- Use a clear, descriptive title
- Provide detailed description
- Explain why this enhancement would be useful
- Include mockups or examples if applicable
-
Create a branch from
main:git checkout -b feature/your-feature-name
Branch naming conventions:
feature/- New featuresfix/- Bug fixesdocs/- Documentation updatesrefactor/- Code refactoringtest/- Test additions/improvements
-
Make your changes following our coding standards
-
Test your changes (see Testing)
-
Update documentation if needed
-
Commit with a clear message (see Commit Messages)
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub
- Follow Effective Go guidelines
- Use
gofmtfor formatting - Run
go vetto catch common issues - Keep functions focused and small
- Write meaningful comments for exported functions
- Use meaningful variable names
Example:
// DeployApplication deploys an application from a git repository
func DeployApplication(app *models.Application, deployment *models.Deployment) error {
// Implementation
}- Use TypeScript for all new code
- Follow the existing component structure
- Use functional components with hooks
- Prefer named exports over default exports
- Use Tailwind CSS for styling
- Follow the project's component patterns (see existing components)
Example:
interface DeploymentCardProps {
deployment: Deployment;
onDelete: (id: string) => void;
}
export function DeploymentCard({ deployment, onDelete }: DeploymentCardProps) {
return (
<Card>
<CardHeader>{deployment.name}</CardHeader>
</Card>
);
}- Keep related files close together
- Use index.ts files for clean exports
- Place shared utilities in appropriate
utils/orlib/folders - Co-locate tests with source files or in
__tests__/directories
Located in the /test directory:
cd test
go test -v ./...When adding features:
- Write unit tests for new functions
- Add integration tests for API endpoints
- Test edge cases and error conditions
- Aim for good coverage of critical paths
Currently, the project uses manual testing. When adding features:
- Test in multiple browsers
- Verify responsive design on mobile/desktop
- Check accessibility with keyboard navigation
- Test error states and loading states
Before submitting:
- Application builds without errors
- Server starts and responds to requests
- Frontend loads and renders correctly
- Docker operations work (if modified)
- Git operations work (if modified)
- Database migrations work (if modified)
- WebSocket connections work (if modified)
- No console errors in browser
Use clear, descriptive commit messages that explain the "why" not just the "what":
type(scope): subject
body (optional)
footer (optional)
Types:
feat:- New featurefix:- Bug fixdocs:- Documentationstyle:- Formatting, missing semicolons, etc.refactor:- Code restructuringtest:- Adding testschore:- Build process, dependencies, etc.
Examples:
feat(deployments): add ability to stop ongoing deployments
fix(ssl): correct certificate renewal timing
docs(api): add examples for environment variable endpoints
-
Update your branch with the latest
main:git fetch upstream git rebase upstream/main
-
Ensure all tests pass
-
Update CHANGELOG.md if your change is notable:
- Add under the "Unreleased" section
- Follow the existing format
-
Fill out the PR template (if provided) or include:
- Description of changes
- Motivation/context
- Testing performed
- Screenshots (for UI changes)
- Breaking changes (if any)
-
Request review from maintainers
-
Address feedback promptly and professionally
-
Once approved, a maintainer will merge your PR
- Branch is up to date with
main - All CI checks pass
- Code follows style guidelines
- Tests added/updated for new functionality
- Documentation updated (if needed)
- CHANGELOG.md updated (if notable change)
- No merge conflicts
Mist follows Semantic Versioning:
- MAJOR version for incompatible API changes
- MINOR version for new functionality (backward compatible)
- PATCH version for bug fixes (backward compatible)
The CHANGELOG.md is maintained following Keep a Changelog format.
- Discord: Join our community
- GitHub Issues: Report bugs or request features
- Documentation: trymist.cloud
Contributors will be:
- Listed in the project's README (for significant contributions)
- Mentioned in release notes
- Acknowledged in our Discord community
Thank you for contributing to Mist!