Application Overview
Comprehensive overview of NkapBooks — a modern desktop accounting application for small and medium businesses.
1. Application Overview
1.1 What is NkapBooks?
NkapBooks is a modern, offline-first desktop accounting application designed for small and medium businesses, freelancers, and entrepreneurs. It provides a complete suite of financial management tools — from invoicing, inventory management, and point-of-sale to double-entry accounting and comprehensive reporting — all running natively on your desktop.
Built with a philosophy of simplicity and accessibility, NkapBooks eliminates the need for an accounting degree. Its clean, intuitive interface guides users through every financial workflow while maintaining the rigor of professional double-entry bookkeeping under the hood.
Core Philosophy
- Privacy First — All data is stored locally on your machine. No cloud dependency, no third-party data access.
- No Internet Required — Full functionality without an internet connection.
- Professional Grade — Double-entry accounting ensures accuracy and compliance.
- Accessible to Everyone — Designed so that anyone can manage their business finances without specialized training.
1.2 Key Highlights
| Feature | Description |
|---|---|
| Offline-First | All data is stored locally on your machine using SQLite. No internet connection is required for day-to-day operations. |
| Cross-Platform | Available natively for Windows (10+), macOS (11+), and Linux (Ubuntu 20.04+ and equivalents). |
| Double-Entry Accounting | Every transaction is recorded as a debit in one account and a credit in another, ensuring balanced and auditable books. |
| Multi-Currency | Handle transactions in multiple currencies with configurable exchange rates and currency formatting. |
| Multi-Company | Manage separate companies with completely independent database files. Switch between companies from the Database Selector screen. |
| Dual Database | Choose SQLite for simple, single-user local storage, or PostgreSQL for multi-user server-based environments. |
| Role-Based Access Control | Granular user permissions with customizable roles. Control who can view, create, edit, or delete each document type. |
| Dark Mode | Full dark mode support across the entire application with a smooth animated toggle transition. Accessible from the sidebar, login screen, setup wizard, and database selector. |
| Multi-Language (i18n) | Internationalized interface with 15+ language translations. Switch languages at any time — even before logging in — from the sidebar, login screen, or setup wizard. Supports RTL languages. |
| Point of Sale (POS) | Integrated retail POS system with profile-based configuration, session management, and keyboard shortcuts for fast transactions. |
| Inventory Management | Full stock tracking with stock movements, shipments, purchase receipts, batch tracking, serial numbers, and multi-location warehouses. |
| Customizable Print Templates | Design your own invoice and document templates using a built-in Template Builder with live preview. |
| Auto-Updates | Built-in update mechanism that checks for new versions, downloads them in the background, and prompts you to restart — with a visual progress overlay. |
| Licensing & Subscription | Tiered licensing model with a free trial period, entity-based limits, and seamless in-app license activation and upgrade flow. |
| Keyboard Shortcuts | Comprehensive keyboard shortcuts for power users across all major screens — global navigation, entry forms, list views, quick search, template builder, and POS. |
1.3 Technology Stack
NkapBooks is built with a modern, production-grade technology stack:
| Layer | Technology | Details |
|---|---|---|
| Frontend | Vue.js 3, TypeScript, Tailwind CSS | Composition API (<script setup>), reactive composables, scoped styles, RTL support via tailwindcss-rtl. |
| Desktop Runtime | Tauri 2 (Rust) | Native desktop shell with minimal resource usage. Provides system-level APIs for file dialogs, OS detection, shell commands, auto-updates, and secure storage. |
| Local Database | SQLite | Default database engine. Each company is a separate .db file stored locally. Zero configuration required. |
| Server Database | PostgreSQL (optional) | For multi-user, networked environments. Configured via the Database Selector with host, port, database name, username, password, and SSL mode. Includes a "Test Connection" feature. |
| State Management | Reactive composables | Application state is managed through Vue 3 reactive refs, composables (useAuth, useSessionManager, useLicense), and a global Fyo singleton that encapsulates database, documents, authentication, permissions, audit, telemetry, and backup services. |
| Build System | Vite | Fast development server (port 6969) with hot module replacement. Production builds via vite build. |
| Secure Storage | Tauri Stronghold | Encrypted key-value store for sensitive data such as PostgreSQL passwords and session tokens. |
| Package Format | MSI/EXE (Windows), DMG (macOS), AppImage/DEB/RPM (Linux) | Built via Tauri's bundler. Supports silent MSI installs for enterprise deployment. |
| Auto-Update | Tauri Updater Plugin | Checks update endpoint for new versions, downloads with progress tracking, and installs on restart. Uses Ed25519 signature verification. |
| Icons | Feather Icons | Lightweight, consistent SVG icon set used throughout the UI. |
| Internationalization | Custom t tagged template translation | Translation strings with language map lookup. Language can be switched at runtime from the sidebar, login screen, or setup wizard. |
| Number Formatting | Pesa (monetary math) | Precision-safe monetary calculations using the pesa library with configurable internal precision (default 11 digits) and display precision. |
| Date Handling | Luxon | Comprehensive date/time library for fiscal year calculations, date formatting, and locale-aware date display. |
| Code Editor | CodeMirror 6 | Used in the Template Builder for editing print template code with syntax highlighting and autocomplete. |
Architecture Overview
┌──────────────────────────────────────────────────────┐
│ Tauri Shell (Rust) │
│ ┌────────────┐ ┌──────────┐ ┌──────────────────┐ │
│ │ Updater │ │ FS │ │ Stronghold │ │
│ │ Plugin │ │ Plugin │ │ (Encrypted) │ │
│ └────────────┘ └──────────┘ └──────────────────┘ │
├──────────────────────────────────────────────────────┤
│ Vue.js 3 Frontend │
│ ┌──────────┐ ┌───────────┐ ┌──────────────────┐ │
│ │ Pages │ │Components │ │ Composables │ │
│ │ Dashboard │ │ Sidebar │ │ useAuth │ │
│ │ POS │ │ FormCtrl │ │ useSessionMgr │ │
│ │ Reports │ │ PrintView │ │ useLicense │ │
│ └──────────┘ └───────────┘ └──────────────────┘ │
├──────────────────────────────────────────────────────┤
│ Fyo Core Layer │
│ ┌──────────┐ ┌─────────┐ ┌─────────┐ ┌──────────┐ │
│ │DatabaseH.│ │ DocH. │ │ Auth │ │ Perm │ │
│ │(DB Demux)│ │(Models) │ │ Service │ │ Manager │ │
│ └────┬─────┘ └─────────┘ └─────────┘ └──────────┘ │
│ │ │
│ ┌────┴──────────────┬───────────────────┐ │
│ │ SQLite │ PostgreSQL │ │
│ │ (Local .db) │ (Remote Server) │ │
│ └───────────────────┴───────────────────┘ │
└──────────────────────────────────────────────────────┘
Key Internal Services (Fyo Singleton)
The global Fyo instance is the heart of NkapBooks. It orchestrates all core services:
| Service | Class | Purpose |
|---|---|---|
fyo.db | DatabaseHandler | Manages database connections (SQLite/PostgreSQL), schema maps, field maps, and raw queries. |
fyo.doc | DocHandler | Document lifecycle management — create, read, update, delete. Maintains a document cache (fyo.docs) and singleton cache (fyo.singles). |
fyo.auth | AuthService | User authentication, login/logout, session management, password hashing, and user registration. |
fyo.perm | PermissionManager | Role-based permission checks. Determines whether a user can read, create, update, delete, submit, or cancel a given document type. |
fyo.audit | AuditService | Audit trail logging. Can be disabled during setup operations and re-enabled afterward. |
fyo.telemetry | TelemetryManager | Anonymous usage telemetry (can be skipped via skipTelemetryLogging). |
fyo.backup | BackupManager | Database backup scheduling and execution. |
fyo.config | Config | Persistent local configuration storage (last database path, last database type, UI preferences). |
fyo.pesa | MoneyMaker | Precision-safe monetary math with configurable currency, internal precision, and display precision. |
1.4 Application Screens & Lifecycle
When NkapBooks launches, it progresses through a series of screens depending on the state of the user's data:
- Database Selector — Shown on first launch or when no previous database is remembered. Allows the user to create a new company (SQLite or PostgreSQL), open an existing
.dbfile, or connect to a PostgreSQL server. - Setup Wizard — Shown when a new database is created. Collects company name, admin credentials (full name, email, username, password), country, currency, bank name, chart of accounts template, and fiscal year dates. Displays a 7-stage progress overlay during setup.
- Login — Shown when authentication is required (
SystemSettings.requireAuthis enabled). Supports email/username + password login, "Remember me", password reset, language switching, and dark mode toggle. Can optionally be skipped ifallowSkipAuthis enabled. - Desk — The main application interface. Contains the collapsible sidebar (with navigation groups for Get Started, Dashboard, Sales, Purchases, Common Entries, POS, Inventory, Reports, and Setup) and the main content area with router views.
- Session Lock — Activated when the user's session times out due to inactivity (configurable via
SystemSettings.sessionTimeout, default 60 minutes). Requires re-authentication to unlock.
Sidebar Navigation Structure
The sidebar is organized into the following groups (visibility is controlled by role-based permissions and feature flags):
| Group | Items |
|---|---|
| Get Started | Onboarding checklist (hidden after completion) |
| Dashboard | Financial overview with charts and KPIs |
| Sales | Sales Quotes, Sales Invoices, Sales Payments, Customers, Sales Items, Loyalty Program*, Lead*, Pricing Rule*, Coupon Code* |
| Purchases | Purchase Invoices, Purchase Payments, Suppliers, Purchase Items |
| Common | Journal Entry, Party, Items, Price List |
| POS | POS Profiles, POS Sessions |
| Inventory | Stock Movement, Inventory Adjustment, Shipment, Purchase Receipt, Stock Ledger (report), Stock Balance (report) |
| Reports | General Ledger, Profit & Loss, Balance Sheet, Trial Balance |
| GST | GSTR1, GSTR2 (shown only if GSTIN is configured) |
| Setup | Chart of Accounts, Tax Templates, Import Wizard, Print Templates, Customize Form*, Users, Roles, Settings |
Items marked with * are shown only when their corresponding feature flag is enabled in Accounting Settings.
Sidebar Footer
The sidebar footer provides quick access to:
- Subscription — View and manage your license/subscription status
- User Profile — View logged-in user name, access User Settings, or Sign Out
- Language Switcher — Change the application language at any time
- Theme Toggle — Switch between Light Mode and Dark Mode with an animated ripple transition
- Shortcuts — Open the keyboard shortcuts reference modal