Company registration¶
Applies to: Owner (what was created for you); developers and support staff (how it works). Last reviewed: 2026-11-18.
When a school registers, DriveFlow creates the organisation, its Main Branch, the Owner user and a trial subscription in one step. This page describes exactly what DriveFlow creates when a school registers, and what it does not. For the step-by-step form, see Account registration.
How a school is registered¶
A school is registered through the public page Create your account (/register), reached from START YOUR FREE TRIAL on the sign-in page. The page sends the form to the API (POST /api/Auth/register), which does all the work in one database transaction: either everything below is created, or nothing is.
flowchart TD
A[Registration form submitted] --> B["Checks: owner email unused, organisation email unused, country active, country has licence codes, Owner role exists, FREE plan exists"]
B --> C["One transaction:<br/>1. Organisation<br/>2. Notification settings and preferences<br/>3. Licence codes for the organisation<br/>4. Main Branch + scheduling settings + working hours<br/>5. Owner user + Owner role<br/>6. Trial subscription (14 days)"]
C --> D["Emails: 'Welcome to DriveFlow' to the school and the owner, 'New DriveFlow registration' to the platform operator"]
D --> E[Browser returns to the sign-in page]
Checks made before anything is created¶
| Check | Message if it fails |
|---|---|
| No DriveFlow user (at any school) has the owner's email | An account with this email address already exists. |
| No active organisation has the organisation email | An organisation with this email address already exists. |
| The country exists and is active | The selected country is invalid. |
| The country has at least one active licence code | The registration is refused (see Limitations). |
| The built-in Owner role exists | The Owner role has not been configured. |
An active subscription plan with the code FREE exists |
The Free Trial subscription plan has not been configured. |
| The password meets the rules (8+ characters, upper case, lower case, number, symbol) | Failed to create user, with the framework's reason. |
What is created automatically¶
1. The organisation¶
| Field | Value |
|---|---|
| Name | Driving School Name from the form |
| Trading name | Trading Name from the form, or the Driving School Name if left empty |
| Registration number, VAT number, phone, website | From the form, or empty |
| Organisation Email | |
| Address and country | From the form |
| Status | Active |
2. Notification settings¶
Default company notification settings and a default set of notification preferences. See the notifications documentation.
3. Licence codes¶
Every active licence code defined for the school's country is switched on for the school.
4. Main Branch¶
| Field | Value |
|---|---|
| Code | MAIN |
| Name | Main Branch |
| Manager name | The owner's first and last name |
| The owner's email (not the organisation email) | |
| Phone number | The owner's phone number, or empty |
| Address | The organisation's address |
| Opening / closing time | 08:00 / 17:00 |
| Main branch | Yes |
| Status | Active |
With it, the branch's scheduling settings:
| Setting | Default |
|---|---|
| Default lesson duration | 60 minutes |
| Slot interval | 30 minutes |
| Buffer between lessons | 0 minutes |
| Minimum advance booking | 2 hours |
| Maximum advance booking | 60 days |
| Cancellation notice | 24 hours |
| Same-day booking | Allowed |
| Online booking | Allowed |
| Auto-assign instructor / vehicle | Off / Off |
| Block future status changes | On |
| Maximum lessons per student per day | 2 |
| Working hours | Monday-Friday 08:00-17:00, Saturday 08:00-13:00, Sunday closed |
5. The Owner user¶
| Field | Value |
|---|---|
| Sign-in name and email | Email Address from the Owner Account section |
| Name, phone | From the form |
| Organisation | The new organisation |
| Branch | Main Branch (the owner is tied to the main branch, not set to All branches) |
| Status | Active |
| Role | Owner (every permission; cannot be changed) |
| Must change password at first sign-in | No; the owner chose the password |
6. Trial subscription¶
| Field | Value |
|---|---|
| Plan | The plan with code FREE |
| Status | Trial |
| Start / end | The moment of registration / 14 days later |
| Billing cycle | Monthly |
| Auto-renew | Off |
| Note | "Created automatically during organisation registration." |
What the trial includes and what happens when it ends is in the subscription documentation.
7. Emails¶
Sent after the registration is saved. A failure to send never undoes the registration; it is only logged, and each email is recorded in the school's notification history as sent or failed.
| To | Content | |
|---|---|---|
| Welcome to DriveFlow | The Organisation Email and the owner's email (once if they are the same) | School name, sign-in email, plan, "Free trial ends" date, the sign-in address when the platform has one configured, and a short getting-started paragraph. |
| New DriveFlow registration: (school name) | The platform operator's address, if one is configured | The school's details, owner's contact details, plan and trial end date. |
What is not created¶
- No roles. The built-in roles (Administrator, Manager, Instructor, Receptionist, Finance, Viewer) already exist for the whole platform and are shared by every school; a school's own custom roles are created later by the school.
- No other users.
- No training packages, instructors, vehicles, testing centres, students or sample data.
- No email (SMTP) settings for the school.
See First-time setup for what to do next.
Email confirmation¶
There is none. The owner's account is not marked as email-confirmed, and nothing in the sign-in code requires it to be. The owner can sign in immediately.
Platform data that must exist first (for whoever hosts DriveFlow)¶
Start-up seeding order
When the API starts, it applies database migrations and then seeds, in this order: the built-in roles, removal of the legacy "Admin" role (its users are moved to Administrator), the platform's seeded accounts, the permission list, the default permissions of the built-in roles, licence codes, and scheduling settings for any branch that lacks them. Registration depends on the Owner role, the FREE plan, an active country and that country's licence codes being present.
Limitations and notes¶
- Country without licence codes. For a country with no active licence codes the API throws an error ("No active licence codes are configured for country.") instead of returning a normal message. Licence codes are seeded for South Africa (ZA) and Zimbabwe (ZW); the start-up licence-code seeder only adds codes for South Africa. The message the user finally sees in this case was not verified.
- The owner is tied to Main Branch. After adding more branches, change the owner's own user to All branches; see Branch management.
- Trial length is fixed at 14 days in code (a code comment says "Make this configurable later").
- Other registration routes. The web application only uses the registration form described above. Other registration routes in the API are covered in the internal technical documentation.
- Seeded accounts. The platform creates some accounts on start-up. How these are secured on a real installation is covered in the internal technical documentation.
Related articles¶
- Account registration - the registration form step by step.
- First-time setup - what to configure after registering.
- Branch management - the Main Branch and adding more branches.
- Free trial - the 14-day trial subscription.
- Licence codes - the codes switched on at registration.