A minimal calculator with subscription plans, deployed to calc.slopworks.org via GitHub Pages.
- React 19 + TypeScript
- Vite for dev server and production builds
- Tailwind CSS v4 via
@tailwindcss/vite - GitHub Actions for type-checked builds and Pages deployment
- REUSE-compliant licensing under AGPL-3.0-or-later
Requires Node.js 20+ and npm.
npm ci # install dependencies (CI-friendly)
npm run dev # Vite dev server on http://localhost:5173
npm run build # type check + production build into dist/
npm run preview # serve the built bundle locallyPushes to main trigger .github/workflows/deploy.yml, which:
- Installs dependencies with
npm ci. - Runs
tsc -bto type-check the project. - Builds the production bundle with
vite build. - Uploads
dist/as a GitHub Pages artifact and publishes it.
The custom domain calc.slopworks.org is configured via public/CNAME, which
Vite copies into dist/ during the build.
- In Settings → Pages, set Source to GitHub Actions.
- Add a DNS
CNAMErecord pointingcalc.slopworks.orgtoThe-Fisher-Slopworks-Co.github.io. - After the certificate is provisioned, enable Enforce HTTPS in Settings → Pages.
src/
├── App.tsx # composition root
├── main.tsx # ReactDOM entry, providers
├── index.css # Tailwind v4 theme + components
├── components/
│ ├── Calculator.tsx # keypad and display
│ ├── Paywall.tsx # mandatory subscription modal
│ ├── LanguageSwitcher.tsx # EN/RU toggle
│ └── ToastHost.tsx # toast context + renderer
├── hooks/
│ └── useCalculator.ts # calculator state machine
├── i18n/
│ ├── LanguageProvider.tsx # context, detection, persistence
│ └── translations.ts # EN and RU dictionaries
└── lib/
└── format.ts # number formatting helper
AGPL-3.0-or-later. See LICENSE.
The repository is REUSE compliant: every file
declares its copyright and license either inline (via SPDX-FileCopyrightText
and SPDX-License-Identifier headers) or through REUSE.toml. Compliance
is verified on every push by .github/workflows/reuse.yml.
Code of Conduct, contributing, and security policy are inherited org-wide from
The-Fisher-Slopworks-Co/.github.