Model-config web apps: describe the app in configuration instead of writing code. Built on Polars and DuckDB.
simple_crm.dbbasic · 863 bytes · 32 lines
| 1 | # Simple CRM - 30 lines replaces Salesforce |
| 2 | # This is what Rails generators could never achieve |
| 3 | |
| 4 | name: "Simple CRM" |
| 5 | version: 1.0 |
| 6 | |
| 7 | model: |
| 8 | accounts: |
| 9 | fields: [id, name, industry, revenue, created] |
| 10 | indexes: [name, created] |
| 11 | |
| 12 | contacts: |
| 13 | fields: [id, account_id, name, email, phone, title] |
| 14 | relations: |
| 15 | account_id: accounts.id |
| 16 | |
| 17 | opportunities: |
| 18 | fields: [id, account_id, amount, stage, close_date] |
| 19 | relations: |
| 20 | account_id: accounts.id |
| 21 | workflow: |
| 22 | states: [lead, qualified, proposal, negotiation, closed_won, closed_lost] |
| 23 | |
| 24 | views: |
| 25 | pipeline: "SELECT stage, SUM(amount) as total FROM opportunities GROUP BY stage" |
| 26 | top_accounts: "SELECT * FROM accounts ORDER BY revenue DESC LIMIT 10" |
| 27 | recent_contacts: "SELECT * FROM contacts ORDER BY id DESC LIMIT 20" |
| 28 | |
| 29 | forms: |
| 30 | account_form: auto |
| 31 | contact_form: auto |
| 32 | opportunity_form: auto |