Library Modules
The five always-on Modules every feature Module builds on: formatting, languages, identity, shared infrastructure and the UI kit.
Library Modules hold the code every feature Module shares. They have no screens of their own, no admin pages and no switch: they are listed under Always on in Settings → Modules, and an app can't turn them off. When you build a feature, use them instead of writing your own money formatter, translation helper or button. That keeps your screens in step with the rest of the app and lets an update fix them for you.
Formatting
Formatting turns stored values into text a person reads: money, dates, times and numbers, in the reader's language. Every amount in the app is stored as a whole number of the currency's smallest unit (satang, cents), and Formatting shows it with the right symbol and separators for English or Thai. It also turns an amount a person typed, such as "12.50", back into that stored form, and refuses one that isn't a valid amount.
Formatting needs only a language's number and date rules, never its translated text, so it is safe in screens that run in the browser. A Module passes in the currency to show, which is the workspace currency that Infra reads, and a missing amount shows as a dash.
- Kind: library Module, always on
- Needs: i18n
- Needed by: Account, Booking, Catalog, Customers, Finance, Guest ordering, Inventory, Membership, POS, Queue, Storefront, Supply chain, Website
- Adds to these when they're on: Nothing
- Added to by: Nothing
i18n
i18n runs the app in more than one language. It puts the language in the address (/en/...,
/th/...), translates strings with placeholders and plural forms, keeps links and navigation in
the current language, and provides the language switcher on the public site. English and Thai
ship with every Module.
The translated text itself belongs to the app. Each Module ships its own strings, and the app combines them. Only the current language's text is sent to the browser, so a page doesn't download every language. To reword a Module's string, add an override instead of editing the Module.
- Kind: library Module, always on
- Needs: Infra, Standard UI
- Needed by: Account, Audit log, Booking, Branches, Catalog, Customers, Discounts, Finance, Formatting, Guest ordering, Inventory, Membership, Outbox, POS, Queue, Storefront, Supply chain, Tour, Website
- Adds to these when they're on: Nothing
- Added to by: Nothing
Tested workflows
- I18n: public boundary
Identity
Identity connects the app to the platform's directory of people. It tells your code who is signed in, which Location their session is limited to, and which person a guest, a walk-in or a staff-entered customer is. A person whose records were merged resolves to one identity, so history from before the merge still shows up. See Identities for the directory itself.
A customer's name, email, phone and language live on the identity, not in a Module's tables, so every Module reads the same contact details. Identity stores phone numbers in one international format and refuses numbers it can't read. An edit with one bad contact saves nothing, and it never sends an invite to an unverified address staff didn't choose. Identity has no tables of its own: the data is the platform's.
- Kind: library Module, always on
- Needs: Nothing
- Needed by: Account, Audit log, Booking, Branches, Catalog, Customers, Discounts, Finance, Guest ordering, Inventory, Membership, Outbox, POS, Queue, Staff, Storefront, Supply chain, Tour, Website
- Adds to these when they're on: Nothing
- Added to by: Nothing
Tested workflows
- Identity: session contracts
- Identity: branch scope
- Identity: public boundary
- Identity: session branch resolution
- Identity: person facts on the identity
Infra
Infra holds the plumbing that feature Modules share: the connection to the app's database, a clock that tests can control, a simple rate limiter, spreadsheet import and export, file upload tickets with a sweep for uploads that were never used, and the way a background job asks to run sooner when new work arrives. It also keeps the change history of the few shared tables that sit under every Module, such as the settings table.
Infra is also where a Module reads business-wide settings. The business timezone is Asia/Bangkok until an operator saves another, and a Location can set its own. The currency is THB until changed, and a code that isn't a real currency is refused. The VAT rate is 7% unless the workspace or a Location sets its own. POS, Booking, Finance and the shop read these values from Infra, so a business changes them in one place. Infra also defines how a Module's sample data is reset and reseeded; see Customize seeds.
- Kind: library Module, always on
- Needs: Nothing
- Needed by: Account, Audit log, Booking, Branches, Catalog, Customers, Discounts, Finance, Guest ordering, i18n, Inventory, Membership, Outbox, POS, Queue, Staff, Storefront, Supply chain, Tour, Website
- Adds to these when they're on: Nothing
- Added to by: Nothing
Tested workflows
- Infra: public boundary
- Infra: workspace timezone
Standard UI
Standard UI is the shared kit of screen parts: buttons, dialogs, tables, forms and their inputs (phone numbers, Thai addresses, dates and times, rich text), charts, and the page frame every admin screen uses. Its controls take their words through props instead of translating themselves, so a feature passes in its own translated text and the kit never shows hidden English.
Every part is sized in rem, so making text bigger for one surface (a register for staff who need larger targets) scales the whole screen with it. Its autosave helper writes once for a burst of edits, keeps the draft when a save fails so it can be retried, and saves a pending edit when the editor closes. Restyle the kit with your theme's colour tokens first. Customizing Standard UI's screens is only needed for changes a token can't make, and the app then maintains every part itself; see Customize screens.
- Kind: library Module, always on
- Needs: Nothing
- Needed by: Account, Audit log, Booking, Branches, Catalog, Customers, Discounts, Finance, Guest ordering, i18n, Inventory, Membership, Outbox, POS, Queue, Staff, Storefront, Supply chain, Tour, Website
- Adds to these when they're on: Nothing
- Added to by: Nothing
Tested workflows
- Standard UI: public boundary
- Standard UI: debounced save
- Standard UI: overlay layering
- Standard UI: scalable sizing