Model-config web apps: describe the app in configuration instead of writing code. Built on Polars and DuckDB.
simple_customers_crud.yaml · 824 bytes · 44 lines
| 1 | # DBBasic CRUD Config - Simple Customers (No Hooks) |
| 2 | resource: simple_customers |
| 3 | database: simple_customers.db |
| 4 | |
| 5 | fields: |
| 6 | id: |
| 7 | type: primary_key |
| 8 | name: |
| 9 | type: string |
| 10 | required: true |
| 11 | searchable: true |
| 12 | max_length: 100 |
| 13 | email: |
| 14 | type: email |
| 15 | unique: true |
| 16 | searchable: true |
| 17 | required: true |
| 18 | phone: |
| 19 | type: string |
| 20 | max_length: 20 |
| 21 | status: |
| 22 | type: select |
| 23 | options: [active, inactive, pending] |
| 24 | default: active |
| 25 | created_at: |
| 26 | type: timestamp |
| 27 | auto_now_add: true |
| 28 | |
| 29 | interface: |
| 30 | list_display: [name, email, status, created_at] |
| 31 | search_fields: [name, email] |
| 32 | filters: [status, created_at] |
| 33 | per_page: 25 |
| 34 | |
| 35 | permissions: |
| 36 | create: authenticated |
| 37 | read: public |
| 38 | update: owner_or_admin |
| 39 | delete: admin_only |
| 40 | |
| 41 | api: |
| 42 | base_path: /api/simple_customers |
| 43 | enable_bulk: true |
| 44 | enable_export: true |