Enclosures are the core organisational unit in Zooniverse. Each enclosure holds a defined number of animals of a single type — either all predators or all herbivores — and has a scheduled daily feeding time. Admins manage the full lifecycle of enclosures, while caretakers can browse and view only the enclosures they have been assigned to.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/raczkodavid/Zooniverse/llms.txt
Use this file to discover all available pages before exploring further.
What is an enclosure?
An enclosure record contains three fields stored in theenclosures database table:
| Field | Type | Description |
|---|---|---|
name | string | A human-readable label for the enclosure. |
limit | integer | The maximum number of animals the enclosure can hold. |
feeding_time | time (H:i:s) | The daily feeding time for the enclosure’s animals. |
is_predator flag on the animals it contains. An empty enclosure has no type and accepts either kind.
Browsing enclosures
Navigate to Enclosures in the main navigation to see the enclosure list. Results are ordered alphabetically by name and paginated at 5 per page.Admins see every enclosure in the system. Caretakers see only the enclosures they have been assigned to.
- Enclosure Name
- Animal Limit — the configured maximum
- Current Animal Count — the live count of animals in the enclosure
- Actions — Show (all users), Edit and Delete (admins only)
Creating an enclosure
Only admins can create enclosures.Open the create form
Click the Create Enclosure button on the enclosures list page. This loads the enclosure form at
GET /enclosures/create.Fill in the fields
Complete all three required fields:
- Enclosure Name — any descriptive string (e.g.
"Savannah North"). - Animal Limit — a positive integer (
min:1). This sets the maximum capacity. - Feeding Time — a time value in
H:i:sformat (e.g.08:30:00). The browser time picker withstep="1"is used in the UI.
Validation rules (create)
Viewing enclosure details
Click Show on any enclosure row to open the detail page atGET /enclosures/{id}.
The detail view displays:
- Enclosure Name, Animal Limit, Current Animal Count
- A danger alert if the enclosure currently holds predator animals
- A list of all animals in the enclosure, each showing name, species, birthdate, and an optional photo
Animals on the detail page are sorted first by species (ascending) then by born_at (ascending), making it easy to spot all members of the same species grouped together and ordered from oldest to youngest.
Editing an enclosure
Only admins can edit enclosures. Navigate toGET /enclosures/{id}/edit or click Edit in the list.
The edit form is identical to the create form but also includes a Select Caretakers button that opens a modal listing all registered users. Check or uncheck users to assign or unassign them from this enclosure.
Update name, limit, or feeding time
Modify any of the three main fields as needed and submit the form.
Assign caretakers
Click Select Caretakers, check the users who should have access to this enclosure, then close the modal. Caretaker assignments are synced (not appended) on every save — unchecked users lose access immediately.
Validation rules (update)
Deleting an enclosure
Click Delete in the enclosure list row. This sends aDELETE /enclosures/{id} request.
When the enclosure is empty:
- All caretaker assignments are removed from the pivot table (
detach). - The enclosure record is permanently deleted from the database.
Capacity and type tracking
Capacity
TheisFull() method on the Enclosure model compares the current animal count against the limit:
Predator / herbivore type
TheisPredatorEnclosure() method determines the enclosure’s current type:
null return value means the enclosure is empty and accepts either type. Once the first animal is placed, all subsequent animals must match that type. The enclosure detail page shows a visible danger alert when the enclosure holds predators.