EN DE

Ktool: What Happens When Calculations Leave Excel

Ktool is a tech demo, extracted from a real client project. A web-based calculation platform with real-time collaboration, revision safety, and clean architecture. From the database schema to the calculation logic to the PWA: all built by one person.

The Problem with Excel

In many companies, Excel files are the backbone of calculation. Prices, quantities, margins, everything lives in cells and formulas that have grown over years. What started as a quick solution becomes a risk: an overwritten formula, a broken reference, a shared password on the network drive. Whoever saved last wins. Or breaks everything.

Ktool moves calculations into a dedicated web application. React and Tailwind on the frontend, Go and PostgreSQL on the backend. Self-hosted, no vendor lock-in. The business logic is intentionally kept generic in the demo. In a real project, we define the rules together. The tool adapts to your business logic, not the other way around.

Login Screen

Real-Time Collaboration

Multiple users work simultaneously on the same project. Changes to positions, outlets, and metadata are pushed to all connected clients via WebSocket instantly. No polling, no delay. Who is currently connected is displayed live.

Two browser windows side by side. User A changes a position, User B sees the change immediately.

💡 The Difference to Excel

In Excel, "working simultaneously" often means: copy the file, rename it, hope for the best. In Ktool, everyone sees changes instantly. No conflicts, no file versions.

Revision Safety

Every calculation is tied to a specific calculation date. Prices are not retroactively overwritten but resolved at the reference date. The entire calculation path (raw prices, quantities, result) is traceable at all times.

Two browser windows side by side. User A changes a price, User B sees the change immediately.

Projects can be locked. When locking, a new revision is automatically created as a copy. The locked version remains untouched. This creates a seamless history.

Project is locked, new revision appears in the overview. Old revision is read-only.

✅ Not Just Data, the Logic Itself Is Versioned

Revision safety in Ktool goes beyond prices and quantities. The calculation logic itself is versioned via the calculation date. If business rules change, new rules apply from a specific date onward, without affecting previous calculations. Every past result remains fully reproducible with the logic that was valid at that time.

Business Logic: Isolated and Testable

The calculation logic lives in its own Go package with no dependencies on HTTP, database, or framework. Unit tests and benchmarks run in milliseconds. New calculation rules can be versioned via the calculation date without touching existing logic.

Every formula is tested and documented. No hidden cells, no broken references. In a joint project, this exact structure forms the foundation. The concrete rules we define together.

Permissions and Multi-Tenancy

Ktool comes with a full permissions and multi-tenancy system. Groups and permissions control access down to the route level. Organizations, users, and projects are cleanly separated. Each tenant only sees their own data. Authentication is decoupled; integration with external identity providers like Microsoft Entra ID, Google, or GitHub is prepared.

How the permissions system is configured in detail depends on the specific use case. The architecture is in place. The rest we figure out in the project.

Performance Through Caching

Users, permissions, and prices are kept in memory. The database is only contacted on changes or after expiry. Response times in the single-digit millisecond range. Price changes propagate event-driven via a SharedPriceCache to all open WebSocket connections.

User and Client Management

Create users, assign groups, set permissions, manage organizations. All through a central admin interface.

Admin interface: user is assigned to a group, permissions change immediately.

Tech Stack

  • Frontend: React, Vite, Tailwind CSS, installable as PWA
  • Backend: Go with Chi router, PostgreSQL, type-safe queries via sqlc
  • Real-time: WebSocket with pub/sub pattern, event-driven price distribution
  • i18n: Multilingual
  • Theming: Customizable color scheme
  • Hosting: Self-hosted, no cloud vendor lock-in

See for Yourself

The application is live at ktool.karlbreuer.com. Drop me a line at mail@karlbreuer.com, you'll get a test account and can explore the system yourself.

If you have a similar problem in your company, calculations that have outgrown Excel, processes that need their own application, let's talk. I take on architecture, development, and technical leadership. The business logic we figure out together.