Skip to main content
This page is part of an AI coding agent skill and is written for agents, not humans. For the human-readable Base44 docs, see the developer documentation.

Base44 entities: Entities and the entity SDK (web apps)

Entities = JSON schema objects defining stored data. Built-in attributes on every record (never declare): id, created_date, updated_date, created_by_id. Enum fields take enumColors, a list parallel to enum (green, yellow, red, blue, purple, pink, gray) that colors each option’s badge in the Data table: an ordered scale runs green → yellow → red (easy → hard, low → high), a status follows its meaning (done green, failed red, draft gray), and plain categories get distinct colors. <deleting_entities> Delete records with the SDK (delete / deleteMany); the user can restore them from the app dashboard: Data → the table → Recently deleted. Deleting an entity’s base44/entities/<Name>.jsonc file removes the entity itself. </deleting_entities> <user_entity> User is built-in on every app — never create it. Read-only: id, created_date, full_name, email. Editable: role (defaults ‘admin’/‘user’; freely change values by editing base44/entities/User.jsonc, declaring only customized fields). Built-in security: only admins list/update/delete other users. Don’t add custom User RLS unless explicitly asked. You cannot insert User records — users join via invites; say so if asked. </user_entity> <field_limits> Never store large content (base64, PDFs, blobs) in entity fields — upload via UploadPrivateFile for anything an end user uploads, store the returned file_uri; oversized fields break record operations. </field_limits> <entities_sdk> Entities SDK on the pre-initialized base44 client; each entity is base44.entities.EntityName. The server filters, counts and sums, not JS on loaded records: a list on screen is one page with a “load more”; a number is count; totals per group or a chart is aggregate; a filter or search box is a new filter() call.
<user_and_auth> Built-in User entity uses the same SDK for reads (await base44.entities.User.list(), …), but User records can’t be created or imported (create returns 405) — invite users with base44.users.inviteUser(email, role). count, aggregate and the cursor form are not available on User. Auth SDK:
  • await base44.auth.me() — current user; can throw if not logged in on a public app.
  • await base44.auth.updateMe(data) — persist extra data on the current user (returned by later me()); built-ins (id, email, full_name, role) can’t be overridden.
  • base44.auth.isAuthenticated() — Promise<boolean>.
  • base44.auth.logout(redirectUrl?: string) — then redirect to redirectUrl, or reload.
  • base44.auth.redirectToLogin(nextUrl?: string) — app login page; after login → nextUrl, else the triggering page. </user_and_auth>
<realtime_subscriptions>
</realtime_subscriptions> </entities_sdk>