Skip to content

A professional calculator designed for entrepreneurs to calculate revenues and profits using various tax accounting methods. Adapted to Polish law.

License

Notifications You must be signed in to change notification settings

damianczer/Calculator-B2B

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Calculator B2B

Smart B2B Financial Calculator

GitHub stars GitHub watchers GitHub issues Live Demo

Technology Version Purpose
React 19.2.3 Modern UI Framework
TypeScript 5.9.3 Type-safe development
Tailwind CSS 3.4.1 Utility-first CSS framework
Vite 7.3.0 Next generation frontend tooling
i18next 25.7.3 Internationalization framework
React Router 7.11.0 Client-side routing

Comprehensive B2B financial calculator with tax calculations, currency conversion, and detailed guides for Polish entrepreneurs.

Key Features & Capabilities:

  • Advanced Tax Calculator - Calculate revenue, costs, and taxes for different business forms (Flat Tax, Tax Scale, Lump Sum).
  • Real-time Currency Converter - Live exchange rates from NBP and CoinGecko APIs.
  • Comprehensive Tax Guide - Detailed explanations of Polish tax systems for businesses.
  • Multi-page Application - Dedicated pages for Calculator, Currencies, Company Info, and Tax Guide.
  • Dark & Light Mode - Fully customizable theme with smooth transitions.
  • Polish & English Translations - Complete internationalization support.
  • Persistent Settings - Remembers your preferences across sessions.
  • 100% Client-Side - Your financial data never leaves your browser.
  • Optimized for Production - Efficiency, safety, and accessibility.

πŸ“ Project Architecture

