TenantShell

PluralBooks - Developer Documentation

Many businesses. One accounting brain.

🎯 Platform Overview

Glintedge Finance is a fully-featured, multi-tenant accounting platform with QuickBooks-style UX. It supports 13 industry templates including Schools, Hotels, Retail, Construction, Healthcare, and more.

Multi-Tenant Architecture

Complete tenant isolation with RLS

2-Month Free Trial

Automatic subscription management

Industry Templates

Pre-configured COA, tax codes & reports

Parent Portal

Schools edition with fee management

Branding System

PluralBooks Branding with Glintedge Attribution

The platform uses PluralBooks as the product name with the tagline "Many businesses. One accounting brain.". For Glintedge Edition tenants, the badge "— Glintedge Edition" is displayed.

Tenant Brand Customization

  • • Custom logos (wordmark, mark, favicon)
  • • Brand colors (primary, accent)
  • • Email sender names and support addresses
  • • Optional footer notes

Note: Glintedge attribution in footer is always shown and cannot be customized.

Branding Module Location

utils/Branding.js

Import with: import { Branding, mergeTenantBrand } from "../utils/Branding"

Pluggable Communications

Email and SMS providers are configurable per tenant with Base44 fallback:

  • Email: Base44 (default), SendGrid, AWS SES
  • SMS: Base44 (default), Twilio

Configure in Settings → Communications or set global fallbacks in Dashboard → Secrets

Data Architecture

Core Entities

TenantMulti-tenant master entity with company details, currency, FY settings
TenantUserUser-tenant mapping with roles (owner, financeAdmin, accountant, etc.)
COAChart of Accounts - tenant-scoped account codes
JournalDouble-entry journal entries with full audit trail
SalesInvoiceAR invoices with status tracking and payment links
SupplierBillSupplier bills and accounts payable
BankAccountBank accounts with reconciliation support
ItemInventory items with FIFO/weighted costing
ProjectJob costing and WIP tracking

Schools-Specific Entities

StudentStudent records with year groups, boarding status
ParentParent/guardian contacts with portal access
TermBandTerm definitions and fee bands (tuition, boarding, etc.)
StudentFeeAssignmentFee assignments to students with pro-rata support
BursaryAwardScholarship/bursary tracking with restricted fund recognition
Backend Functions

Backend functions enable external integrations, automated processing, and advanced features.

postEvent

Generic event ingestion endpoint for external systems (e.g., Glintedge Ops). Validates HMAC signatures and processes finance events idempotently.

Requires: OPS_SHARED_KEY secret

renderInvoicePDF

Generates professional PDF invoices with company branding and line items.

generatePaymentLink

Creates secure payment links for online invoice payment (Stripe integration ready).

Requires: PSP_SECRET for webhook validation

portalInviteIssue

Issues magic-link portal invitations to parents with secure tokens.

Requires: EMAIL_API_KEY for sending invites

dunningGenerate

Automated debtor communications for overdue invoices with configurable escalation.

Requires: EMAIL_API_KEY, SMS_API_KEY

importStudents

Bulk CSV import for student records (Schools edition).

Integration & Secrets Setup

Configure these secrets in Dashboard → Settings → Secrets:

EMAIL_API_KEY

Email service provider API key (SendGrid, AWS SES, Mailgun). Used for: Portal invites, dunning communications, receipt emails.

SMS_API_KEY

SMS provider API key (Twilio, AWS SNS). Used for: Payment reminders, urgent dunning escalations.

PSP_SECRET

Payment Service Provider webhook secret (Stripe, PayPal). Used for: Validating payment notifications and webhook signatures.

OPS_SHARED_KEY

HMAC shared key for Glintedge Ops integration. Used for: Authenticating inbound finance event postings (escrow, dispatch, installs).

Next Steps & Customization
  1. Set up secrets in Dashboard → Settings for email, SMS, and payment providers
  2. Configure templates - add industry-specific COA structures in TemplateManager
  3. Enable scheduled jobs for dunning (daily 08:00) and trial reminders (daily 06:00)
  4. Implement PSP integration - connect Stripe/PayPal webhook for payment processing
  5. Add reporting - P&L, Balance Sheet, Cash Flow using journal aggregations
  6. Customize portal - add school logo, custom branding, and fee schedules
  7. Set up RLS policies - ensure tenant isolation at database level
  8. Test Schools flow - import students → create term bands → assign fees → generate invoices → parent portal

PluralBooks • Built on Base44 Platform

Powered by Glintedge Limited