{"slug": "from-brython-to-react-typescript-how-i-built-42-math-file-utilities-100-in-the", "title": "From Brython to React + TypeScript: How I Built 42+ Math & File Utilities 100% in the Browser 🛠️🚀", "summary": "A developer built Ahtools, a browser-only suite of more than 42 math calculators, file parsers and cryptography utilities that runs entirely client-side with no backend storage. The project, started in 2021, was rewritten three times—from in-browser Python via Brython to vanilla JavaScript and finally to React 18, TypeScript 5.x and Vite, with AI-assisted refactoring—to cut transpilation overhead and eliminate silent type bugs in complex formulas. The live app is free to use, though the repository remains private.", "body_md": "In 2021, I just wanted to stop wasting time on repetitive calculations and broken files at work.\n\nI didn't want to spin up a server, configure a database, or pay for hosting. I just wanted to open a browser tab and solve the problem on the spot.\n\nFive years later, that simple page turned into **[Ahtools](https://delean-mafra.github.io/Ahtools/)**, a suite of over 42 mathematical calculators, file parsers, and cryptography utilities running 100% client-side.\n\nSpoiler: the codebase has been rewritten three times—moving from client-side Python in the browser, to vanilla JavaScript, and most recently to a full TypeScript and React refactor with the help of AI.\n\nGrab a coffee and let me walk you through how this architecture evolved. ☕👇\n\nWhen you deal with corporate spreadsheets, system logs, and sensitive records, sending files to an external API is always a liability.\n\nThat's why Ahtools was designed from day one around **Zero Backend Storage**. Everything runs inside the user's browser sandbox:\n\nInstead of juggling massive spreadsheets or scattered terminal scripts, I built dedicated calculation and data-processing engines straight into the app:\n\n`HH:MM` and decimal hours (`08:30 ⇄ 8.50h`), duration tracking across midnight rollovers, and proportional time-reduction multipliers (`60 / 52.5`, or `8/7`).` l`, `1`, `O`, `0`) and computing **Fisher-Yates** shuffle randomizer that outputs **SHA-256** sealed PDF receipts for auditable draws.\n\n**Parsers & File Engineering:** fixed-width positional file auditing (such as 240-column batch layouts with cent-level control totals), bidirectional **JSON ⇄ CSV** conversion with nested object flattening, invisible **UTF-8 BOM** stripping, local OCR powered by **Tesseract.js**, lossless PNG merging, PDF concatenation, and network latency/jitter diagnostics.\n\nI've been working on Ahtools since **2021**, adding and refining features almost every single day. Looking back, the project's architecture ended up documenting my own growth as a developer:\n\n| Phase | Core Stack | What Triggered the Shift | \n|---|---|---|\n| **1. The Beginning (2021)** | **Brython** | I wanted to write Python logic running directly in the browser, manipulating the DOM without setting up a backend. | \n| **2. Scale & Speed** | **Vanilla JavaScript** | As dozens of modules piled up, runtime Python-to-JS transpilation overhead became noticeable. Moving to pure JS gave instant load times. | \n| **3. Current Architecture** | **React 18 + TypeScript 5.x + Vite** | With AI-assisted code refactoring, I migrated the entire codebase to strict static typing and modular components. | \n\nEach phase solved the bottleneck of its time. Starting with Brython let me ship a working tool fast using a language I already loved, while migrating to strict TypeScript eliminated silent type bugs in complex math formulas and made maintaining 42+ tools in a single SPA sustainable.\n\nThe Ahtools repository remains private, as it started out as a personal toolbox built to solve real day-to-day support and operational bottlenecks.\n\nEven so, the live application is deployed, open, and completely free for anyone to test or use in their workflow:\n\n👉 **Try Ahtools live:** [https://delean-mafra.github.io/Ahtools/](https://delean-mafra.github.io/Ahtools/)\n\nIf there's one thing working on this project daily since 2021 has taught me, it's that you don't need the perfect stack to build something useful. You just need to solve a real problem today and make it 1% better tomorrow.\n\nI'd love to hear from other devs maintaining long-running side projects:\n\n🧠 What is the oldest side project you still actively maintain and improve today?\n\n🤖 Have you used AI to migrate a legacy codebase to TypeScript or React? What went smoothly, and what gave you a headache?\n\n🛠️ Which math utility or file parser do you wish existed 100% offline in your browser?\n\nDrop your thoughts in the comments—I'll reply to every one! 🙌\n\nBuilding every day at [Ahtools](https://delean-mafra.github.io/Ahtools/)\n\nFind me on GitHub (**@Delean-Mafra**) or connect with me on LinkedIn.", "url": "https://wpnews.pro/news/from-brython-to-react-typescript-how-i-built-42-math-file-utilities-100-in-the", "canonical_source": "https://dev.to/deleanmafra/from-brython-to-react-typescript-how-i-built-42-math-file-utilities-100-in-the-browser-356c", "published_at": "2026-11-26 01:36:36+00:00", "updated_at": "2026-11-26 01:44:39.668269+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["Ahtools", "Brython", "React", "TypeScript", "Vite", "Tesseract.js"], "also_reported_by": [], "takeaway": "Migrating a 42-tool browser suite from Brython to vanilla JS and then to strict TypeScript with React and Vite removed Python-to-JS transpilation overhead and caught silent type bugs in complex math formulas.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/from-brython-to-react-typescript-how-i-built-42-math-file-utilities-100-in-the", "markdown": "https://wpnews.pro/news/from-brython-to-react-typescript-how-i-built-42-math-file-utilities-100-in-the.md", "text": "https://wpnews.pro/news/from-brython-to-react-typescript-how-i-built-42-math-file-utilities-100-in-the.txt", "jsonld": "https://wpnews.pro/news/from-brython-to-react-typescript-how-i-built-42-math-file-utilities-100-in-the.jsonld"}}