First off, thank you for considering contributing to our project! 🎉 It's people like you that make this platform great.
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Coding Standards
- Pull Request Process
- Issue Guidelines
- Community
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
Before creating bug reports, please check the existing issues to avoid duplicates. When creating a bug report, please include:
- Use the bug report template
- Provide clear steps to reproduce
- Include environment details
- Add relevant logs or screenshots
We welcome new feature ideas! Please:
- Use the feature request template
- Explain the problem you're trying to solve
- Describe your proposed solution
- Consider the impact on existing functionality
Documentation improvements are always welcome:
- Fix typos or unclear instructions
- Add examples or tutorials
- Improve API documentation
- Translate documentation
- Find an Issue: Look for issues labeled with
good first issue,help wanted, orbug - Discuss: Comment on the issue to discuss your approach
- Fork & Branch: Fork the repo and create a feature branch
- Code: Write your code following our standards
- Test: Ensure all tests pass and add new tests
- Submit: Create a pull request
- .NET Core SDK 8.0+
- Docker Desktop
- Node.js 18+ (for frontend)
- Git
- A code editor (VS Code recommended)
-
Clone the repository
git clone https://github.com/sloweyyy/cloud-native-ecommerce-platform.git cd cloud-native-ecommerce-platform -
Start infrastructure services
docker-compose up -d mongodb redis postgres sqlserver rabbitmq elasticsearch kibana
-
Build and run services
# Build all services dotnet build Ecommerce.sln # Run individual services (in separate terminals) cd Services/Catalog/Catalog.API && dotnet run cd Services/Basket/Basket.API && dotnet run cd Services/Discount/Discount.API && dotnet run cd Services/Ordering/Ordering.API && dotnet run cd ApiGateways/Ocelot.ApiGateway && dotnet run
-
Frontend development (Micro-frontends)
cd micro-frontends npm install npx nx serve host
# Run all tests
dotnet test
# Run tests with coverage
dotnet test --collect:"XPlat Code Coverage"
# Frontend tests
cd micro-frontends
npx nx run-many --target=test --all- Follow Microsoft's C# Coding Conventions
- Use meaningful variable and method names
- Write XML documentation for public APIs
- Follow SOLID principles
- Use dependency injection appropriately
- Follow React best practices and hooks patterns
- Use TypeScript strictly
- Write unit tests for components and utilities
- Follow Nx workspace conventions for module federation
- Clean Architecture: Maintain separation of concerns
- SOLID Principles: Write maintainable, extensible code
- DRY: Don't repeat yourself
- YAGNI: You ain't gonna need it
- Testing: Write tests for new functionality
We use automated formatting tools:
- .NET: EditorConfig and built-in formatting
- React/Nx: Prettier with ESLint
- YAML: Standard YAML formatting
- Update Documentation: Ensure documentation reflects your changes
- Add Tests: Include appropriate test coverage
- Check Style: Run linting and formatting tools
- Verify Build: Ensure all services build successfully
- Test Locally: Run the full test suite
- Use the PR template
- Link to related issues
- Provide clear description of changes
- Include breaking change notes if applicable
- Ensure CI passes
- Automated Checks: CI must pass
- Code Review: At least one maintainer review
- Security Review: For security-related changes
- Documentation Review: For user-facing changes
- Search First: Check for existing issues
- Use Templates: Use the appropriate issue template
- Be Specific: Provide detailed information
- Stay On Topic: One issue per problem/feature
We use labels to categorize issues:
- Type:
bug,enhancement,documentation - Component:
catalog,basket,ordering,frontend - Priority:
low,medium,high,critical - Status:
triage,in-progress,blocked - Difficulty:
good first issue,help wanted
- Documentation: Check the README and docs
- Issues: Search existing issues for answers
- Discussions: Use GitHub Discussions for questions
- Discord: Join our community Discord server
Current maintainers:
- @sloweyyy - Project Lead
Contributors are recognized in:
- GitHub contributors page
- Release notes
- Project documentation
- Community showcases
We use GitHub Flow with the following branches:
main: Production-ready codedevelop: Integration branch for featuresfeature/*: Feature development branchesbugfix/*: Bug fix brancheshotfix/*: Critical production fixes
Follow Conventional Commits:
type(scope): description
[optional body]
[optional footer]
Examples:
feat(catalog): add product search functionalityfix(basket): resolve cart persistence issuedocs: update deployment guidechore: update dependencies
We use Semantic Versioning:
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes (backward compatible)
Each service should:
- Have a single responsibility
- Be independently deployable
- Own its data
- Communicate via well-defined APIs
- Each service owns its database
- Use appropriate database for the use case
- Implement proper migration strategies
- Follow RESTful principles
- Use proper HTTP status codes
- Implement consistent error handling
- Document APIs with OpenAPI/Swagger
- Follow OWASP guidelines
- Implement proper authentication/authorization
- Use HTTPS everywhere
- Validate all inputs
- Handle sensitive data appropriately
- Unit Tests: Test individual components
- Integration Tests: Test service interactions
- E2E Tests: Test complete user workflows
- Contract Tests: Test API contracts
- Aim for 80%+ code coverage
- Focus on critical paths
- Test edge cases and error conditions
- Don't test trivial code
- Feature Complete: All features merged to develop
- Testing: Comprehensive testing phase
- Release Branch: Create release branch
- Final Testing: Production-like testing
- Tag & Release: Create GitHub release
- Deploy: Deploy to production
- Monitor: Monitor for issues
- Read the Code of Conduct
- Set up your development environment
- Run the project locally
- Find a good first issue
- Join our community discussions
- Make your first contribution!
If you have questions about contributing, please:
- Check the existing documentation
- Search issues and discussions
- Ask in our community channels
- Open a new discussion
Thank you for contributing to making this project better! 🚀