Calculator-B2B/
β”œβ”€β”€ application/
β”‚   β”œβ”€β”€ public/                         # Static assets
β”‚   β”‚
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ calculator/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ CostsCard.tsx       # Business costs input
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ResultsCard.tsx     # Calculation results display
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ RevenueCard.tsx     # Revenue input
β”‚   β”‚   β”‚   β”‚   └── SettingsCard.tsx    # Calculator settings
β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”œβ”€β”€ common/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Button.tsx          # Reusable button component
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Card.tsx            # Card container
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ CardHeader.tsx      # Card header with title
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ComingSoonPage.tsx  # Coming soon placeholder
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ CustomDropdown.tsx  # Dropdown selector
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ EmptyState.tsx      # Empty state component
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ErrorBoundary.tsx   # Error handling wrapper
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ FormField.tsx       # Form input field
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ icons.tsx           # Icon components
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ LegalPage.tsx       # Legal page template
β”‚   β”‚   β”‚   β”‚   └── LoadingSpinner.tsx  # Loading indicator
β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”œβ”€β”€ currency/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ CurrencyCard.tsx    # Currency info card
β”‚   β”‚   β”‚   β”‚   └── CurrencyConverter.tsx # Currency conversion UI
β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”œβ”€β”€ guide/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ComparisonTable.tsx # Tax system comparison
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ GuideSection.tsx    # Guide section wrapper
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ InfoBox.tsx         # Information box
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ItemList.tsx        # List component
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ TableOfContents.tsx # Navigation for guide
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ TaxRateBox.tsx      # Tax rate display
β”‚   β”‚   β”‚   β”‚   └── sections/
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ FlatTaxSection.tsx     # Flat tax guide
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ IntroSection.tsx       # Introduction
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ LumpSumSection.tsx     # Lump sum guide
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ SummarySection.tsx     # Summary
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ TaxScaleSection.tsx    # Tax scale guide
β”‚   β”‚   β”‚   β”‚       └── WhenSection.tsx        # When to use guide
β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   └── layout/
β”‚   β”‚   β”‚       β”œβ”€β”€ Footer.tsx          # App footer
β”‚   β”‚   β”‚       β”œβ”€β”€ Header.tsx          # App header with navigation
β”‚   β”‚   β”‚       └── Layout.tsx          # Main layout wrapper
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ constants/
β”‚   β”‚   β”‚   β”œβ”€β”€ app.ts                  # App-wide constants
β”‚   β”‚   β”‚   β”œβ”€β”€ config.ts               # Configuration values
β”‚   β”‚   β”‚   β”œβ”€β”€ currency.ts             # Currency constants
β”‚   β”‚   β”‚   β”œβ”€β”€ routes.ts               # Route definitions
β”‚   β”‚   β”‚   └── styles.ts               # Style constants
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ contexts/
β”‚   β”‚   β”‚   β”œβ”€β”€ LanguageContext.tsx     # Language state management
β”‚   β”‚   β”‚   └── ThemeContext.tsx        # Theme provider & logic
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”‚   β”œβ”€β”€ useActiveSection.ts     # Active section tracking
β”‚   β”‚   β”‚   β”œβ”€β”€ useCalculatorOptions.ts # Calculator options hook
β”‚   β”‚   β”‚   β”œβ”€β”€ useCurrencyConverter.ts # Currency conversion logic
β”‚   β”‚   β”‚   β”œβ”€β”€ useCurrencyRates.ts     # Currency rates fetching
β”‚   β”‚   β”‚   β”œβ”€β”€ useLanguage.ts          # Language management hook
β”‚   β”‚   β”‚   └── useTheme.ts             # Theme state hook
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ i18n/
β”‚   β”‚   β”‚   β”œβ”€β”€ config.ts               # i18next configuration
β”‚   β”‚   β”‚   └── locales/
β”‚   β”‚   β”‚       β”œβ”€β”€ en.json             # English translations
β”‚   β”‚   β”‚       └── pl.json             # Polish translations
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ CalculatorPage.tsx      # Main calculator page
β”‚   β”‚   β”‚   β”œβ”€β”€ CompanyPage.tsx         # Company information page
β”‚   β”‚   β”‚   β”œβ”€β”€ CurrenciesPage.tsx      # Currency converter page
β”‚   β”‚   β”‚   β”œβ”€β”€ GuidePage.tsx           # Tax guide page
β”‚   β”‚   β”‚   β”œβ”€β”€ PrivacyPolicyPage.tsx   # Privacy policy
β”‚   β”‚   β”‚   β”œβ”€β”€ TermsOfServicePage.tsx  # Terms of service
β”‚   β”‚   β”‚   └── UOPPage.tsx             # UOP calculator page
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   └── currency/
β”‚   β”‚   β”‚       β”œβ”€β”€ currency.service.ts # Currency service facade
β”‚   β”‚   β”‚       └── clients/
β”‚   β”‚   β”‚           β”œβ”€β”€ base.client.ts      # Base API client
β”‚   β”‚   β”‚           β”œβ”€β”€ coingecko.client.ts # CoinGecko API
β”‚   β”‚   β”‚           └── nbp.client.ts       # NBP API client
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ types/
β”‚   β”‚   β”‚   β”œβ”€β”€ calculator.ts           # Calculator type definitions
β”‚   β”‚   β”‚   β”œβ”€β”€ components.ts           # Component prop types
β”‚   β”‚   β”‚   β”œβ”€β”€ currency.ts             # Currency types
β”‚   β”‚   β”‚   β”œβ”€β”€ guide.ts                # Guide types
β”‚   β”‚   β”‚   └── i18n.ts                 # i18n types
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”‚   β”œβ”€β”€ cache.ts                # Caching utilities
β”‚   β”‚   β”‚   β”œβ”€β”€ cookies.ts              # Cookie management
β”‚   β”‚   β”‚   β”œβ”€β”€ format.ts               # Formatting helpers
β”‚   β”‚   β”‚   └── guideHelpers.ts         # Guide helper functions
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ App.tsx                     # Root component with providers
β”‚   β”‚   β”œβ”€β”€ main.tsx                    # React DOM rendering entry point
β”‚   β”‚   └── index.css                   # Global styles & Tailwind imports
β”‚   β”‚
β”‚   β”œβ”€β”€ index.html                      # HTML entry point
β”‚   β”œβ”€β”€ package.json                    # Dependencies & scripts
β”‚   β”œβ”€β”€ tsconfig.json                   # TypeScript configuration
β”‚   β”œβ”€β”€ tsconfig.app.json               # App-specific TS config
β”‚   β”œβ”€β”€ tsconfig.node.json              # Node-specific TS config
β”‚   β”œβ”€β”€ vite.config.ts                  # Vite build configuration
β”‚   β”œβ”€β”€ tailwind.config.js              # Tailwind CSS configuration
β”‚   β”œβ”€β”€ postcss.config.js               # PostCSS configuration
β”‚   β”œβ”€β”€ eslint.config.js                # ESLint rules & plugins
β”‚   └── .gitignore
β”‚
β”œβ”€β”€ LICENSE                             # MIT License
└── README.md                           # Project documentation

βš’οΈ Installation & Setup

Prerequisites

- Node.js 18.0.0 or higher
- npm 7.0.0 or higher (or yarn/pnpm equivalent)
- Modern web browser (Chrome, Firefox, Safari, Edge)

Quick Start

# 1️⃣ Clone the repository
git clone https://github.com/damianczer/Calculator-B2B.git

# 2️⃣ Navigate to project directory
cd Calculator-B2B/application

# 3️⃣ Install dependencies
npm install

# 4️⃣ Start development server
npm run dev

# πŸŽ‰ Application will open at http://localhost:5173

Build for Production

# Create optimized production build
npm run build

# Production files will be in the 'dist' folder
# Deploy the entire dist folder to your web hosting

# Optional: Preview production build locally
npm run preview

Additional Commands

# Run ESLint for code quality
npm run lint

# Type checking
npm run build

πŸ“œ License

Copyright Β© 2025 Damian CzerwiΕ„ski

This project is copyrighted and proprietary software.
All rights reserved.

Unauthorized copying, modification, distribution, or use of this software,
via any medium, is strictly prohibited without explicit written permission
from the copyright holder.

For licensing inquiries or permission requests:
πŸ“§ Email: [email protected]
🌐 Web: https://www.damianczerwinski.pl

Made with ❀️ and β˜• by Damian CzerwiΕ„ski

Building beautiful, functional web experiences one component at a time

About

A professional calculator designed for entrepreneurs to calculate revenues and profits using various tax accounting methods. Adapted to Polish law.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages