Track your contractor income and automate Colombian social security calculations.
- Income Management: Track recurring income in USD with automatic TRM conversion
- TRM Integration: Auto-fetch Colombian Peso exchange rates
- Smart Calculations: Calculate contributions using direct and presumption of costs methods
- Local Storage: Store data securely in your browser with IndexedDB
- Excel Export: Generate professional reports for financial records

# Install dependencies
npm install
# Start development server
npm dev
- Navigate to the Settings tab
- Add your recurring income sources
- Configure your calculation preferences
- Go to the Income tab and select the month
- Enter USD amounts for each income source
- Select transaction dates
- Click "Fetch TRM" to get exchange rates (not available for future dates)
- View COP values calculated automatically
- Review the Social Security tab for contribution calculations
The app performs two calculation methods:
1. Direct Method
- Base calculation: 40% of income
- Health contribution: 12.5% of 40% of income
- Pension contribution: 16% of 40% of income
- Solidarity fund: Optional 1-2% if income exceeds 4 minimum wages
2. Presumption of Costs Method
- Uses a configurable percentage for presumed costs (default: 60%)
- Health contribution: 12.5% of income after costs
- Pension contribution: 16% of income after costs
- Solidarity fund: Applied if threshold is met
- Frontend: React + TypeScript
- State Management: React Context API
- Styling: Tailwind CSS + shadcn/ui
- Data Storage: LocalForage (IndexedDB wrapper)
- API Integration: Axios for TRM fetching
- Notifications: React Hot Toast for user feedback
- Exports: ExcelJS for report generation
social-security-tracker/
βββ public/ # Static assets
βββ src/ # Application source code
β βββ components/ # React components
β β βββ ui/ # UI component library
β βββ contexts/ # React contexts
β β βββ AppContext # Main application state
β βββ hooks/ # Custom React hooks
β βββ utils/ # Utility functions
β β βββ trmService.ts # TRM fetching service
β β βββ exportService.ts # Excel export
β β βββ toastUtils.ts # Toast notifications
β βββ App.tsx # Main application component
β βββ index.tsx # Entry point
βββ package.json # Dependencies
All data is stored locally in your browser using IndexedDB. The application only sends requests to external services when fetching TRM values.
- Exchange rates are fetched from
trm-colombia.vercel.app
- Only the date is sent; no personal data is transmitted
- Future dates are automatically detected and won't trigger API calls
- Manual entry is provided when TRM fetching is unavailable
# Run linting
npm run lint
# Format code
npm run format
# Build production version
npm run build
- MIT license
- Copyright 2025 Β© Juan AlegrΓa