Model-config web apps: describe the app in configuration instead of writing code. Built on Polars and DuckDB.
blog.dbbasic · 619 bytes · 19 lines
| 1 | # Blog Platform - 20 lines replaces WordPress |
| 2 | |
| 3 | name: "Blog Platform" |
| 4 | version: 1.0 |
| 5 | |
| 6 | model: |
| 7 | posts: [id, title, slug, content, author, status, created, updated] |
| 8 | comments: [id, post_id, author_name, email, content, approved, created] |
| 9 | categories: [id, name, slug] |
| 10 | post_categories: [post_id, category_id] |
| 11 | |
| 12 | views: |
| 13 | published: "SELECT * FROM posts WHERE status = 'published' ORDER BY created DESC" |
| 14 | drafts: "SELECT * FROM posts WHERE status = 'draft' ORDER BY updated DESC" |
| 15 | recent_comments: "SELECT * FROM comments WHERE approved = true ORDER BY created DESC LIMIT 10" |
| 16 | |
| 17 | forms: |
| 18 | post_form: auto |
| 19 | comment_form: auto |