customers, orders, or tasks. It’s the equivalent of a database table.
Anatomy of a collection
The slug is what your code uses:
Create a collection
1
Open Collections
In your project, go to Collections → Create Collection.
2
Name it
Enter a name. Use lowercase, plural slugs such as
customers or order_items.3
Add fields
Add the fields each record needs and mark required or unique ones.
4
Connect it
Add relations to other collections if needed.
Organize collections
In the sidebar you can group collections into folders (for example Sales and Operations) and drag them to reorder. Grouping is visual only and doesn’t change the API.Collection settings
- Filters: choose which fields appear as filters in the records view, and the default match mode for text filters (such as
containsorexact). - Totals: show sums or other totals for numeric columns. Totals are also returned by the API in the
totalskey of list responses.
Design tips
One collection per real-world thing
One collection per real-world thing
customers, orders, and products are separate collections connected with relations. Avoid putting unrelated data in one collection.Use relations instead of duplicating data
Use relations instead of duplicating data
Store the customer once and link orders to it. Don’t copy the customer’s name into every order.
Your users collection is a normal collection
Your users collection is a normal collection
For login, create a collection like
users with an email field, then attach an authentication guard. Add any profile fields you need.Pick slugs you won't need to change
Pick slugs you won't need to change
Slugs appear in URLs, permissions, and hook code (
ctx.Collection("orders")).Project map
Project map in the project sidebar draws every collection as a card with its fields and their properties: type, required, unique rules, auto numbers, defaults, validation rules, and computed formulas such assum(Payments.amount). Lines show relations (solid, with the field name and cardinality such as N:1) and the collections a computed field reads from (dashed).
Drag cards to arrange them. Your layout is remembered in this browser, and Re-arrange starts over. Click a card to highlight what it connects to, or search for a collection or field.
Export downloads the map as:
