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

FeatureDescription
Offline-FirstAll data is stored locally on your machine using SQLite. No internet connection is required for day-to-day operations.
Cross-PlatformAvailable natively for Windows (10+), macOS (11+), and Linux (Ubuntu 20.04+ and equivalents).
Double-Entry AccountingEvery transaction is recorded as a debit in one account and a credit in another, ensuring balanced and auditable books.
Multi-CurrencyHandle transactions in multiple currencies with configurable exchange rates and currency formatting.
Multi-CompanyManage separate companies with completely independent database files. Switch between companies from the Database Selector screen.
Dual DatabaseChoose SQLite for simple, single-user local storage, or PostgreSQL for multi-user server-based environments.
Role-Based Access ControlGranular user permissions with customizable roles. Control who can view, create, edit, or delete each document type.
Dark ModeFull 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 ManagementFull stock tracking with stock movements, shipments, purchase receipts, batch tracking, serial numbers, and multi-location warehouses.
Customizable Print TemplatesDesign your own invoice and document templates using a built-in Template Builder with live preview.
Auto-UpdatesBuilt-in update mechanism that checks for new versions, downloads them in the background, and prompts you to restart — with a visual progress overlay.
Licensing & SubscriptionTiered licensing model with a free trial period, entity-based limits, and seamless in-app license activation and upgrade flow.
Keyboard ShortcutsComprehensive 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:

LayerTechnologyDetails
FrontendVue.js 3, TypeScript, Tailwind CSSComposition API (<script setup>), reactive composables, scoped styles, RTL support via tailwindcss-rtl.
Desktop RuntimeTauri 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 DatabaseSQLiteDefault database engine. Each company is a separate .db file stored locally. Zero configuration required.
Server DatabasePostgreSQL (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 ManagementReactive composablesApplication 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 SystemViteFast development server (port 6969) with hot module replacement. Production builds via vite build.
Secure StorageTauri StrongholdEncrypted key-value store for sensitive data such as PostgreSQL passwords and session tokens.
Package FormatMSI/EXE (Windows), DMG (macOS), AppImage/DEB/RPM (Linux)Built via Tauri's bundler. Supports silent MSI installs for enterprise deployment.
Auto-UpdateTauri Updater PluginChecks update endpoint for new versions, downloads with progress tracking, and installs on restart. Uses Ed25519 signature verification.
IconsFeather IconsLightweight, consistent SVG icon set used throughout the UI.
InternationalizationCustom t tagged template translationTranslation strings with language map lookup. Language can be switched at runtime from the sidebar, login screen, or setup wizard.
Number FormattingPesa (monetary math)Precision-safe monetary calculations using the pesa library with configurable internal precision (default 11 digits) and display precision.
Date HandlingLuxonComprehensive date/time library for fiscal year calculations, date formatting, and locale-aware date display.
Code EditorCodeMirror 6Used 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:

ServiceClassPurpose
fyo.dbDatabaseHandlerManages database connections (SQLite/PostgreSQL), schema maps, field maps, and raw queries.
fyo.docDocHandlerDocument lifecycle management — create, read, update, delete. Maintains a document cache (fyo.docs) and singleton cache (fyo.singles).
fyo.authAuthServiceUser authentication, login/logout, session management, password hashing, and user registration.
fyo.permPermissionManagerRole-based permission checks. Determines whether a user can read, create, update, delete, submit, or cancel a given document type.
fyo.auditAuditServiceAudit trail logging. Can be disabled during setup operations and re-enabled afterward.
fyo.telemetryTelemetryManagerAnonymous usage telemetry (can be skipped via skipTelemetryLogging).
fyo.backupBackupManagerDatabase backup scheduling and execution.
fyo.configConfigPersistent local configuration storage (last database path, last database type, UI preferences).
fyo.pesaMoneyMakerPrecision-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:

  1. 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 .db file, or connect to a PostgreSQL server.
  2. 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.
  3. Login — Shown when authentication is required (SystemSettings.requireAuth is enabled). Supports email/username + password login, "Remember me", password reset, language switching, and dark mode toggle. Can optionally be skipped if allowSkipAuth is enabled.
  4. 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.
  5. 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.

The sidebar is organized into the following groups (visibility is controlled by role-based permissions and feature flags):

GroupItems
Get StartedOnboarding checklist (hidden after completion)
DashboardFinancial overview with charts and KPIs
SalesSales Quotes, Sales Invoices, Sales Payments, Customers, Sales Items, Loyalty Program*, Lead*, Pricing Rule*, Coupon Code*
PurchasesPurchase Invoices, Purchase Payments, Suppliers, Purchase Items
CommonJournal Entry, Party, Items, Price List
POSPOS Profiles, POS Sessions
InventoryStock Movement, Inventory Adjustment, Shipment, Purchase Receipt, Stock Ledger (report), Stock Balance (report)
ReportsGeneral Ledger, Profit & Loss, Balance Sheet, Trial Balance
GSTGSTR1, GSTR2 (shown only if GSTIN is configured)
SetupChart 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.

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