Skip to main content

Contributing

DEVELOPER Beginner

Contribute to EZ-Console framework development.

Overview

Thank you for your interest in contributing to EZ-Console! This guide will help you get started with contributing code, documentation, or reporting issues.

How to Contribute

Reporting Issues

Before reporting an issue:

  1. Search existing issues to avoid duplicates
  2. Check documentation to ensure it's not a configuration issue
  3. Provide detailed information:
    • EZ-Console version
    • Go version
    • Node.js version
    • Steps to reproduce
    • Expected vs actual behavior
    • Error messages and logs

Issue Template:

**Version**: EZ-Console v1.0.0
**Go Version**: 1.20
**Node Version**: 18.0.0

**Description**:
Brief description of the issue

**Steps to Reproduce**:
1. Step one
2. Step two
3. Step three

**Expected Behavior**:
What should happen

**Actual Behavior**:
What actually happens

**Logs**:
Relevant error logs

Contributing Code

1. Fork the Repository

# Fork on GitHub, then clone
git clone https://github.com/your-username/ez-console.git
cd ez-console

2. Create a Branch

# Create feature branch
git checkout -b feature/your-feature-name

# Or bugfix branch
git checkout -b fix/your-bugfix-name

3. Make Changes

  • Follow the existing code style
  • Write tests for new features
  • Update documentation
  • Add comments for complex logic

4. Commit Changes

# Write clear commit messages
git commit -m "feat: add new feature description"
git commit -m "fix: fix bug description"
git commit -m "docs: update documentation"

Commit Message Format:

<type>: <subject>

<body>

<footer>

Types:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code style changes (formatting, etc.)
  • refactor: Code refactoring
  • test: Adding or updating tests
  • chore: Maintenance tasks

5. Push and Create Pull Request

git push origin feature/your-feature-name

Then create a Pull Request on GitHub with:

  • Clear title and description
  • Reference related issues
  • Screenshots (for UI changes)
  • Test results

Development Setup

Prerequisites

  • Go 1.20 or higher
  • Node.js 18 or higher
  • pnpm
  • Make (optional)

Backend Development

# Clone repository
git clone https://github.com/sven-victor/ez-console.git
cd ez-console

# Install dependencies
go mod download

# Run tests
go test ./...

# Build
go build -o server cmd/root.go

# Run with development mode
./server --server.mode=debug --log.level=debug

Frontend Development

cd web

# Install dependencies
pnpm install

# Run development server
pnpm dev

# Build
pnpm build

# Run tests
pnpm test

Code Style Guidelines

Go Code Style

  • Follow Effective Go guidelines
  • Use gofmt for formatting
  • Use golint for linting
  • Write clear, descriptive function names
  • Add comments for exported functions
// Good
func CreateUser(ctx context.Context, user *model.User) error {
// Implementation
}

// Bad
func cu(ctx context.Context, u *model.User) error {
// Implementation
}

TypeScript/React Code Style

  • Follow React best practices
  • Use TypeScript for type safety
  • Use functional components with hooks
  • Follow Ant Design patterns
// Good
export const UserList: React.FC<UserListProps> = ({ users }) => {
const { t } = useTranslation();
// Implementation
};

// Bad
export function UserList(props) {
// Implementation
}

Testing

Backend Tests

# Run all tests
go test ./...

# Run specific package tests
go test ./pkg/api/...

# Run with coverage
go test -cover ./...

Frontend Tests

cd web

# Run tests
pnpm test

# Run with coverage
pnpm test:coverage

Documentation

Code Documentation

  • Document all exported functions
  • Add examples for complex APIs
  • Update README for new features

User Documentation

  • Update relevant documentation files
  • Add examples and use cases
  • Include screenshots for UI changes

Pull Request Process

  1. Fork and branch: Create a feature branch from main
  2. Make changes: Implement your feature or fix
  3. Write tests: Add tests for new functionality
  4. Update docs: Update relevant documentation
  5. Commit: Write clear commit messages
  6. Push: Push to your fork
  7. Create PR: Open a pull request
  8. Review: Address review comments
  9. Merge: Maintainer will merge after approval

Code Review Guidelines

For Contributors

  • Be responsive to review comments
  • Make requested changes promptly
  • Ask questions if unclear
  • Be respectful and professional

For Reviewers

  • Be constructive and helpful
  • Explain reasoning for suggestions
  • Approve when satisfied
  • Request changes when needed

License

By contributing, you agree that your contributions will be licensed under the Apache License 2.0.

Recognition

Contributors will be:

  • Listed in CONTRIBUTORS.md
  • Mentioned in release notes for significant contributions
  • Credited in documentation

Getting Help


Thank you for contributing to EZ-Console! 🎉