Skip to content

IR35 Voice - A calculator of take-home amount in five different scenarios

License

Notifications You must be signed in to change notification settings

dobrevit/ir35voice

Repository files navigation

IR35 Tax Calculator & Payroll Management System

License TypeScript React Tests Build

A comprehensive React-based application for UK contractors, freelancers, and businesses to calculate take-home pay across all major employment scenarios under current IR35 legislation. Features a complete payroll management system with advanced tax calculations and business tools.

🚀 Key Features

Tax Calculation Engine

  • 5 Employment Scenarios: PAYE, Outside IR35 (full/capped), Inside IR35, Umbrella Company
  • Current UK Tax Rates (2024-25): Personal allowance £12,570, all tax bands, NI rates, corporation tax
  • Precise Calculations: Decimal arithmetic for accuracy, real-time updates
  • Advanced Analysis: Effective tax rates, detailed breakdowns, scenario comparison

Comprehensive Payroll System

  • Employee Management: Multiple employment types (PAYE, 0-Hours, Fixed Term, Apprentice, Director)
  • Holiday Management: Request tracking, accrual calculations, statutory entitlements
  • Expense Management: Mileage tracking, business expense categorization, VAT reclaim
  • Multi-Company Support: Separate data isolation for multiple business entities

Business Tools

  • Rate Matching Calculator: Find equivalent rates across different scenarios
  • Sustainability Analysis: Long-term financial planning and projections
  • Export Capabilities: PDF reports, CSV data, JSON configuration files
  • Professional Reporting: Comprehensive analysis and documentation

Data Security & Management

  • Encrypted Storage: Enterprise-grade encryption for sensitive data
  • Backup & Restore: Automatic backup with manual restore capabilities
  • Data Privacy: GDPR compliant with local storage only
  • Performance Optimized: Bundle size optimized (237kB main bundle)

📊 Calculation Examples

For a £500/day contractor (220 working days, £110k annual):

Scenario Net Income Effective Tax Rate Key Features
Outside IR35 (Capped) £69,000 21.4% Conservative £30k dividend cap
Outside IR35 (Full) £67,000 23.6% Optimal salary/dividend split
PAYE Employment £66,500 28.5% Standard employment
Inside IR35 £58,000 30.1% Deemed employment + 5% allowance
Umbrella Company £56,000 32.0% Holiday pay + umbrella fees

🛠 Technology Stack

Frontend

  • React 18.3.1 with TypeScript for type safety
  • Mantine UI for modern, accessible components
  • Recharts for interactive data visualization
  • Vite for fast development and optimized builds

State Management

  • Redux Toolkit for predictable state management
  • Redux Persist for data persistence
  • Custom hooks for business logic encapsulation

Testing & Quality

  • Vitest for unit and integration testing
  • React Testing Library for component testing
  • TypeScript for compile-time error checking
  • ESLint for code quality

🚀 Quick Start

Prerequisites

  • Node.js 18+ and npm/yarn
  • Modern web browser with ES2020 support

Installation

# Clone the repository
git clone https://github.com/dobrevit/ir35voice.git
cd ir35voice

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

# Run tests
npm test

Development

# Start with hot reload
npm run dev

# Build and preview production
npm run build
npm run preview

# Run tests in watch mode
npm run test:watch

# Type checking
npm run type-check

📋 Usage Guide

IR35 Tax Calculations

  1. Input Your Details: Daily rate, working days, business expenses
  2. Select Scenarios: Choose which employment types to compare
  3. Configure Settings: VAT registration, pension contributions, umbrella company
  4. Analyze Results: Compare net income, tax breakdowns, and effective rates
  5. Export Reports: Generate professional PDF or CSV reports

Payroll Management

  1. Add Employees: Multiple employment types with full CRUD operations
  2. Manage Holidays: Track requests, calculate accruals, statutory entitlements
  3. Process Expenses: Mileage tracking, business expense categorization
  4. Company Settings: Configure tax settings, company information
  5. Generate Reports: Payroll history, tax summaries, employee reports

