A comprehensive, offline-first Amazon FBA profitability calculator designed specifically for the Indian marketplace. Built with React + TypeScript + Vite, this tool helps Amazon sellers calculate accurate FBA fees and profit margins for their product portfolio.
- Bulk ASIN Management: Import and manage thousands of ASINs via manual entry or CSV upload
- Live Data Integration: Fetch real-time product data, pricing, and specifications from Keepa API
- Comprehensive Fee Calculation: Calculate all Amazon India FBA fees including:
- Referral fees (category-based percentage)
- Closing fees (price-range and seller-type based)
- Shipping fees (weight and size-tier based)
- Storage fees (volume-based)
- GST/Tax calculations (18%)
- Configurable Fee Masters: Import and manage fee structures via CSV with specialized parsers
- Category Mapping: Intelligent mapping between Keepa categories and fee categories
- Node ID Mapping: Direct category node ID mapping for precise fee calculations
- Fuzzy Matching: Advanced category matching algorithms for accurate fee application
- Performance Optimized: Client-side pagination and search for datasets with 20k+ entries
- Offline-First: IndexedDB persistence with hybrid server-sync fallback
- Export Capabilities: Export detailed profitability analysis to CSV
- Modern Dashboard: Clean, responsive interface with key metrics visualization
- Intuitive Navigation: Streamlined workflow from ASIN upload to profit analysis
- Real-time Status: Track fetch progress and calculation status for each ASIN
- Advanced Filtering: Search and filter by ASIN, title, category, and profitability metrics
- Frontend: React 19 + TypeScript
- Build Tool: Vite 6
- Styling: Tailwind CSS
- UI Components: Custom component library with Lucide React icons
- Data Storage: IndexedDB for client-side persistence
- API Integration: Keepa API for product data
- Data Processing: Custom CSV parsers with robust error handling
- Node.js 18+ and npm
- (Optional) Keepa API subscription for live data fetching
# Clone the repository
git clone <repository-url>
cd amazon-revenue-calculator
# Install dependencies
npm install
# Start development server
npm run dev# Create production build
npm run build
# Preview production build
npm run preview- API Configuration: Navigate to Dashboard โ API Configuration
- Keepa API Key: Enter your Keepa API subscription key
- User Authentication: Simple login with email/password
Configure Amazon India fee structures via the Fees page:
- Category-based percentage fees
- Support for multiple price tiers per category
- CSV import with header format:
Categories, Category Node, 0-300, 301-500, 501-1000, Above 1000
- Price-range based fixed fees
- Support for multiple seller types (FC, SF, ES, MFN)
- CSV import with format:
Categories, Category Node, FC0-300, FC301-500, FCAbove1000, SF0-300, etc.
- Weight and size-tier based fees
- Support for incremental calculation
- Size tiers: Standard, Heavy, Oversize
- Volume-based storage costs
- Configurable rates per cubic foot
- Map Keepa category names to fee categories
- Fuzzy matching for similar category names
- Node ID mapping for precise category matching
B08N5KWB9H
B07XJ8C8F7
B09XYZ1234
Format: ASIN, SizeTier (SizeTier is optional)
B08N5KWB9H, Standard
B07XJ8C8F7, Oversize
B09XYZ1234, Heavy
- Fetch Data: Click "Fetch" to retrieve product information from Keepa
- Force Refresh: Use "Force" to refresh all ASINs regardless of status
- Calculate: Run profitability calculations with current fee structures
- Export: Download results as CSV for external analysis
Categories,Category Node,0-300,301-500,501-1000,Above 1000
Electronics,1571272031,8,6,4,2
Books,,15,15,15,15Categories,Category Node,FC0-300,FC301-500,FC501-1000,FCAbove1000,SF0-300,SF301-500
Electronics,1571272031,26,46,86,166,35,55
Books,,15,25,35,45,20,30ASIN,SizeTier
B08N5KWB9H,Standard
B07XJ8C8F7,Oversize
B09XYZ1234,Heavyโโโ src/
โ โโโ App.tsx # Main application component
โ โโโ components/
โ โ โโโ Layout.tsx # Navigation and layout
โ โ โโโ ui/ # Reusable UI components
โ โ โโโ UserSettings.tsx # User configuration
โ โโโ services/
โ โ โโโ db.ts # IndexedDB operations
โ โ โโโ engine.ts # Core calculation engine
โ โโโ types.ts # TypeScript definitions
โ โโโ index.css # Global styles
โโโ public/
โ โโโ assets/ # Static assets
โโโ package.json
- localStorage: User settings, API keys, session data
- IndexedDB: Product data, fee structures, calculation results
- Server Sync: Optional backend integration for data synchronization
- Referral Fees: Node ID โ Category Mapping โ Name Match โ Fuzzy Match
- Closing Fees: Node ID โ Category Mapping โ Name Match โ Price Tier Fallback
- Shipping Fees: Size Tier โ Weight Range โ Incremental Calculation
- Storage Fees: Volume-based with dimension calculation
Net Profit = Price - (Referral Fee + Closing Fee + Shipping + Storage + Tax)
Margin % = (Net Profit / Price) ร 100
- Chunked Processing: API requests processed in chunks of 100 ASINs
- Client-side Pagination: Efficient handling of large datasets
- Bulk Operations: IndexedDB transactions optimized for large imports
- Retry Logic: Automatic retry with exponential backoff for API failures
API Connection Issues
Error: Invalid API Key
- Verify Keepa API key in Dashboard โ API Configuration
- Check API quota and subscription status
Calculation Errors
Error: Price is 0
- Ensure product data was fetched successfully
- Check ASIN validity and product availability
Import Failures
CSV appears empty
- Verify CSV format matches expected structure
- Check for special characters and encoding issues
Enable browser console logging for detailed calculation tracking:
[FeeCalc]prefixes show fee matching logic[Keepa]prefixes show API fetch progress
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript best practices
- Maintain backward compatibility for data structures
- Add appropriate error handling and logging
- Test with large datasets for performance validation
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Check the troubleshooting section above
- Review browser console for error messages
- Verify CSV formats match documentation
- Ensure Keepa API subscription is active
- Enhanced reporting with charts and graphs
- Multi-marketplace support (US, EU, etc.)
- Advanced profit optimization recommendations
- Integration with additional data sources
- Automated fee structure updates
- Mobile-responsive design improvements
Built with โค๏ธ for Amazon FBA Sellers
Accurate fee calculations for profitable selling on Amazon India
