Thank you for your interest in contributing to Mock-API-Studio! 🎉
All code, comments, documentation, and communication must be in English to ensure accessibility for the global open-source community.
- Be respectful and inclusive
- Welcome newcomers and help them learn
- Focus on constructive feedback
- Respect different viewpoints and experiences
- Fork the repository
- Clone your fork
git clone https://github.com/YOUR_USERNAME/mock-api-studio.git cd mock-api-studio - Create a feature branch
git checkout -b feature/your-feature-name
- Node.js 20+
- Docker & Docker Compose
- Git
# Install dependencies
cd backend && npm install
cd ../frontend && npm install
# Start databases
docker compose up db redis -d
# Backend
cd backend
cp .env.example .env
npm run prisma:migrate
npm run prisma:seed
npm run start:dev
# Frontend (new terminal)
cd frontend
cp .env.example .env
npm run devWe follow Conventional Commits:
type(scope): subject
body (optional)
footer (optional)
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
git commit -m "feat(webhooks): add secret signing support"
git commit -m "fix(auth): resolve JWT token expiration issue"
git commit -m "docs(readme): update installation instructions"Before submitting a PR, ensure all tests pass:
# Backend tests
cd backend
npm test
npm run test:cov
# Frontend tests
cd frontend
npm test
# E2E tests
npm run test:e2e- Unit tests: Test individual functions/services
- Integration tests: Test module interactions
- E2E tests: Test complete user flows
Example:
describe('WorkspacesService', () => {
it('should create a workspace', async () => {
const result = await service.create({
name: 'Test Workspace',
slug: 'test-workspace'
});
expect(result.slug).toBe('test-workspace');
});
});- Use TypeScript for all code
- Enable strict mode
- Define explicit types (avoid
any) - Use interfaces for object shapes
# Backend
cd backend
npm run lint
npm run format
# Frontend
cd frontend
npm run lint- Files:
kebab-case.ts - Classes:
PascalCase - Functions/Variables:
camelCase - Constants:
UPPER_SNAKE_CASE - Interfaces:
PascalCase(prefix withIoptional)
backend/
├── src/
│ ├── [feature]/ # Feature modules
│ │ ├── dto/ # Data Transfer Objects
│ │ ├── [feature].service.ts
│ │ ├── [feature].controller.ts
│ │ ├── [feature].module.ts
│ │ └── [feature].service.spec.ts
│ ├── common/ # Shared modules
│ └── shared/ # Utilities
frontend/
├── src/
│ ├── api/ # API clients
│ ├── components/ # Reusable components
│ ├── contexts/ # React contexts
│ ├── pages/ # Page components
│ └── test/ # Test utilities
- Update README.md for new features
- Add JSDoc comments for public APIs
- Update API documentation
- Create examples for complex features
Example:
/**
* Creates a new webhook subscription
* @param dto - Webhook creation data
* @returns Created webhook with generated ID
* @throws BadRequestException if URL is invalid
*/
async create(dto: CreateWebhookDto): Promise<Webhook> {
// implementation
}- Update documentation if needed
- Add/update tests for new features
- Ensure all tests pass
- Update CHANGELOG.md
- Create PR with description:
- What changes were made
- Why these changes were needed
- How to test the changes
- Screenshots (for UI changes)
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
How to test the changes
## Checklist
- [ ] Tests pass
- [ ] Documentation updated
- [ ] CHANGELOG.md updated
- [ ] Code follows style guidelinesUse GitHub Issues with the bug template:
**Describe the bug**
Clear description of the bug
**To Reproduce**
Steps to reproduce:
1. Go to '...'
2. Click on '...'
3. See error
**Expected behavior**
What you expected to happen
**Screenshots**
If applicable
**Environment**
- OS: [e.g., Ubuntu 22.04]
- Node version: [e.g., 20.10.0]
- Browser: [e.g., Chrome 120]Use GitHub Issues with the feature template:
**Is your feature request related to a problem?**
Description of the problem
**Describe the solution you'd like**
Clear description of the desired feature
**Describe alternatives you've considered**
Alternative solutions
**Additional context**
Any other context or screenshotsContributors will be:
- Listed in CONTRIBUTORS.md
- Mentioned in release notes
- Credited in relevant documentation
- Open a GitHub Discussion
- Check existing issues
- Review documentation
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for making Mock-API-Studio better! 🚀