First off, thank you for considering contributing to Capitrack! It's people like you that make Capitrack such a great tool.
By participating in this project, you are expected to uphold our Code of Conduct:
- Be respectful and inclusive
- Be patient with newcomers
- Focus on constructive feedback
- Accept responsibility for your mistakes
Before creating bug reports, please check existing issues to avoid duplicates. When you create a bug report, include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the problem
- Provide specific examples to demonstrate the steps
- Describe the behavior you observed and what you expected
- Include screenshots if applicable
- Include your environment details (OS, Node.js version, browser)
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion:
- Use a clear and descriptive title
- Provide a detailed description of the proposed enhancement
- Explain why this enhancement would be useful
- List any alternatives you've considered
- Fork the repository and create your branch from
master - Follow the coding style of the project
- Add tests if you've added code that should be tested
- Ensure the test suite passes
- Update documentation as needed
- Write a clear commit message
- Node.js 18.x or higher
- npm 9.x or higher
# Clone your fork
git clone https://github.com/your-username/Capitrack.git
cd Capitrack
# Install dependencies
npm install
# Build TypeScript
npm run build
# Run in development mode
npm run dev
# Run tests
npm testcapitrack/
├── src/
│ ├── db/ # Database initialization and migrations
│ ├── middleware/ # Express middleware
│ ├── routes/ # API route handlers
│ ├── services/ # Business logic services
│ ├── types/ # TypeScript type definitions
│ ├── public/ # Frontend static files
│ │ ├── css/ # Stylesheets
│ │ └── js/ # Frontend JavaScript modules
│ └── server.ts # Express application entry point
├── tests/ # Test files
├── data/ # Database storage (gitignored)
└── dist/ # Compiled JavaScript output
- Use TypeScript for all new backend code
- Define interfaces for all data structures
- Use strict type checking
- The frontend uses vanilla JavaScript with ES modules
- Follow existing patterns for API calls and state management
- Use CSS custom properties for theming
- Follow the BEM-like naming convention used in the project
- Ensure styles work in both dark and light themes
- Write tests for new functionality
- Ensure all existing tests pass before submitting
Follow the conventional commits specification:
type(scope): description
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation onlystyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
Examples:
feat(accounts): add support for multiple currencies
fix(transactions): resolve calculation error in holdings
docs(readme): update installation instructions
- All submissions require review
- We aim to review pull requests within a week
- Feedback will be provided through GitHub's review system
- Changes may be requested before merging
Contributors will be recognized in our release notes. Thank you for helping make Capitrack better!
Feel free to open an issue with the "question" label if you have any questions about contributing.