Contributing
Guidelines for contributing to the Hireable platform
Overview
Thank you for your interest in contributing to Hireable! This guide covers the development workflow, code standards, and contribution process.
Development Setup
- Fork and clone the repository
- Install dependencies:
npm install - Set up environment:
cp .env.example .env.local - Set up git hooks:
npm run prepare - Start development:
npm run dev
Code Standards
TypeScript
- Use TypeScript for all new files
- Enable strict type checking
- Avoid
anytypes - useunknownor proper types - Use interfaces for object shapes
- Use type aliases for unions and complex types
React
- Use functional components with hooks
- Follow React 19 best practices
- Use proper dependency arrays in hooks
- Implement error boundaries where appropriate
Styling
- Use Tailwind CSS utility classes
- Follow the existing design system
- Use CSS variables for theme values
- Avoid inline styles unless necessary
Accessibility
- Use semantic HTML elements
- Include ARIA labels where needed
- Ensure keyboard navigation works
- Maintain color contrast ratios (WCAG AA)
Git Workflow
Branch Naming
| Prefix | Purpose | Example |
|---|---|---|
feature/ | New features | feature/user-auth |
fix/ | Bug fixes | fix/login-redirect |
refactor/ | Code refactoring | refactor/api-client |
docs/ | Documentation | docs/api-reference |
test/ | Test additions | test/auth-service |
Commit Messages
Follow conventional commits format:
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting)refactor: Code refactoringtest: Test additions/updateschore: Build process or auxiliary tool changes
Examples:
Pull Request Process
- Create a feature branch from
main - Make your changes
- Run all checks:
npm run validate - Run tests:
npm run test - Commit with conventional commit messages
- Push to your fork
- Create a pull request with:
- Clear title and description
- Reference to related issues
- Screenshots for UI changes
- Address review feedback
- Merge after approval
Testing
Writing Tests
- Write tests for all new features
- Test edge cases and error conditions
- Use descriptive test names
- Follow AAA pattern (Arrange, Act, Assert)
Running Tests
Code Review Guidelines
For Authors
- Keep PRs focused and small
- Write clear descriptions
- Respond to feedback promptly
- Update based on review comments
- Ensure CI passes
For Reviewers
- Be constructive and respectful
- Focus on code quality and standards
- Check for security issues
- Verify test coverage
- Test functionality locally if needed
Performance Guidelines
- Use Next.js Image component for images
- Implement code splitting for large components
- Use React.lazy() for route-based splitting
- Optimize bundle size
- Monitor Core Web Vitals
Security Guidelines
- Never commit secrets or API keys
- Validate all user inputs
- Sanitize data before rendering
- Use environment variables for configuration
- Follow OWASP security practices
Documentation
- Update README.md for user-facing changes
- Add JSDoc comments for complex functions
- Document component props with TypeScript
- Include examples for new features
Questions?
If you have questions or need help:
- Check existing documentation
- Review closed issues and PRs
- Ask in pull request comments
- Contact the development team