A comprehensive, professional-grade financial modeling tool for mergers & acquisitions (M&A). Model complex deal structures including earn-outs, seller financing, and all-cash scenarios with advanced analytics, risk assessment, and scenario planning.
- Deal Structure Modeling: Earn-out, seller financing, and all-cash payment scenarios
- Financial Projections: Multi-year cash flow analysis with growth and churn factors
- Real-time Calculations: Instant updates as you adjust parameters
- Sensitivity Analysis: Interactive sliders for real-time parameter testing
- Financial Metrics: NPV, IRR, and payback period calculations
- Monte Carlo Simulations: Probabilistic risk analysis with 1000+ scenarios
- Multi-currency Support: USD, EUR, GBP, JPY, CAD, AUD with inflation adjustments
- Scenario Management: Save, load, and compare multiple deal scenarios
- Data Import: CSV upload for historical revenue trends
- PDF Reports: Professional export with charts and detailed summaries
- Chart Visualization: Interactive bar charts with export capabilities
- Responsive Design: Mobile-first approach with touch-friendly interfaces
- Accessibility: WCAG compliant with ARIA labels and semantic HTML
- Progressive Web App: Offline functionality and installable experience
- Guided Onboarding: Tooltips and tutorials for new users
- Node.js 18+
- npm, yarn, pnpm, or bun
-
Clone the repository
git clone <repository-url> cd deal-simulator
-
Install dependencies
npm install # or yarn install # or pnpm install # or bun install
-
Run the development server
npm run dev # or yarn dev # or pnpm dev # or bun dev
-
Open your browser Navigate to http://localhost:3000
-
Input Parameters:
- Annual Revenue: Base revenue figure
- Churn Rate: Annual revenue loss percentage
- Growth Rate: Expected annual revenue increase
- Earn-out %: Percentage of revenue paid as earn-out
- Tax Rate: Applicable tax percentage
-
Advanced Options:
- Earn-out Years: Duration of earn-out payments
- Seller Financing: Percentage and interest rate
- All Cash: Upfront payment percentage
- Currency: Deal currency selection
- Inflation: Annual inflation rate
-
Analysis Features:
- Adjust sliders for real-time sensitivity analysis
- View financial metrics (NPV, IRR, payback period)
- Run Monte Carlo simulations for risk assessment
- Save Scenarios: Store current deal parameters for later use
- Load Scenarios: Retrieve and modify saved deals
- Compare Scenarios: Analyze multiple deal structures side-by-side
Upload CSV files with historical data:
year,revenue
2020,1000000
2021,1200000
2022,1400000The system will calculate average growth rates automatically.
- PDF Reports: Comprehensive deal summaries with charts
- Chart Export: PNG images of visualizations
- Scenario Sharing: Save and share deal configurations
- Frontend: Next.js 15, React 19, TypeScript
- Styling: Tailwind CSS 4, shadcn/ui components
- Charts: Recharts for data visualization
- Forms: React Hook Form with Zod validation
- PDF Generation: @react-pdf/renderer
- PWA: next-pwa for offline functionality
deal-simulator/
โโโ src/
โ โโโ app/ # Next.js app router
โ โ โโโ layout.tsx # Root layout
โ โ โโโ page.tsx # Main deal simulator page
โ โ โโโ globals.css # Global styles
โ โโโ components/ # React components
โ โ โโโ ui/ # shadcn/ui components
โ โ โโโ InputForm.tsx # Deal parameter input
โ โ โโโ ChartDisplay.tsx # Data visualization
โ โ โโโ SummaryCard.tsx # Results summary
โ โ โโโ DealSummaryPdf.tsx # PDF generation
โ โโโ lib/ # Business logic
โ โ โโโ calculations.ts # Financial calculations
โ โ โโโ schema.ts # Input validation
โ โ โโโ formatter.ts # Data formatting
โ โโโ types/ # TypeScript definitions
โ โโโ utils/ # Utility functions
โโโ public/ # Static assets
โ โโโ manifest.json # PWA manifest
โ โโโ fonts/ # Custom fonts
โโโ CONTEXT.md # Project context and roadmap
โโโ README.md # This file
- Deal scenario calculations
- Financial metrics (NPV, IRR, payback period)
- Monte Carlo simulation engine
- Multi-year cash flow projections
- Zod schemas for type-safe input validation
- Business logic constraints
- Error message handling
- InputForm: Parameter input with real-time validation
- ChartDisplay: Interactive data visualization
- SummaryCard: Results presentation with metrics
- ExportButton: PDF generation and download
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint- TypeScript: Strict type checking enabled
- ESLint: Code linting and formatting
- Prettier: Code formatting (via ESLint)
- Git Hooks: Pre-commit quality checks
# Run tests
npm run test
npm run test:watch
npm run test:coverageThe project includes comprehensive unit tests for:
- Financial calculations (NPV, IRR, Monte Carlo)
- Schema validation and input constraints
- Edge cases and error handling
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Run quality checks
npm run lint npm run build
- Commit your changes
git commit -m "feat: add amazing feature" - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow existing code style and patterns
- Add TypeScript types for new features
- Include comprehensive error handling
- Update documentation for new features
- Test on multiple devices/browsers
- Basic deal calculations (earn-out, financing, cash)
- Input validation and error handling
- Real-time sensitivity analysis
- Financial metrics (NPV, IRR, payback)
- Monte Carlo simulations
- Scenario management
- Data import/export
- PDF report generation
- PWA functionality
- Accessibility improvements
- User accounts and cloud storage
- Collaboration features
- Advanced financing structures
- Industry benchmarking
- API integrations
- Mobile app development
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js - The React framework
- shadcn/ui - Beautiful UI components
- Recharts - Chart library
- React Hook Form - Form handling
- Zod - Schema validation
For questions, issues, or contributions:
- Open an issue on GitHub
- Check the CONTEXT.md for project details
- Review the codebase for implementation examples
Built with โค๏ธ for the M&A community