mirror of
https://github.com/acedanger/finance.git
synced 2025-12-06 07:00:13 -08:00
2.3 KiB
2.3 KiB
Contributing to Finance App
This document outlines development practices and guidelines for this project.
Development Workflow
Git Hooks
This project uses Git hooks to ensure code quality:
- Pre-commit hook: Runs Biome checks before each commit
- All code must pass these checks to be committed
- See HOOKS.md for detailed usage instructions
Commit Message Format
Commit messages should be clear and descriptive:
<type>: <description>
[optional body]
Types:
- feat: New feature
- fix: Bug fix
- docs: Documentation changes
- style: Code style changes (formatting, etc.)
- refactor: Code changes that neither fix bugs nor add features
- test: Adding or modifying tests
- chore: Changes to build process or auxiliary tools
Example:
feat: add transaction filtering by date range
Implements the date range picker component and adds filtering logic
to the transaction table display. Updates the API to support date range filtering.
Branch Naming Conventions
feature/<feature-name>- For new featuresfix/<issue-name>- For bug fixesrefactor/<component>- For code refactoringdocs/<document-name>- For documentation updates
Example: feature/date-range-filter
Coding Standards
TypeScript Guidelines
- Use TypeScript for all new files
- Add proper type annotations
- Avoid using
anytype - Use optional chaining (
?.) and nullish coalescing (??) where appropriate
Path Aliases
Always use the project's configured path aliases instead of relative imports. See the README.md file for the complete list of configured path aliases.
CSS Guidelines
- Maintain consistent naming conventions for CSS classes
- Use CSS variables for theming
- Consider responsive design for all UI components
- Test changes across multiple viewport sizes
API Development
- Implement comprehensive input validation
- Use appropriate HTTP status codes
- Structure responses consistently
- Document API changes
Testing
- Write tests for new features and bug fixes
- Ensure all tests pass before submitting changes
- Follow existing test patterns in the codebase
Pull Request Process
- Verify all tests pass locally
- Update relevant documentation
- Provide a clear description of the changes
- Reference any related issues
- Request review from appropriate team members