Hisaab Pro is a professional-grade, local-first business ledger system designed for small to medium retail businesses. Built with security and performance in mind, it operates entirely offline on Windows platforms (Windows 7+ optimized) with encrypted SQLite storage, providing instant response times without internet dependency or cloud subscriptions.
- Overview
- Key Features
- Tech Stack
- Quick Start
- Project Structure
- Core Modules
- Security Features
- Configuration
- API Documentation
- Development
- Testing
- License
Hisaab Pro addresses the critical need for reliable, secure, and fast business accounting software that works without internet connectivity. Perfect for retail shops, small businesses, and enterprises requiring:
- Complete Data Privacy -- All data stays on your local machine
- Professional Accounting -- Double-entry bookkeeping with comprehensive reporting
- Staff Management -- Integrated payroll and attendance tracking
- Multi-FY Support -- Seamless financial year switching with isolated databases
- Enterprise Security -- Database encryption with automatic threat response
- USB Portability -- Run directly from USB drives with WAL mode reliability
- Real-time Overview: Sales metrics, outstanding balances, cash/bank positions
- Interactive Charts: Visual revenue trends and expense analysis (Chart.js)
- Quick Actions: Fast access to common tasks and recent transactions
- Sales Management: Complete invoicing with tax calculation (GST ready), itemized bills, payment tracking
- Purchase Tracking: Supplier management with purchase orders and payment status
- Payment Processing: Incoming/outgoing payments with multiple modes (Cash, Bank, UPI, Cheque)
- Multi-Currency Support: Configurable currency with locale-based formatting (INR optimized)
- Chart of Accounts: Dynamic account types (Customer, Supplier, Cash, Bank, Expense, Revenue, Staff)
- Double-Entry Ledger: Automatic transaction recording for all financial activities
- Account Statements: Detailed transaction history with running balances
- Account Groups: Organized grouping (Sundry Debtors, Sundry Creditors, etc.)
- Employee Management: Staff profiles with salary/wage configuration
- Attendance Tracking: Daily attendance with present/absent/half-day/leave status
- Automated Payroll: Salary calculation based on attendance and configured wages
- Staff Accounts: Integrated staff ledger with payment history
- Daily Sales Reports: Transaction-level daily business summary
- Monthly Revenue: Period-wise revenue analysis with comparisons
- Debtor Aging Analysis: Outstanding receivable aging buckets
- Creditor Schedule: Payable aging and supplier balance reports
- Balance Sheet: Complete financial position statement
- Profit and Loss: Income statement with expense breakdown
- Database Encryption: AES-256 encryption for all SQLite databases
- Session Management: Secure HTTP-only session cookies with configurable timeouts
- Rate Limiting: API protection against brute-force attacks
- Audit Trail: Complete activity logging for compliance
- Auto-Wipe Protection: Configurable failed login attempt response
- Decoy Data: Support for plausible deniability with decoy records
- Financial Year Isolation: Each FY maintains a separate encrypted database
- Instant FY Switching: Context-aware database switching without restart
- Automated Backups: Scheduled backups with USB drive support
- Data Export: PDF invoices and reports with professional formatting
- Bill Scanning: Upload and link bill images to transactions
- Modern UI: Material Design 3 with Tailwind CSS
- Responsive Design: Works on desktops, tablets, and large screens
- Keyboard Shortcuts: Power-user features for fast data entry
- Print-Ready: A4 optimized invoices and reports
- Theme Support: Light/dark mode with customizable color schemes
- Runtime: Node.js (v14+ supported, v18 LTS recommended)
- Framework: Express.js with modular routing
- Database: SQLite with
better-sqlite3-multiple-ciphers(AES-256 encryption, WAL mode) - Authentication: bcryptjs with session-based auth
- Security: Helmet.js, CORS, express-rate-limit
- Core: Vanilla JavaScript (ES6+) -- No heavy frameworks
- Styling: Tailwind CSS with custom design system
- Icons: Material Symbols Outlined
- Typography: Inter and Manrope font families
- Charts: Chart.js for analytics visualization
- PDF Generation: jsPDF + html2canvas
- Hot Reload: Nodemon for development
- Validation: Zod for schema validation
- Logging: Custom logger with rotation support
- Testing: Jest with 357+ tests across 18 test files
- Node.js: Version 14.x to 19.x (18.x LTS recommended)
- Operating System: Windows 7, 10, or 11 (optimized for Windows)
- RAM: 2GB minimum (4GB recommended)
- Storage: 500MB free space (plus data storage)
-
Extract the project to your desired location
# Example: C:\HisaabPro\ -
Install Dependencies:
cd HisaabPro npm install -
Configure Your Shop (Optional): Edit
config.jsonto set your shop details:{ "shop": { "name": "Your Shop Name", "address": "Your Address", "phone": "+91-XXXXXXXXXX", "gstin": "YOUR_GSTIN" }, "currency": "INR", "tax_rate": 18 } -
Seed Database (Optional - for demo/testing):
npm run seed
This creates sample data for testing all features.
-
Start the Server:
npm start
Or for development with auto-reload:
npm run dev
-
Access the Application: Open your browser and navigate to:
http://localhost:3000Chrome/Chromium recommended for best experience.
For USB-based deployment, use the included start.bat script:
- Double-click
start.batto start the application - The script automatically starts the server and opens the browser
- Handles port conflicts gracefully
Important: Change these immediately after first login
- Username:
admin - Password:
admin123
hisaab-pro/
├── client/ # Frontend assets
│ ├── index.html # Login page
│ ├── signup.html # User registration
│ ├── dashboard.html # Main dashboard
│ ├── sales.html # Sales management
│ ├── purchases.html # Purchase management
│ ├── payments.html # Payment tracking
│ ├── accounts.html # Chart of accounts
│ ├── staff.html # Staff and payroll
│ ├── reports.html # Financial reports
│ ├── settings.html # Configuration
│ ├── css/ # Stylesheets
│ │ ├── style.css # Main stylesheet
│ │ └── print.css # Print optimizations
│ ├── js/ # JavaScript modules
│ │ ├── api.js # API client
│ │ ├── auth.js # Authentication
│ │ ├── dashboard.js # Dashboard logic
│ │ ├── sales.js # Sales module
│ │ ├── purchases.js # Purchases module
│ │ ├── payments.js # Payments module
│ │ ├── accounts.js # Accounts module
│ │ ├── staff.js # Staff management
│ │ ├── reports.js # Reports generation
│ │ ├── settings.js # Settings management
│ │ ├── pdf.js # PDF export utilities
│ │ ├── shortcuts.js # Keyboard shortcuts
│ │ ├── tailwind-config.js# Tailwind configuration
│ │ └── utils.js # Shared utilities
│ └── assets/ # Static assets
│ ├── logo.png # Shop logo
│ ├── chart.min.js # Chart.js library
│ ├── jspdf.umd.min.js # jsPDF library
│ └── html2canvas.min.js # html2canvas library
├── server/ # Backend application
│ ├── index.js # Express server entry point
│ ├── config.js # Configuration loader
│ ├── db/ # Database layer
│ │ ├── database.js # Database adapter with encryption and WAL mode
│ │ ├── schema.sql # Complete database schema
│ │ └── seed.js # Demo data generator
│ ├── modules/ # Feature modules (9 modules)
│ │ ├── auth/ # Authentication and authorization
│ │ ├── dashboard/ # Dashboard analytics
│ │ ├── sales/ # Sales management
│ │ ├── purchases/ # Purchase management
│ │ ├── payments/ # Payment processing
│ │ ├── accounts/ # Chart of accounts
│ │ ├── staff/ # Staff and payroll
│ │ ├── reports/ # Financial reporting
│ │ ├── settings/ # Settings management
│ │ └── uploads/ # File upload handling
│ └── shared/ # Shared utilities
│ ├── logger.js # Logging system
│ ├── validation.js # Input validation (Zod schemas)
│ ├── rate-limiter.js # API rate limiting
│ ├── paths.js # Path resolution
│ ├── fy-validator.js # Financial year validation
│ ├── roles.js # Role-based access control
│ └── utils.js # Shared utilities
├── scripts/ # Utility scripts
│ ├── backup.js # Automated backup system
│ ├── migrate.js # Database migrations
│ ├── verify_security.js # Security verification
│ ├── add-staff-link.js # Utility script
│ ├── download_assets.js # Asset downloader
│ └── tests/ # Test scripts
├── tests/ # Test suite (18 test files, 357+ tests)
│ ├── double-entry.test.js # Accounting integrity
│ ├── wal-mode.test.js # WAL mode verification
│ ├── atomic-writes.test.js # Data safety
│ ├── crash-simulation.test.js # Crash recovery
│ ├── full-restore.test.js # Restore functionality
│ ├── account-creation.test.js # Account workflows
│ ├── transaction-addition.test.js # Transaction workflows
│ ├── input-validation.test.js # Zod validation
│ ├── duplicate-payroll.test.js # Payroll prevention
│ ├── broken-references.test.js # FK constraints
│ ├── cross-pc-compat.test.js # USB compatibility
│ ├── drive-letters.test.js # Drive letter handling
│ ├── no-absolute-paths.test.js # Path safety
│ ├── usb-removal.test.js # Crash recovery
│ ├── usb-removal-integration.test.js # Integration tests
│ ├── usb-performance.test.js # Performance testing
│ ├── error-logging.test.js # Logging verification
│ └── no-silent-failures.test.js # Error handling
├── data/ # Data directory (created at runtime)
│ ├── hisaab.db # Active database (encrypted)
│ ├── uploads/ # Uploaded bill images
│ └── backups/ # Automated backups
├── logs/ # Log files (created at runtime)
│ └── app.log # Application logs
├── Docs/ # Documentation
│ ├── prd.md # Product requirements
│ ├── implementation_plan.md# Implementation details
│ ├── pre-launch-security-guide.md
│ ├── FINAL_LAUNCH_CHECKLIST.md
│ └── USB_PRODUCT_ROADMAP.md
├── website/ # Distribution website
│ └── index.html # Landing page
├── config.json # Runtime configuration
├── config.example.json # Configuration template
├── package.json # Node.js dependencies
├── jest.config.js # Jest configuration
├── nodemon.json # Nodemon configuration
├── start.bat # Windows startup script
├── CHANGELOG.md # Version history
├── LICENSE # MIT License
├── CLIENT_LICENSE.md # Commercial deployment terms
└── README.md # This file
- Secure login with bcrypt password hashing
- Session-based authentication with configurable timeouts
- Role-based access control (owner, cashier, accountant)
- Failed login tracking with auto-wipe protection
- Decoy user support for enhanced privacy
- Real-time business metrics
- Sales trends and analytics
- Outstanding receivables/payables
- Cash flow summary
- Low stock alerts (if inventory module added)
- Create and manage invoices
- Itemized billing with descriptions
- Tax calculation (GST compliant)
- Payment status tracking (paid/pending/partial)
- Invoice PDF generation
- Bill image attachment
- Sales return handling
- Supplier purchase orders
- Invoice tracking from suppliers
- Payment status management
- Tax calculation on purchases
- Purchase PDF generation
- Bill image attachment
- Purchase return handling
- Record incoming payments (from customers)
- Record outgoing payments (to suppliers)
- Multiple payment modes (Cash, Bank, UPI, Cheque)
- Payment reconciliation
- Payment reminders and scheduling
- Linked transaction support
- Dynamic chart of accounts
- Account types: Customer, Supplier, Cash, Bank, Expense, Revenue, Staff
- Account groups for better organization
- Opening balance management
- Transaction history with running balance
- Account statement generation
- Soft delete with audit trail
- Staff profile management
- Monthly salary / daily wage configuration
- Daily attendance marking (present/absent/half-day/leave)
- Automated payroll calculation
- Salary payment tracking
- Staff ledger integration
- Attendance reports
- Daily sales summary
- Monthly revenue reports
- Debtor aging analysis (30/60/90+ days)
- Creditor aging schedule
- Balance sheet
- Profit and loss statement
- Cash flow statement
- Custom date range reports
- Shop information management
- Financial year creation and switching
- Invoice prefix and numbering
- Tax rate configuration
- User management (add/remove users)
- Database backup/restore
- System preferences
- Secure bill image uploads
- Support for multiple image formats
- Automatic file organization
- Protected by authentication
- Linked to transactions
- AES-256 Encryption: All SQLite databases are encrypted using
better-sqlite3-multiple-ciphers - Per-Database Keys: Each financial year database uses encrypted storage
- WAL Mode: Write-Ahead Logging enabled for crash recovery and USB reliability
- Key Management: Encryption keys stored securely in
config.json
- Helmet.js: Security headers to prevent common attacks (XSS, MIME sniffing, etc.)
- Rate Limiting: API rate limiting (100 requests per 15 minutes per IP)
- CORS Protection: Restricted to localhost only (configurable for LAN)
- Session Security: HTTP-only cookies with SameSite protection
- Input Validation: Zod schema validation on all inputs
- SQL Injection Protection: Parameterized queries throughout
- Password Hashing: bcrypt with salt rounds for secure password storage
- Session Management: Configurable session timeout (default: 15 minutes)
- Role-Based Access: Three roles - owner (full access), accountant, cashier
- Activity Logging: Complete audit trail of all user actions
- Failed Login Tracking: Configurable threshold (default: 5 attempts)
- Auto-Wipe Capability: Optional data wipe after excessive failed attempts
- Decoy Data Support: Plausible deniability with decoy records
- Path Traversal Protection: Strict validation of all file paths and FY headers
- No External Dependencies: Works completely offline - no data leaves your machine
- USB Reliability: WAL mode ensures data integrity even with unsafe removal
{
"shop": {
"name": "Your Shop Name",
"address": "Shop Address",
"phone": "+91-XXXXXXXXXX",
"gstin": "YOUR_GSTIN_HERE",
"logo_path": "assets/logo.png"
},
"currency": "INR",
"currency_symbol": "₹",
"tax_rate": 18,
"invoice_prefix": "INV",
"locale": "hi-IN",
"session": {
"timeout_minutes": 15
},
"backup": {
"auto_time": "23:00",
"usb_drive_label": "HISAABPRO_BKP"
},
"server": {
"port": 3000,
"host": "localhost"
},
"database": {
"path": "./data/hisaab.db"
},
"financial_years": []
}| Section | Key | Description | Default |
|---|---|---|---|
| shop | name | Your business name | Required |
| address | Business address | Required | |
| phone | Contact number | Required | |
| gstin | GST Identification Number | Optional | |
| logo_path | Path to shop logo | assets/logo.png | |
| currency | currency | Currency code (INR, USD, etc.) | INR |
| currency_symbol | Symbol to display (₹, $, etc.) | ₹ | |
| tax_rate | Default tax percentage | 18 | |
| invoice_prefix | Prefix for invoice numbers | INV | |
| locale | Locale for number/date formatting | hi-IN | |
| session | timeout_minutes | Session timeout duration | 15 |
| backup | auto_time | Daily backup time (24h format) | 23:00 |
| usb_drive_label | USB drive label for backups | HISAABPRO_BKP | |
| server | port | Port to run the server | 3000 |
| host | Host address (localhost for local) | localhost | |
| database | path | Base path for database files | ./data/hisaab.db |
http://localhost:3000/api/v1
All API requests (except /auth/login) require:
- Valid session cookie
x-financial-yearheader with the target database filename
Content-Type: application/json
x-financial-year: hisaab_2026_27_1234567890.db
POST /auth/login- User loginPOST /auth/logout- User logoutGET /auth/verify- Verify session
GET /sales- List all salesPOST /sales- Create new saleGET /sales/:id- Get sale detailsPUT /sales/:id- Update saleDELETE /sales/:id- Delete sale (soft delete)
GET /purchases- List all purchasesPOST /purchases- Create new purchaseGET /purchases/:id- Get purchase detailsPUT /purchases/:id- Update purchaseDELETE /purchases/:id- Delete purchase
GET /payments- List all paymentsPOST /payments- Record new paymentGET /payments/:id- Get payment detailsPUT /payments/:id- Update paymentDELETE /payments/:id- Delete payment
GET /accounts- List all accountsPOST /accounts- Create new accountGET /accounts/:id- Get account detailsGET /accounts/:id/statement- Get account statementPUT /accounts/:id- Update accountDELETE /accounts/:id- Delete account
GET /staff- List all staffPOST /staff- Add new staff memberGET /staff/:id/attendance- Get attendance recordsPOST /staff/:id/attendance- Mark attendancePOST /staff/:id/payroll- Generate payroll
GET /reports/daily-sales- Daily sales reportGET /reports/monthly-revenue- Monthly revenue reportGET /reports/debtor-aging- Debtor aging analysisGET /reports/creditor-aging- Creditor aging analysisGET /reports/balance-sheet- Balance sheetGET /reports/profit-loss- Profit and loss statement
GET /dashboard/summary- Dashboard metricsGET /dashboard/recent-transactions- Recent activityGET /dashboard/charts- Chart data
npm run devThis uses nodemon to auto-restart on file changes.
# Reset database (caution: deletes all data)
rm data/*.db
# Seed with demo data
npm run seed
# Run with demo data
npm run demo- Go to Settings page
- Click "Add Financial Year"
- Enter start and end dates
- New encrypted database will be created automatically
- Switch between FYs using the dropdown in the header
- Automatic: Backups run daily at configured time
- Manual: Use the backup button in Settings
- USB Backup: Insert USB with label "HISAABPRO_BKP"
- Restore: Copy backup
.dbfile todata/directory
Hisaab Pro includes a comprehensive test suite with 357+ tests across 18 test files, covering all critical functionality.
# Run all tests
npm test
# Run tests with coverage report
npm run test:coverage
# Run tests in watch mode
npm run test:watchdouble-entry.test.js- Verifies debit=credit enforcement, trial balance = 0transaction-addition.test.js- Tests all transaction types and ledger consistency
wal-mode.test.js- Verifies WAL mode is enabled for crash recoveryatomic-writes.test.js- Ensures no partial commitscrash-simulation.test.js- Simulates crashes during writesfull-restore.test.js- Tests backup and restore functionality
input-validation.test.js- Zod schema validation (45 tests)duplicate-payroll.test.js- Prevents duplicate payroll entriesbroken-references.test.js- Handles broken FK references
cross-pc-compat.test.js- Tests across different Windows PCs (40 tests)drive-letters.test.js- Handles D:, E:, F: drive lettersno-absolute-paths.test.js- Ensures no absolute path dependenciesusb-removal.test.js- Handles unsafe USB removalusb-performance.test.js- Performance on slow USB drivesusb-removal-integration.test.js- Integration tests for USB scenarios
error-logging.test.js- Verifies all errors are logged (29 tests)no-silent-failures.test.js- Ensures no silent failures (26 tests)
account-creation.test.js- Account creation workflowstransaction-addition.test.js- Transaction addition workflows
- Total Test Files: 18
- Total Test Cases: 357+
- Test Code: 16,000+ lines
- Coverage Reports: Generated in
coverage/directory
This project is licensed under the MIT License - see the LICENSE file for details.
For client-specific deployments, please refer to CLIENT_LICENSE.md for commercial licensing terms, which include:
- Single installation per license
- Permission to modify CSS and reports
- Prohibition on resale or SaaS conversion
- Attribution requirement ("Powered by Hisaab Pro")
For technical support, feature requests, or commercial licensing inquiries:
- Issues: Use the GitHub issue tracker
- Documentation: See the
Docs/directory for detailed guides - Security: Review
Docs/pre-launch-security-guide.mdfor security best practices
- SQLite team for the robust embedded database
- Tailwind CSS for the utility-first CSS framework
- Material Design for the icon system and design language
- Node.js community for the excellent ecosystem
- Jest testing framework for reliable test infrastructure
When a business uses Hisaab Pro for the first time, a Setup Wizard automatically launches to configure the system. This ensures a clean, professional first experience without any test or demo data.
-
Admin Account Creation
- Create a secure admin username and password
- Password strength validation with visual feedback
- Confirmation to prevent typos
-
Shop Information
- Business name (required)
- Complete address
- Contact phone number
- GSTIN (optional, with format validation)
-
Financial Year Setup
- Define your first financial year (e.g., 2026-27)
- Set start and end dates
- Defaults to Indian financial year (April 1 to March 31)
-
Currency and Tax Settings
- Select currency (INR, USD, EUR, GBP)
- Set currency symbol
- Configure default tax rate (GST ready)
- Customize invoice prefix
- Choose locale for formatting
- Automatic Detection: System detects first run by checking if any users exist
- Seamless Redirect: Unauthenticated users are redirected to
/setup.html - One-Time Process: Setup runs only once; subsequent accesses go directly to login
- Clean Database: No demo or test data is created -- only the admin user and account types
- Immediate Use: After setup, log in with your new credentials and start using the system
The setup wizard consists of:
- Server Module:
server/modules/setup/(service and routes) - Client Page:
client/setup.html(4-step wizard) - API Endpoints:
GET /api/v1/setup/status- Check if setup is requiredPOST /api/v1/setup/complete- Complete setup processPOST /api/v1/setup/validate-shop- Validate shop details
Version: V1.0.0 (Publication Ready)
Status: All Phase 0 (Non-Negotiable Validation) requirements completed
Test Coverage: 357+ tests across 18 test files
Last Updated: May 2, 2026
- Core Accounting (Double-Entry) - Complete
- Sales and Purchases Management - Complete
- Staff and Payroll Module - Complete
- Financial Reports - Complete
- Security and Encryption - Complete
- PDF Export - Complete
- Multi-Financial Year Support - Complete
- USB Portability with WAL Mode - Complete
- Comprehensive Test Suite - Complete
- First-Run Setup Wizard - Complete
- Inventory Module - Planned
- LAN Sync - Planned
- Mobile App - Planned
Hisaab Pro -- Fast. Secure. Local.