Welcome Contributors
Dockhand welcomes all contributions! Thank you for considering contributing to the project. Whether you’re fixing bugs, adding features, improving documentation, or suggesting enhancements, your contributions are valuable.How to Contribute
1. Fork the Repository
Fork the repository on GitHub to your account:- Visit github.com/Finsys/dockhand
- Click the “Fork” button in the top-right corner
- Clone your forked repository:
2. Create a Branch
Create a new branch for your feature or bug fix:feature/- New featuresfix/- Bug fixesdocs/- Documentation updatesrefactor/- Code refactoringtest/- Test additions or modifications
3. Make Your Changes
Make your changes with clear, logical commits:- Use present tense (“Add feature” not “Added feature”)
- Be concise but descriptive
- Reference issue numbers when applicable (“Fix #123”)
4. Push Changes
Push your changes to your forked repository:5. Open a Pull Request
Open a pull request against the main repository’smain branch:
- Go to your fork on GitHub
- Click “Pull Request” button
- Provide a clear title and description
- Link any related issues
- Wait for review and feedback
Development Setup
Prerequisites
- Bun: Latest version from bun.sh
- Docker: For running and testing containers
- Git: For version control
- Node.js: 18+ (for tooling compatibility)
Getting Started
-
Install Bun (if not already installed):
-
Clone the repository:
-
Install dependencies:
-
Start the development server:
-
Access the application:
Open your browser and navigate to
http://localhost:5173
Environment Setup
Create a.env file for local development (optional):
Project Structure
Tech Stack
Understanding the tech stack will help you contribute effectively:Frontend
- SvelteKit 2: Full-stack framework
- Svelte 5: UI framework with runes
- shadcn-svelte: Component library
- TailwindCSS: Utility-first CSS
Backend
- Bun: JavaScript runtime
- SvelteKit API routes: Backend endpoints
- Drizzle ORM: Database toolkit
- Direct Docker API calls: No SDK dependency
Database
- SQLite: Default (better-sqlite3)
- PostgreSQL: Production option
Base OS
- Wolfi packages: Minimal, secure base
- apko: Image building
- Every package explicitly declared in Dockerfile
Development Workflow
Running Tests
Code Quality
Database Migrations
Building Docker Image
Code Standards
TypeScript
- Use TypeScript for all new code
- Add types for function parameters and return values
- Avoid
anytypes when possible
Svelte Components
- Use Svelte 5 runes (
$state,$derived,$effect) - Keep components focused and reusable
- Use props destructuring for clarity
- Add JSDoc comments for exported functions
Styling
- Use TailwindCSS utility classes
- Follow existing component patterns
- Ensure responsive design
- Support both light and dark themes
API Routes
- Follow REST conventions
- Return consistent error responses
- Add request validation
- Include JSDoc comments
Database
- Use Drizzle ORM for queries
- Create migrations for schema changes
- Index frequently queried columns
- Handle errors gracefully
Testing Guidelines
Unit Tests
- Test pure functions and utilities
- Mock external dependencies
- Aim for high coverage on critical code
Integration Tests
- Test API endpoints
- Verify database operations
- Test Docker API interactions
E2E Tests
- Test user workflows
- Use Playwright for browser automation
- Focus on critical paths
Pull Request Guidelines
Before Submitting
- Code follows project conventions
- Tests pass locally
- Type checking passes (
bun check) - Changes are documented
- Commit messages are clear
- No merge conflicts with main
PR Description
Include in your PR description:- What: What changes are included
- Why: Why these changes are needed
- How: How the changes work
- Testing: How you tested the changes
- Screenshots: If UI changes (before/after)
- Related Issues: Link related issues
Review Process
- Automated checks will run (tests, linting)
- Maintainers will review your code
- Address feedback and requested changes
- Once approved, your PR will be merged
Contributor License Agreement
When contributing to Dockhand, you will be asked to sign a Contributor License Agreement (CLA) to ensure that all contributions are properly licensed. This helps protect both you and the project. The CLA ensures:- Your contributions can be used in the project
- You retain copyright to your contributions
- The project can continue under its license
- Protection for both contributors and users
Types of Contributions
Bug Reports
Report bugs via GitHub Issues:- Use the bug report template
- Include Dockhand version
- Include Docker version
- Describe steps to reproduce
- Include error messages/logs
- Add screenshots if applicable
Feature Requests
Suggest features via GitHub Discussions:- Describe the feature
- Explain the use case
- Consider implementation approach
- Note any potential challenges
Documentation
Improve documentation:- Fix typos or unclear explanations
- Add examples and use cases
- Improve API documentation
- Translate to other languages
Code Contributions
Contribute code:- Fix bugs
- Implement features
- Optimize performance
- Refactor code
- Add tests
Community Guidelines
Be Respectful
- Treat everyone with respect
- Welcome newcomers
- Be patient with questions
- Provide constructive feedback
Be Collaborative
- Share knowledge
- Help others
- Give credit where due
- Discuss ideas openly
Be Professional
- Stay on topic
- Use clear communication
- Accept feedback gracefully
- Focus on the code, not the person
Getting Help
If you need help:- Check the documentation
- Search GitHub Issues
- Ask in GitHub Discussions
- Review existing PRs
Recognition
Contributors are recognized:- In the project README
- In release notes
- On the project website
