pocketbase-collections

Solid

Collection and schema design for PocketBase. Use when creating collections, designing schemas, adding fields, setting up relations, or choosing between base/auth/view collection types. Prevents wrong field types, documents zero-default behavior, and covers relation cascading.

Web & Frontend 27,984 stars 2901 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# PocketBase Collection & Schema Design ## Collection Types ### Base Collection Standard data collection. System fields: `id`, `created`, `updated`. ### Auth Collection Extends base with authentication. Additional system fields: `email`, `emailVisibility`, `verified`, `password`, `tokenKey`. Cannot delete system fields. Can disable email/password auth in collection options. ### View Collection Read-only, backed by a SQL SELECT query. No create/update/delete. Fields are auto-detected from the query. Useful for aggregations, joins, and computed views. ```sql -- Example: view collection query SELECT p.id, p.title, COUNT(c.id) as comments_count FROM posts p LEFT JOIN comments c ON c.post = p.id GROUP BY p.id ``` View collections support API rules (list/view only) and can be used in relations. ## Field Types | Type | Go type | Zero default | Notes | |------|---------|-------------|-------| | `text` | `string` | `""` | min/max length, regex pattern | | `editor` | `string` | `""` | Rich text (sanitized HTML) | | `number` | `float64` | `0` | min/max, `noDecimal` option | | `bool` | `bool` | `false` | | | `email` | `string` | `""` | Auto-validated format | | `url` | `string` | `""` | Auto-validated format | | `date` | `string` | `""` | ISO 8601 (`2024-01-01 00:00:00.000Z`) | | `select` | `string`/`[]string` | `""`/`[]` | `values` list, `maxSelect` | | `file` | `string`/`[]string` | `""`/`[]` | `maxSelect`, `maxSize`, `mimeTypes` | | `relation` | `string`/`[]string` | `""`/`[]...

Details

Author
davila7
Repository
davila7/claude-code-templates
Created
11 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category