A comprehensive Next.js application providing professional business calculators for EMI, ROI, business valuation, and break-even analysis. Built with TypeScript, TailwindCSS, and optimized for performance and SEO.
๐ Live Demo: bizzcalculator.com
- EMI Calculator - Calculate monthly EMI payments with detailed amortization schedule
- Business Valuation Calculator - Estimate business value using revenue multiples
- ROI Calculator - Calculate return on investment and annualized returns
- Break-Even Analysis - Determine break-even points for products and services
- Server-Side Rendering (SSR) - All calculator pages are SSR with query parameter support
- SEO Optimized - Complete SEO setup with next-seo, JSON-LD structured data, sitemap, and robots.txt
- Mobile-First Design - Responsive design with TailwindCSS
- Interactive Charts - Lazy-loaded Recharts for data visualization
- Cookie Consent - GDPR-compliant consent management
- Google Analytics - GA4 integration with consent-based loading
- Shareable URLs - All calculations can be shared via URL parameters
- Accessibility - WCAG compliant with proper ARIA labels
- Code Splitting - Lazy-loaded charts and components
- Bundle Optimization - Small initial bundle size
- Lighthouse Optimized - 90+ scores across all metrics
- Image Optimization - Next.js automatic image optimization
- Node.js 18+
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd bizcalculator-react- Install dependencies:
npm install- Set up environment variables:
cp env.example .env.localEdit .env.local with your configuration:
NEXT_PUBLIC_GA_ID=G-XXXXXXXXXX
NEXT_PUBLIC_AD_CLIENT_ID=ca-pub-xxxxxxxxxx
NEXT_PUBLIC_AD_SLOT_ID=xxxxxxxxxx
NEXT_PUBLIC_SITE_URL=https://sample-site-name.com- Run the development server:
npm run devOpen http://localhost:3000 in your browser.
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run test- Run unit testsnpm run test:watch- Run tests in watch modenpm run test:coverage- Run tests with coveragenpm run test:e2e- Run end-to-end testsnpm run test:e2e:ui- Run e2e tests with UInpm run test:e2e:headed- Run e2e tests in headed mode
src/
โโโ app/ # Next.js app directory
โ โโโ calculator/ # Calculator pages
โ โ โโโ emi-loan/ # EMI calculator page
โ โ โโโ business-valuation/
โ โ โโโ roi-calculator/
โ โ โโโ break-even-analysis/
โ โโโ globals.css # Global styles
โ โโโ layout.tsx # Root layout
โ โโโ page.tsx # Home page
โ โโโ sitemap.ts # Sitemap generation
โ โโโ robots.ts # Robots.txt
โโโ components/ # React components
โ โโโ calculators/ # Calculator components
โ โ โโโ charts/ # Chart components
โ โ โโโ EMICalculator.tsx
โ โ โโโ BusinessValuationCalculator.tsx
โ โ โโโ ROICalculator.tsx
โ โ โโโ BreakEvenCalculator.tsx
โ โโโ ui/ # UI components
โ โโโ ConsentManager.tsx
โ โโโ ConsentWrapper.tsx
โ โโโ GoogleAnalytics.tsx
โ โโโ Navigation.tsx
โ โโโ SEO.tsx
โโโ constants/ # Constants and configuration
โโโ lib/ # Utility functions
โ โโโ calculations.ts # Calculation logic
โ โโโ utils.ts # Utility functions
โโโ types/ # TypeScript type definitions
โโโ hooks/ # Custom React hooks
- EMI Calculator:
/calculator/emi-loan - Business Valuation:
/calculator/business-valuation - ROI Calculator:
/calculator/roi-calculator - Break-Even Analysis:
/calculator/break-even-analysis
All calculators support URL parameters for sharing calculations:
- EMI:
?loan=1000000&rate=8.5&years=20 - Business Valuation:
?revenue=1000000&profitMargin=15&growthRate=10&discountRate=12 - ROI:
?initialInvestment=100000&finalValue=150000&timePeriod=2 - Break-Even:
?fixedCosts=50000&variableCosts=100&sellingPrice=200
- Meta Tags: Complete meta tag optimization
- Open Graph: Social media sharing optimization
- Twitter Cards: Twitter sharing optimization
- JSON-LD: Structured data for search engines
- Sitemap: Automatic sitemap generation
- Robots.txt: Search engine crawling instructions
- Canonical URLs: Proper canonical URL handling
npm run testnpm run test:e2enpm run test:coverage- Push your code to GitHub
- Connect your repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically
- Build the application:
npm run build- Start the production server:
npm run start| Variable | Description | Required |
|---|---|---|
NEXT_PUBLIC_GA_ID |
Google Analytics tracking ID | No |
NEXT_PUBLIC_AD_CLIENT_ID |
Google AdSense client ID | No |
NEXT_PUBLIC_AD_SLOT_ID |
Google AdSense slot ID | No |
NEXT_PUBLIC_SITE_URL |
Site URL for canonical links | Yes |
- Bundle Analysis: Use
npm run buildto analyze bundle size - Image Optimization: All images are optimized with Next.js
- Code Splitting: Charts and heavy components are lazy-loaded
- Caching: Proper cache headers for static assets
- Compression: Gzip compression enabled
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Mobile browsers (iOS Safari, Chrome Mobile)
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new features
- Run the test suite
- Submit a pull request
This project is licensed under the MIT License.
For support and questions, please open an issue on GitHub.