Thank you for your interest in contributing to the Lenia project! This document provides guidelines and information for contributors.
This project adheres to a code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
- Be respectful and inclusive
- Focus on what is best for the community
- Show empathy towards other community members
- Use welcoming and inclusive language
- .NET 9.0 SDK
- Git
- A code editor (Visual Studio, VS Code, JetBrains Rider)
-
Fork the repository
# Click the "Fork" button on GitHub, then clone your fork git clone https://github.com/YOUR_USERNAME/lenia.git cd lenia
-
Add upstream remote
git remote add upstream https://github.com/ORIGINAL_OWNER/lenia.git
-
Install dependencies
dotnet restore
-
Run the application
cd Lenia/Lenia dotnet run
- Use the GitHub issue tracker
- Include a clear title and description
- Provide steps to reproduce the issue
- Include browser/OS information
- Add screenshots if helpful
- Check if the feature already exists or is planned
- Explain the use case and benefits
- Provide mockups or examples if applicable
- Consider implementation complexity
- Bug fixes
- Performance optimizations
- New Lenia patterns or algorithms
- UI/UX improvements
- Documentation updates
- Follow C# coding conventions
- Use meaningful variable and method names
- Add XML documentation for public APIs
- Keep methods focused and small
- Use async/await properly
- Use MudBlazor components consistently
- Follow the existing component structure
- Minimize JavaScript interop when possible
- Use proper lifecycle methods (
OnInitialized,OnAfterRender) - Handle component disposal properly
- Maintain 60 FPS target performance
- Profile changes that affect simulation speed
- Use
Parallel.Forfor CPU-intensive operations - Minimize memory allocations in hot paths
- Cache expensive calculations
Lenia/
├── Lenia/ # Server-side Blazor Web App
│ ├── Components/
│ ├── Program.cs
│ └── Lenia.csproj
├── Lenia.Client/ # Client-side Blazor WebAssembly
│ ├── Components/
│ ├── Pages/
│ ├── Layout/
│ ├── wwwroot/
│ └── Lenia.Client.csproj
└── Tests/ # Unit and integration tests
- Check existing issues/PRs to avoid duplicates
- Create an issue for significant changes to discuss approach
- Update documentation if needed
- Add tests for new functionality
- Ensure CI passes locally
-
Create a feature branch
git checkout -b feature/amazing-feature
-
Make your changes
- Write clean, documented code
- Follow the style guidelines
- Add tests for new features
-
Commit your changes
git add . git commit -m "Add amazing feature - Detailed description of changes - Any breaking changes noted - Fixes #issue_number"
-
Push to your fork
git push origin feature/amazing-feature
-
Create a Pull Request
- Use a clear title and description
- Reference related issues
- Include screenshots for UI changes
- Add testing instructions
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Performance improvement
- [ ] Documentation update
- [ ] Refactoring
## Testing
- [ ] Unit tests added/updated
- [ ] Manual testing performed
- [ ] Performance testing (if applicable)
## Screenshots
(If applicable)
## Breaking Changes
(List any breaking changes)# Run all tests
dotnet test
# Run specific test project
dotnet test Tests/Lenia.Tests.csproj
# Run with coverage
dotnet test --collect:"XPlat Code Coverage"- Write unit tests for new algorithms
- Test edge cases and error conditions
- Use descriptive test names
- Mock external dependencies
- Test performance-critical code
- Simulation runs at target FPS
- All UI controls work correctly
- Pattern presets load properly
- Responsive design works on mobile
- Browser compatibility (Chrome, Firefox, Safari, Edge)
- Profile before and after changes
- Measure FPS impact
- Test on different grid sizes
- Consider memory usage
- Minimize re-renders
- Use
ShouldRender()when appropriate - Optimize component hierarchies
- Test on slower devices
- Build failures: Check .NET version and dependencies
- Runtime errors: Check browser console for JavaScript errors
- Performance issues: Use browser dev tools profiler
- UI problems: Inspect MudBlazor component usage
- Browser DevTools
- Visual Studio debugger
- .NET CLI diagnostics
- Performance profilers
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: Questions and general discussion
- Pull Request Comments: Code-specific questions
Contributors will be recognized in:
- GitHub contributors list
- Release notes
- Project documentation
- Special thanks in README
Thank you for contributing to Lenia! 🧬✨