Invoxa Developer Documentation
Comprehensive zero-build reference for styling tokens, JSON data tables, Chart.js lifecycle, 6 invoice layouts, role permissions, keyboard shortcuts, and Netlify deployment.
Quick Start & Technical Requirements
Invoxa ships as pure static HTML5, CSS3, and modular vanilla ES6 JavaScript. You do not need Node.js, Webpack, Vite, Sass compilers, or jQuery to edit, theme, or deploy any page.
Local Development Server
Although main.js bundles an automatic file:// fallback for demo JSON datasets, serving over HTTP guarantees native ES fetch behavior and clean browser caching:
# Option A — Python 3 built-in server
python -m http.server 8080
# Option B — Node static server
npx serve .
# Then visit: http://localhost:8080/index.html
Complete Folder Map & 52-Page Directory
Every page loads self-hosted vendor libraries and fonts from assets/ with zero external network calls.
| Directory / File | Responsibility |
|---|---|
| index.html | Flagship multi-section landing page (live 3-tab browser frame, marquee ticker, invoice sandbox, workflow lab, 51-screen tour, pricing mockup, FAQ) |
| docs.html | Standalone developer documentation portal (this page, without the workspace sidebar) |
| netlify.toml | Zero-build Netlify configuration, security headers, clean route rewrites, and static asset caching |
| assets/css/style.css | 11 commented CSS sections containing Light/Dark variables, Obsidian Ink rail, components, 6 invoice sheets & prefers-reduced-motion |
| assets/js/components.js | Shared Obsidian Ink sidebar (9 groups + session scroll persistence), top-left Profile Dropdown, role switcher & Ctrl/Cmd+K palette |
| assets/js/main.js | Core runtime (Invoxa.*), Light/Dark & RTL toggles, accent swatches, KPI count-ups, 3D tilt, OTP keypad, calendar, reconciliation & journal balance checks |
| assets/js/table.js | JSON table engine with 15 presets, search, sorting, live status counts, column toggles, bulk select & CSV download |
| assets/js/charts.js | Local Chart.js 4 initializer reacting automatically to Light/Dark theme switches |
| assets/js/invoice.js | Invoice builder state, multi-currency totals, logo selector, 6 paper layouts & confetti PAID stamp |
| assets/js/tools.js | 5 interactive estimators (EMI amortization chart, Compound Interest, SIP, Editable Tax Slabs, Currency converter) & Client Portal mock pay |
| assets/data/*.json | Sample JSON payloads (sales.json, purchases.json, accounting.json, reports.json) |
| assets/fonts/ & vendor/ | Self-hosted WOFF2 (Plus Jakarta Sans, Inter, IBM Plex Mono) + local Bootstrap 5.3.9, Bootstrap Icons 1.13.2 & Chart.js 4.6.2 |
Included HTML Modules inside pages/ (50 files)
dashboard, analytics, calendar, login, register, forgot-password, two-factorinvoices, invoice-create, invoice-details, invoices-recurring, invoice-layouts, quotes, quote-create, credit-notes, customers, customer-profile, productsvendors, purchase-orders, purchase-order-create, bills, expenses, expense-add, expense-claims, payments, bank-transactions, bank-reconciliationchart-of-accounts, general-ledger, journal-entries, trial-balance, report-pnl, report-balance-sheet, report-cashflow, report-tax-summary, report-aging, budgets, cashflow-forecast, calculators, client-portal, settings-profile, settings-company, settings-taxes, settings-team, settings-billing, settings-notifications, documentation, 404, 500Design Tokens, Dark Mode, Live Accents & RTL
All semantic surfaces and money status colors are controlled from Section [02] in assets/css/style.css. Click an accent dot to preview live across your browser session:
:root, [data-bs-theme="light"] {
--ink: #14122B; /* Deep Calm Ink */
--iris: #6C5CE7; /* Primary Action */
--iris-soft: #8E7CFF; /* Gradient Highlight */
--mint: #2EE6A6; /* Paid / Settled Money Status */
--coral: #FF6B81; /* Overdue / Negative Money Status */
--gold: #FFC857; /* Pending / Warning Status */
--mist: #F5F4FB; /* App Canvas */
}
- Dark Theme: Saved in
localStorage['invoxa-theme']and togglesdata-bs-theme="dark"on<html>. Paper print sheets inside.inv-sheetintentionally retain crisp dark ink on light paper even in Dark Mode. - RTL Mode: Saved in
localStorage['invoxa-dir']and dynamically swaps#inv-bs-csstoassets/vendor/bootstrap/bootstrap.rtl.min.css.
Sidebar Scroll Persistence, Profile Dropdown, Role Lock & Shortcuts
Workspace pages share 3 empty mount containers (#inv-sidebar-slot, #inv-topbar-slot, #inv-footer-slot) hydrated cleanly by components.js so updating navigation happens in one file.
Sidebar collapse state saves to localStorage['invoxa-sidebar-mini'] (`body.inv-mini`) and menu scroll position persists via sessionStorage['invoxa-sidebar-scroll']. The top-left dropdown links directly to Profile, Company, Roles, Billing, Docs, and Sign Out.
Switching Role to Viewer disables every button and anchor tagged with .js-role-write (.is-role-locked + aria-disabled). Keyboard shortcuts: Ctrl/Cmd+K Command Palette, ? Shortcuts Modal, Alt+T Theme.
JSON Table Engine (table.js)
Any table view mounts from a single element using data-source, data-key, data-preset, and optional data-page-size:
<div id="inv-table-host"
data-source="sales.json"
data-key="invoices"
data-preset="invoices"
data-page-size="8"></div>
Supported Presets: invoices, recurring, quotes, creditNotes, customers, products, purchaseOrders, vendors, expenses, bills, payments, bankTransactions, accounts, ledger, trialBalance. Includes live search, sort, status filter counts, column visibility menu, bulk selection bar, row actions, and CSV export.
Live Invoice Builder & 6 Paper Layouts
Managed by assets/js/invoice.js across invoice-create.html, invoice-details.html, and invoice-layouts.html:
- Dynamic Line Items: Add/remove rows updating subtotal, percentage discount, sample tax, and multi-currency formatting (
USD,EUR,GBP,INR). - 6 CSS Sheet Modifiers:
.inv-sheet--classic,.inv-sheet--modern,.inv-sheet--minimal,.inv-sheet--bold,.inv-sheet--compact, and.inv-sheet--receipt. - Interactive PAID Stamp & Print: Clicking
#inv-mark-paid-btnreveals.inv-stamp-paid.is-visiblewith confetti dots (skipped automatically underprefers-reduced-motion).@media printhides chrome automatically.
Global window.Invoxa Helper API & Charts
// Available globally on pages importing main.js
window.Invoxa.showToast('Saved invoice draft', 'success'); // 'info' | 'success' | 'warn'
window.Invoxa.formatMoney(4850, 'USD'); // "$4,850"
window.Invoxa.initialsAvatar('Northstar Studio'); // Returns styled avatar span
const sales = await window.Invoxa.loadData('sales.json'); // Fetch + file:// fallback
charts.js attaches a MutationObserver to <html data-bs-theme> so every Chart.js canvas updates axis tick and gridline colors immediately when toggling Dark Mode.
How to Add a Custom Page in 3 Steps
- Duplicate any starter page in
pages/(e.g.,invoices.html) and set a descriptive<body data-page="custom-view">. - Keep
#inv-sidebar-slot,#inv-topbar-slot,#main-content, and#inv-footer-slotintact with zero inline CSS attributes. - Append an object `{ name: 'My View', icon: 'bi-star', href: 'my-view.html' }` inside
navGroupsinassets/js/components.js— both the sidebar and Ctrl/Cmd+K Command Palette pick it up immediately.
Deploying on Netlify, Vercel, GitHub Pages or Nginx
The root folder contains a ready-to-deploy netlify.toml:
- Netlify Drag & Drop: Open app.netlify.com/drop and drop the extracted project root folder. No build command needed.
- Netlify CLI / Git: Connect your Git repo with empty Build Command and Publish Directory set to
.. - Clean Aliases Included:
/docsrewrites internally (`200`) to/docs.html;/loginand/dashboardredirect (`301`) cleanly to theirpages/targets.
[build]
publish = "."
[[redirects]]
from = "/docs"
to = "/docs.html"
status = 200
Troubleshooting, Credits & Disclaimers
- Forms & Authentication: Forms use
.js-demo-formfor HTML5 constraint validation feedback and toast simulation. Replace or interceptsubmithandlers inmain.jsto post to your API. - Non-Advisory Disclaimers: Sample tax slabs, GST/VAT labels, balance sheet ratios, and finance calculators display fictional numbers strictly for UI demonstration — not tax, accounting, or legal advice.
- Third-Party Licenses: Bootstrap 5.3 (MIT), Bootstrap Icons (MIT), Chart.js 4 (MIT), Plus Jakarta Sans / Inter / IBM Plex Mono (SIL Open Font License 1.1). Zero stock photos used.