Clients
Organizations or individuals that own events. Clients have commercial and fiscal data, manage collaborators, and hold contracts. Stored in
u_clients.Collaborators
Users who operate under a client account. Each collaborator is linked to a parent client by UID. Stored in
u_collaborators.Staff
Internal platform operators with access to admin tooling. Staff accounts include 2FA configuration and timezone settings. Stored in
u_staff.How user creation works
All three creation functions follow the same pattern:Create Firebase Auth account
auth.createUser() is called with the provided email and password. On success, Firebase returns a uid.Write Firestore document
A document is written to the role-specific collection (
u_clients, u_collaborators, or u_staff) using the uid as the document ID.Firestore collections
| Role | Collection | Auth required to create |
|---|---|---|
| Client | u_clients | No |
| Collaborator | u_collaborators | No |
| Staff | u_staff | No |
All user documents store a
date.create Firestore Timestamp set at creation time. The date.last_access and date.last_update fields are initialized as empty strings and updated by other functions during the user lifecycle.Role differences
| Field | Client | Collaborator | Staff |
|---|---|---|---|
name_commercial | Yes | No | No |
commercial_registry | Yes | No | No |
fiscal_info | Yes | No | No |
bank_accounts | Yes | No | No |
client (parent link) | No | Yes | No |
commercial_name | No | No | Yes |
security_2fa | No | No | Yes |
timezone | No | No | Yes |
data counters | Yes | No | No |