A comprehensive web application for comparing tax, benefits, and cost of living across multiple countries. This tool helps individuals, digital nomads, and businesses understand their financial obligations and lifestyle costs in different jurisdictions.
- Multi-Country Comparison: Compare tax scenarios across multiple countries simultaneously
- Business Support: Support for various business types (production, trade, services, freelance, e-commerce)
- Family Benefits: Calculate family and children benefits (500+, 800+, Kindergeld, etc.)
- Cost of Living: Detailed cost of living comparisons across cities
- Custom Scenarios: Create and save custom business and family scenarios
- Interactive Visualizations: Charts and graphs for easy comparison
- Responsive Design: Works on desktop and mobile devices
- REST API: Programmatic access to tax and cost calculations
- CLI Interface: Command-line interface for quick calculations
- Node.js 18+ (LTS recommended)
- npm or yarn
- Git
-
Clone the repository:
git clone https://github.com/yourusername/tax-comparison-tool.git cd tax-comparison-tool -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open http://localhost:3000 in your browser
tax-comparison-tool/
βββ src/ # Source code
β βββ components/ # React components
β βββ contexts/ # React contexts
β βββ pages/ # Page components
β βββ services/ # Business logic and API clients
β βββ utils/ # Utility functions
β βββ __tests__/ # Test files
βββ public/ # Static files
βββ data/ # Data files
β βββ countries/ # Country-specific data
β βββ benefits.json # Benefits data
β βββ cost-of-living/ # Cost of living data
βββ scripts/ # Utility scripts
βββ .github/ # GitHub configurations
βββ .vscode/ # VS Code settings
βββ dist/ # Build output
βββ coverage/ # Test coverage reports
βββ docs/ # Documentation
Key services in the application:
- Benefit Calculator: Handles calculation of various benefits
- Data Service: Manages loading and accessing country data
- Tax Calculator: Core tax calculation logic
The application uses a modular data structure with separate files for different aspects:
- Country-specific data in
data/countries/ - Benefits configuration in
data/benefits.json - Cost of living data in
data/cost-of-living/
Run tests using the following commands:
# Run all tests
npm test
# Run specific test suites
npm run test:unit # Unit tests
npm run test:api # API tests
npm run test:cli # CLI testsContributions are welcome! Please see our Contributing Guidelines for details.
This project is licensed under the MIT License - see the LICENSE file for details. β β βββ eventHandlers.js β β βββ tableUpdater.js β β βββ taxCalculator.js β β βββ templateLoader.js β βββ app.js # Main application entry point βββ index.html # Main HTML file βββ README.md # This file
## Getting Started
1. **Prerequisites**
- Modern web browser (Chrome, Firefox, Safari, Edge)
- Node.js (for development)
2. **Installation**
```bash
# Clone the repository
git clone https://github.com/founder-pl/form.git
cd form
# Install dependencies (if any)
npm install
# Start development server (if configured)
npm run dev
- Usage
- Open
index.htmlin your web browser - Select countries to compare
- Enter your financial and personal details
- View and compare tax scenarios
- Open
The application uses the following main data structures:
{
"PL": {
"name": "Poland",
"flag": "π΅π±",
"eu": true,
"vat": 23,
"taxIncome": {
"production": 19,
"trade": 19,
"services": 19,
"freelance": 12,
"ecommerce": 19
},
"socialSecurity": 1500,
"notes": "Additional country-specific notes"
}
}{
"maritalStatus": "single",
"spouseLocation": "PL",
"unemploymentStatus": "none",
"children": [
{
"name": "Anna",
"age": 5,
"isNewborn": false,
"isStudent": false,
"isDisabled": false
}
]
}The application is designed to be extensible. Here are the main extension points:
-
Adding New Countries
- Add country data to
data/countries.json - Add benefit information to
data/benefits.json
- Add country data to
-
Custom Tax Calculations
- Implement custom tax logic in
taxCalculator.js - Use the
getCustomTaxCalculationhook for country-specific rules
- Implement custom tax logic in
-
Additional Benefits
- Add new benefit types in
benefitCalculator.js - Update the UI components to display new benefit types
- Add new benefit types in
# Build for production
npm run build# Run tests
npm test- Follow Airbnb JavaScript Style Guide
- Use ESLint for code linting
- Write JSDoc comments for all functions
This project is licensed under the MIT License - see the LICENSE file for details.
- Bootstrap 5 for responsive design
- Font Awesome for icons
- All contributors who helped improve this tool
- Add more countries and regions
- Implement more detailed tax calculations
- Add support for historical tax rates
- Create user accounts for saving scenarios
- Add more visualization options (charts, graphs)
- Improve mobile experience
- Add more documentation and examples