Advanced Features

  • Rate Matching: Find equivalent daily rates across scenarios
  • Sustainability Analysis: Long-term financial planning
  • Multi-Company: Manage multiple business entities
  • Data Backup: Export/import complete datasets

🏗 Architecture

Component Structure

src/
├── components/           # React components
│   ├── MantineIR35Calculator.tsx    # Main calculator
│   ├── MantineTaxBreakdown.tsx      # Tax visualization
│   ├── EnhancedMantinePayrollTab.tsx # Payroll management
│   └── payroll/                     # Payroll components
├── store/                # Redux store
│   ├── calculatorSlice.ts           # Tax calculations
│   ├── employeeSlice.ts             # Employee management
│   └── holidaySlice.ts              # Holiday tracking
├── utils/                # Business logic
│   ├── taxCalculations.ts           # Tax engine
│   ├── modernStorage.ts             # Encrypted storage
│   └── encryptionHelpers.ts         # Security utilities
└── test/                 # Test suites

Key Design Principles

  • Separation of Concerns: Business logic separated from UI
  • Type Safety: Full TypeScript coverage
  • Performance: Optimized bundle splitting and lazy loading
  • Accessibility: WCAG compliant with ARIA labels
  • Security: Encrypted local storage, no external data transmission

🧪 Testing

Comprehensive test suite with 83 passing tests covering:

  • Tax Calculations: All scenarios and edge cases
  • Component Rendering: UI components and interactions
  • Data Storage: Encryption, backup, and restore
  • Business Logic: Employee management, holiday calculations
# Run all tests
npm test

# Run specific test suite
npm test -- taxCalculations.test.ts

# Generate coverage report
npm run test:coverage

🔧 Configuration

Environment Variables

# Development
VITE_NODE_ENV=development
VITE_DEBUG_MODE=true

# Production
VITE_NODE_ENV=production
VITE_DEBUG_MODE=false

Build Configuration

  • Bundle Analysis: Optimized chunks for performance
  • Tree Shaking: Unused code elimination
  • Code Splitting: Vendor and feature-based chunks
  • Compression: Gzip optimization for web delivery

📈 Performance Metrics

  • Main Bundle: 237.81 kB (gzipped: 76.31 kB)
  • Charts: 393.15 kB (lazy-loaded)
  • Build Time: ~3.5 seconds
  • Test Coverage: 95%+ critical paths
  • Lighthouse Score: 95+ (Performance, Accessibility, SEO)

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make changes and add tests
  4. Ensure tests pass: npm test
  5. Commit changes: git commit -m 'Add amazing feature'
  6. Push to branch: git push origin feature/amazing-feature
  7. Open a Pull Request

Code Standards

  • TypeScript: Strict mode enabled
  • ESLint: Airbnb configuration with React hooks
  • Testing: Minimum 80% coverage for new features
  • Documentation: JSDoc comments for public APIs

📄 Legal & Compliance

Tax Calculation Disclaimer

This software provides tax calculations based on current UK legislation and should be used for guidance only. Always consult with a qualified accountant or tax advisor for professional advice. Tax rules and rates may change, and individual circumstances vary.

HMRC Compliance

Calculations are based on official HMRC guidance and current tax rates (2024-25). The software implements:

  • Current income tax bands and rates
  • National Insurance contributions (employee and employer)
  • Corporation tax calculations
  • VAT handling and thresholds
  • IR35 off-payroll working rules

Data Privacy

  • Local Storage Only: No data transmitted to external servers
  • Encryption: AES-256 encryption for sensitive data
  • GDPR Compliant: User controls data with export/delete capabilities
  • No Tracking: No analytics or user tracking implemented

📞 Support & Contact

Professional Services

Dobrev IT Ltd offers professional services for:

  • DevOps and IT consultancy
  • Enterprise deployments
  • Custom software development

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • HMRC: For providing comprehensive tax guidance and calculation methodologies
  • React Community: For excellent tools and libraries
  • Open Source Contributors: For the foundational libraries that make this project possible
  • UK Contractor Community: For feedback and real-world testing

Built with ❤️ by Dobrev IT Ltd for the UK contractor and business community.

About

IR35 Voice - A calculator of take-home amount in five different scenarios

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages