Skip to content
Kuldip Kumar SahSenior Frontend Engineer
Back to projects
Project case studyBusiness / FinTech tooling

Spreadsheet-first business management

TallyLite

TallyLite — business operations on top of a user-owned Google Sheet.

TallyLite explores a different constraint from a traditional SaaS backend: the customer owns the datastore. The application has to provide reliable business workflows while reading and writing structured records through the Google Sheets API.

Sales₹84K
Due₹12K
Invoices326
GST
12
Primary app areasMetric 1
58
Test filesMetric 2
Google
Sheets datastoreMetric 3
GST
Invoice rulesMetric 4
Browser
Backup & exportMetric 5

Product surface

A product system, not a single screen.

TallyLite makes a user-owned Google Sheet behave like a structured business datastore while keeping GST, money, invoice, inventory, payment and reconciliation rules in testable application/domain layers.

Customers

Profiles, transaction context, outstanding balances and customer ledger workflows.

Products & Inventory

Stock movements, adjustments, receiving, returns and serialized inventory support.

Sales & Invoices

GST and non-GST invoicing with draft/finalized workflows and invoice numbering.

Payments

Cash, UPI, card, bank transfer, cheque and other payment tracking.

Reports & Ledger

Persisted transaction views, outstanding balances and business reporting.

Data portability

CSV/XLSX import/export plus browser-generated backup and restore workflows.

User-owned data

Google Sheets is the persistent V1 datastore instead of a hidden vendor database.

Layered domain design

Business rules remain independent from the Google Sheets adapter.

Money-safe calculations

Decimal.js and dedicated invoice/GST rules avoid casual floating-point arithmetic.

Persistence recovery

Mutation lifecycle, reconciliation and recovery code make remote spreadsheet writes observable.

Portable by default

Imports, exports, PDFs and backups are first-class product workflows.

Context / problem

A familiar spreadsheet is useful only if the application respects its constraints.

TallyLite keeps business data in a user-owned Google Sheet, which means persistence can be slower, rate-limited and externally edited. The product therefore needs explicit domain rules, observable writes and recovery behavior instead of pretending the spreadsheet is a local database.

  • 01Financial calculations must remain deterministic and testable outside the UI.
  • 02Remote spreadsheet mutations need honest saving, retry and reconciliation states.
  • 03Imports, exports and backups are core ownership features rather than secondary utilities.

System model

Business rules stay independent from the spreadsheet adapter.

The UI calls application services and domain rules through repository contracts. Google Sheets is one persistence implementation at the outside edge, so invoice, GST and inventory behavior can be tested without network access.

Domain + applicationMoney · GST · invoices · inventory · ledger · reconciliation

React UI

Business workflows and feedback states

Repository contracts

Persistence-independent boundary

Google Sheets

User-owned remote datastore

Import / export

CSV · XLSX · PDF · backup archives

Architecture

Treat the spreadsheet as an adapter, not the domain.

TallyLite separates React UI, application use cases, domain rules and repository contracts from the Google Sheets implementation. That keeps calculations testable and means persistence can evolve without rewriting invoice or inventory behavior.

Next.js / React UIDashboard and business workflows
Application servicesSales · payments · returns · reporting · reconciliation
Domain rulesMoney · GST · invoices · inventory · ledger · sequences
Repository contractsPersistence boundary independent from the UI
Google Sheets adapterUser-authorized spreadsheet reads and mutations

Key engineering decisions

The important work lives in the trade-offs.

Reject silent in-memory persistence in production

Constraint
A business app cannot pretend a save succeeded when the user-owned spreadsheet is not connected.
Decision
Runtime repositories require Google persistence outside tests and throw a persistence-required error rather than silently mutating temporary memory.
Result
The UI has an explicit connection state and business mutations do not disappear on refresh.

Queue and observe remote mutations

Constraint
Google API writes are remote, rate-limited and can outlive a quick UI interaction.
Decision
Persistence mutations are tracked through a queue/lifecycle layer with waiting, retrying and reconciliation states.
Result
Users receive honest saving feedback and mutation behavior becomes testable instead of invisible.

Keep financial rules out of components

Constraint
GST, invoice totals, payments and returns contain rules that become fragile when mixed into forms and tables.
Decision
Dedicated domain modules own money, GST, invoice, payment, inventory and ledger behavior.
Result
The calculations can be unit-tested without rendering the UI or calling Google APIs.

Make data portability a product capability

Constraint
A spreadsheet-first product should not trap the user in one UI or one browser session.
Decision
CSV/XLSX exchange, PDF generation and local backup/restore are part of the application architecture.
Result
The product complements user-owned data rather than replacing ownership with another silo.

Persistence engineering

Remote spreadsheets change the UX contract.

A normal local state update can feel instant. A Google Sheets mutation can be queued, rate-limited, retried or reconciled. TallyLite makes that lifecycle visible with persistence operation state instead of pretending the write is synchronous.

  • Concurrent reads are deduplicated at the store layer.
  • Mutation operations are tracked so saving, waiting and retrying states can be surfaced.
  • Production code requires persistent repositories rather than falling back to memory.
  • Backup and restore include validation and defensive handling for malformed archives.

What I learned

Data ownership is an architectural constraint, not a marketing line.

Once the user owns the spreadsheet, the product has to respect connection state, API quotas, reconciliation, portability and failure recovery. That constraint made the separation between domain behavior and persistence much more important.

  • Design domain rules so they can run without a network adapter.
  • Show persistence truthfully when remote writes are not immediate.
  • Use decimal-safe arithmetic for business money flows.
  • Protect import, backup and restore paths as carefully as normal CRUD flows.

Stack & boundaries

Tools grouped by responsibility.

Frontend

  • Next.js 16
  • React 19
  • TypeScript
  • Tailwind CSS
  • Radix UI
  • Lucide

State & forms

  • TanStack Query
  • TanStack Table
  • React Hook Form
  • Zod

Business data

  • Google Sheets API
  • Google Identity Services
  • Decimal.js
  • Repository pattern

Documents & quality

  • React PDF
  • XLSX
  • PapaParse
  • JSZip
  • Vitest
  • Playwright

Quality & scale

Quality is part of the architecture.

58Test files

Domain, persistence, Google integration, UI and end-to-end behavior are represented in the suite.

0Hidden production memory writes

Production paths require the persistent Google-backed repository mode.

LayeredBusiness rules

Application and domain modules sit above repository implementations.

PortableData model

The product is designed around user-owned spreadsheets and exportable business records.

Explore the project

Try TallyLite or inspect the source

Open the real product surfaces and source links that make up this case study.

What this project demonstrates

Engineering decisions should stay visible as the product grows.

TallyLite makes a user-owned Google Sheet behave like a structured business datastore while keeping GST, money, invoice, inventory, payment and reconciliation rules in testable application/domain layers.

Next projectServoraSaaS / Restaurant POS