Challenge
The developer is building three cottage projects in the Lviv region. Some costs relate to a single house, while others, such as materials or work for several plots at once, are split between houses in different proportions. In spreadsheets, this kind of allocation quickly becomes opaque, and the cost of each house has to be calculated manually.
On top of that, there were other challenges:
- expenses are recorded in different currencies, and reports require the exchange rate on the transaction date;
- invoices and documents pile up as photos and files that have to be entered manually;
- some of the data already exists in Excel or CSV and has to be migrated without losses;
- besides construction, sales and rentals of completed properties need to be tracked.
Security was a separate issue. This is the owner's financial data, so access had to be limited to invited people only, with mandatory two-factor authentication and a full change history. A regular password is not enough for a system like this.
What we did
We built the system on Next.js 16, React 19, Tailwind CSS v4 and Supabase, deployed on Vercel. It has 16 screens and 12 database tables.
Modules
- houses and construction stages;
- expenses allocated across several houses, with shares that add up to 1, so not a single hryvnia is lost or counted twice;
- documents and invoices with AI recognition into a structured format;
- Excel and CSV import without AI, so migrating old data is predictable;
- sales and rentals;
- reports and user management.
Currency and exchange rate
Each expense stores the currency, the transaction rate and the NBU (National Bank of Ukraine) rate on the date. This way reports can be built in any currency without manual recalculation.
Security
- mandatory TOTP two-factor authentication required by the database itself: RLS policies only allow sessions with the aal2 level;
- an audit log through database triggers;
- the anonymous role has no permissions at all;
- self-registration is disabled, and new users join only through an invitation link;
- the application servers run in the same region as the database, in Frankfurt.
The system is built as a PWA, so it can be installed on a phone and expenses can be entered right from the construction site.
Results
The developer got one system for all three projects instead of a collection of spreadsheets. Expenses that relate to several houses are allocated by shares, so the cost of each house is calculated automatically.
What changed:
- every expense has a currency, a rate and the NBU rate on the date;
- old data from Excel and CSV is migrated through import;
- documents can be uploaded for AI recognition, with a person reviewing the result;
- sales and rentals are tracked in the same system as construction;
- thanks to the PWA, expenses can be entered from a phone.
To be honest about AI: document recognition is implemented, but we do not claim it has been tested on a large volume of real documents yet. That is exactly why the Excel and CSV import was built separately and without AI.
What makes this project special
Most accounting systems protect data with a password and, perhaps, a two-factor check on the login screen. Here, two-factor authentication is required at the database level: without a verified second factor, a data request simply will not go through, even if the interface is bypassed. Combined with the audit log through triggers, disabled registration and servers running in the same region as the database, this provides a level of protection that off-the-shelf solutions for small businesses usually lack.
The second feature is cost allocation across houses with a check that the shares add up to 1. This is the very detail that usually makes spreadsheets stop adding up.
Published: · Updated: