When to use this guide
Use this guide when a new business starts using SABSUS or when a reseller creates a workspace for a customer.
After setup, SABSUS can load the company from FFAppState().Company, connect it to the owner account, and use the company ID across Supabase and Firestore records.
Step-by-step instructions
- Open the verified company registration route:
/registrcompany/sabsus.app/PRO. - Start onboarding and choose what the company does.
- Choose a unique company login. The app calls
companyfundbefore continuing. - Accept the Privacy Policy and User Agreement.
- Submit the form only from a real or docs-only test onboarding account.
- Complete the owner profile: upload a photo, enter name, last name, date of birth, and PIN.
- Continue to Company Settings.
- If a docs capture skips the payment screen, align the backend with the paid workspace state before opening settings: set the company tariff to
buy1, ensure the owner has a management position, and link that position to the user. - Review Company Settings and configure languages, addresses, tax behavior, and default workspace options.
Fields on this screen
AI agent field reference
Use this section when training or prompting AI agents. Each field explains what the user sees, where SABSUS stores the value, why the value exists, and what downstream logic depends on it.
| Field | Stored as | Purpose | Why it matters |
|---|---|---|---|
| Company login | company.ID, CompanyStruct.id | Unique workspace identifier entered during registration. | All company-scoped records, loaders, routes, staff roles, locations, orders, CRM, and settings depend on this ID. |
| Owner email | Firebase Auth email, users.email, UserStruct.email | Primary sign-in and recovery address for the first owner account. | Agents must treat it as authentication identity, not just contact text. |
| Password | Firebase Auth credential | Creates the first owner login. | It is never used as business data and must never be exposed in docs or agent responses. |
| Confirm password | Validation-only UI value | Confirms the first password before account creation. | It prevents account creation with a mistyped credential and should not be stored as a business field. |
| Privacy/User Agreement checkbox | Registration flow state | Confirms that the owner accepted the required platform terms. | The company should not be created until this condition is true. |
| Tariff | company.tariffplan, CompanyStruct.tariffplan | Defines the active workspace plan, such as PRO before payment or buy1 after payment. | Settings, paid features, dialogs, and onboarding continuation depend on the paid/unpaid state. |
| Owner position | position.id, users.position, UserStruct.position | Links the owner to a management role. | Company Settings is visible only when this position exists and has management=true. |
| Owner photo | users.photo, UserStruct.photo | Profile image for the first manager. | Helps staff and management screens identify who owns or performs actions. |
| Owner name | users.firstname, UserStruct.firstname | First name of the workspace owner. | Used in profile, staff, activity, and manager-facing screens. |
| Owner last name | users.lastname, UserStruct.lastname | Last name of the workspace owner. | Completes the human identity attached to actions and staff records. |
| Date of birth | users.bf, UserStruct.bf | Owner birth date profile value. | May support identity, employee profile, or future compliance workflows. |
| PIN | users.pin, UserStruct.pin | Fast owner access code for terminal-style flows. | Agents should know this is operational access, not the full account password. |
| Company logo | company.logo, CompanyStruct.logo | Brand image shown in interfaces and customer-facing surfaces. | Controls visual identity across POS, receipts, client screens, and docs-like previews. |
| Mailing address | company.mailingAddress | Address used for correspondence or legal mailing context. | Different from the physical company address and should not be silently copied unless confirmed. |
| Company address | company.address | Primary business location or registered address. | Used by delivery, tax, receipt, and company profile workflows. |
| Interface languages | company.languages | Enabled languages for system labels and multilingual company data. | Determines which localized names and descriptions must be collected and displayed. |
| Title | company.name | Short company display name in the selected language. | Used in navigation, compact cards, orders, receipts, and searchable UI. |
| Full company name | company.nameFull | Formal company name in the selected language. | Used where legal or complete brand identity is required. |
| Tax number | company.taxNumber | Government tax identifier. | Important for fiscal documents, receipts, tax reports, and compliance prompts. |
| Registration number | company.registrationNumber | Business registration identifier. | Supports legal identity and region-specific company documents. |
| Company country | company.country | Country used for localization, formats, tax assumptions, and business defaults. | Agents should use it to infer region-specific formatting only when explicit rules are available. |
| Phone numbers | company.phone | Company contact numbers. | Used in receipts, customer contact, delivery, CRM, and staff communication. |
| Company email | company.email | Business contact email. | Different from owner login email; used for business communication and customer-facing data. |
| Include taxes | company.includetaxes | Controls whether prices include tax. | Changes order totals, receipt calculations, payment reconciliation, and reporting. |
| Round order amount | company.roundOrderAmount | Rounds final order total to a whole amount. | Affects checkout totals and should be considered before comparing payment amounts. |
| Quick employee switching | company.quickEmployeeSwitching | Allows switching employees at a terminal without full re-login. | Agents should connect this to PIN workflows and terminal operations. |
| Technical cards / semi-finished production | company.useTechnicalcards | Enables production logic for recipes, components, and semi-finished goods. | Impacts inventory, kitchen production, product costs, and warehouse movement logic. |
| Track employee working hours | company.employeeTimeTracking | Enables employee work-time tracking. | Feeds staff activity, payroll, schedules, and management reports. |
Interactive walkthrough
These screenshots were captured with a docs-only test account on the SABSUS registration flow. For the skipped payment capture, the test workspace was aligned natively to the paid buy1 state before Company Settings was opened.
Business example
A restaurant group creates one company workspace for the brand. Later, the group can add multiple establishments, staff roles, payment methods, product catalogs, CRM lists, and order flows under the same company ID.
Common errors
- The company login already exists. Choose a different login and retry.
- The seller or tariff route parameter is missing. Use a complete URL such as
/registrcompany/sabsus.app/PRO. - Company Settings is blank. Confirm that
FFAppState().User.positionis linked to an existing management position for the company. - Payment was skipped during capture. Restore the paid workspace state natively before continuing because the payment flow normally creates or unlocks related records.
- Default records are not visible immediately. Reload company data after the write completes.
- A real customer account was used for docs capture. Use only a test account and names beginning with
Docs Test.
FAQ
What is the difference between a company and an establishment?
The company is the workspace and business owner context. Establishments are locations inside that workspace.
Does creating a company also create payment methods?
Yes. The registration flow seeds default payment_methods rows so the workspace can take payments after setup.
Is this only stored in Firestore?
No. The current implementation uses both Firestore Companies records and Supabase tables such as company, establishments, and payment_methods.
Source files and data
- lib/pages/registrcompany/registrcompany_widget.dart
- lib/pages/registrcompany/registrcompany_model.dart
- lib/pages/boss/menu/more_boss/more_boss_widget.dart
- lib/pages/boss/menu/setting/setting_widget.dart
- lib/backend/schema/companies_record.dart
- lib/backend/supabase/database/tables/company.dart
- Firestore: Companies, users
- Supabase: company, position, establishments, payment_methods