Thank you for your interest in contributing to Grid Core! This document provides guidelines and information for contributors.
- Use the GitHub Issues to report bugs
- Provide detailed information about the issue
- Include steps to reproduce the problem
- Attach relevant logs and error messages
- Use the GitHub Discussions for feature requests
- Describe the use case and expected behavior
- Consider the impact on existing functionality
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes following our coding standards
- Add tests for new functionality
- Update documentation as needed
- Commit your changes:
git commit -m "Add your feature" - Push to your fork:
git push origin feature/your-feature-name - Create a Pull Request
- Follow TypeScript best practices
- Use Prettier for code formatting
- Use ESLint for linting
- Use meaningful variable and function names
- Add JSDoc comments for public APIs
- Use TypeScript strict mode
- Define interfaces for all data structures
- Use proper typing for function parameters and return values
- Avoid
anytype unless absolutely necessary
- Write unit tests for all new functionality
- Maintain test coverage above 80%
- Use Jest for testing
- Include integration tests for API endpoints
- Test error cases and edge conditions
- Follow RESTful conventions
- Use proper HTTP status codes
- Implement proper error handling
- Add request/response validation
- Document all API endpoints
# Run all tests
npm test
# Run with coverage
npm run test:coverage
# Run tests in watch mode
npm run test:watch
# Run specific test file
npm test -- src/controllers/auth.test.tstests/
├── unit/ # Unit tests
│ ├── controllers/
│ ├── services/
│ ├── models/
│ └── utils/
├── integration/ # Integration tests
│ ├── api/
│ └── database/
└── fixtures/ # Test fixtures
├── users.json
└── infrastructure.json
- Define route in
src/routes/ - Create controller in
src/controllers/ - Add service logic in
src/services/ - Add validation schemas
- Add tests
- Update API documentation
- Create service class in
src/services/ - Add interfaces in
src/types/ - Add error handling
- Add tests
- Update documentation
Use clear, descriptive commit messages:
feat: add user authentication endpoint
fix: resolve memory leak in infrastructure service
docs: update API documentation
test: add unit tests for cost optimization
refactor: improve error handling in controllers
- Automated Checks: All PRs must pass CI/CD checks
- Code Review: At least one maintainer must approve
- Testing: All tests must pass
- Documentation: Documentation must be updated
- Performance: Consider performance impact
When reporting bugs, please include:
- Description: Clear description of the issue
- Steps to Reproduce: Detailed steps to reproduce
- Expected Behavior: What should happen
- Actual Behavior: What actually happens
- Environment: Node.js version, OS, dependencies
- Logs: Relevant error messages and logs
When suggesting features:
- Use Case: Describe the problem you're trying to solve
- Proposed Solution: How you think it should work
- Alternatives: Other solutions you've considered
- Additional Context: Any other relevant information
- Grid Platform Documentation
- TypeScript Documentation
- Express.js Documentation
- Jest Documentation
- Node.js Best Practices
- GitHub Discussions: Ask questions
- Discord: Join our community
- Email: Contact us
Thank you for contributing to Grid Core! 🚀