Initial situation
ICC s.r.o. relied for years on an external accountant for double-entry bookkeeping, combined with the old eDane system for tax records. This setup brought three recurring issues:
- Decision latency — financial reports came with 2–3 weeks delay, blocking quick reactions.
- Cost of corrections — every change in an invoice or manual intervention meant a fee to the accounting office.
- Lack of integration — eDane did not allow direct reading of data from our systems; the complete VAT return was done by re-typing.
Goal
Build an own accounting system for the internal ICC ecosystem (and as a product also for smaller clients) that:
- maintains full double-entry accounting,
- automatically generates VAT returns from booked documents,
- supports multiple companies on a single installation (multi-tenant) with strict data isolation,
- maintains an immutable audit trail compatible with Slovak legislation.
Solution
Architecture: Multi-tenant pattern with tenant_id as a mandatory dimension in every table,
and a row-level security policy in PostgreSQL. Each tenant sees only their own accounting
documents — no cross-tenant leak is possible even with SQL bypass.
Accounting engine:
- Standard double-entry postings with debit = credit validation before commit.
- Chart of accounts configurable per tenant, default per Slovak structure.
- VAT groups mapped to specific return lines automatically.
- Document book with an immutable history record (insert-only audit log).
VAT automation:
- On invoice posting, the VAT group is automatically allocated by performance type + supplier country.
- Monthly/quarterly return is generated by SQL aggregation — without re-typing.
- XML export for the Financial Administration of the SR (FS SR e-portal upload).
Frontend: React 19 + Tailwind v4 (D-008) with a knowledge dashboard (cash flow trend, unpaid invoices, upcoming tax deadlines).
Results
- External accountant disconnected for ICC internal companies — all accounting actions happen in-house in real time.
- VAT return is generated automatically in 3–4 seconds instead of half a day of manual work.
- Multi-tenant isolation verified by penetration tests — no cross-tenant leak even when attempting SQL injection via API.
- Monthly review of financial statements within minutes instead of waiting for externally-processed reports.
Stack and infrastructure
Self-hosted on ANDROS, Docker Compose deployment per pattern P-003. Backup via restic + dual repo (local + Backblaze B2) per D-024 pattern. Deployed for internal ICC ecosystem companies as the first reference client.