Contributing
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:
- Search existing issues to avoid duplicates
- Check documentation to ensure it's not a configuration issue
- 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 featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: 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
gofmtfor formatting - Use
golintfor 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
- Fork and branch: Create a feature branch from
main - Make changes: Implement your feature or fix
- Write tests: Add tests for new functionality
- Update docs: Update relevant documentation
- Commit: Write clear commit messages
- Push: Push to your fork
- Create PR: Open a pull request
- Review: Address review comments
- 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
- Documentation: Check the documentation
- Issues: Search GitHub Issues
- Discussions: Ask in GitHub Discussions
Related Topics
- Getting Started - Framework overview
- Development Guide - Development guidelines
Thank you for contributing to EZ-Console! 🎉