SPB Git

Repository Public License

create.blueprint.json 10.6 KB 479 lines json

1{2  "entrypoint": "expensesPage",3  "id": "app_prj_r2w7yxckdo",4  "name": "Expense Tracker",5  "objects": [6    {7      "id": "expenses",8      "name": "Expenses",9      "props": {10        "columns": [11          {12            "label": "Date",13            "name": "date",14            "required": true,15            "type": "date"16          },17          {18            "label": "Description",19            "name": "description",20            "required": true,21            "type": "text"22          },23          {24            "default": "Other",25            "label": "Category",26            "name": "category",27            "options": [28              "Groceries",29              "Dining",30              "Transport",31              "Housing",32              "Utilities",33              "Entertainment",34              "Health",35              "Shopping",36              "Other"37            ],38            "required": true,39            "type": "text"40          },41          {42            "label": "Amount",43            "name": "amount",44            "required": true,45            "type": "currency"46          }47        ],48        "seed": [49          {50            "amount": 86.4,51            "category": "Groceries",52            "date": "2025-01-04",53            "description": "Supermarket"54          },55          {56            "amount": 55,57            "category": "Transport",58            "date": "2025-01-09",59            "description": "Train pass"60          },61          {62            "amount": 1200,63            "category": "Housing",64            "date": "2025-01-15",65            "description": "Rent"66          },67          {68            "amount": 32.5,69            "category": "Dining",70            "date": "2025-01-22",71            "description": "Pizza night"72          },73          {74            "amount": 74.2,75            "category": "Utilities",76            "date": "2025-02-03",77            "description": "Electricity bill"78          },79          {80            "amount": 102.15,81            "category": "Groceries",82            "date": "2025-02-11",83            "description": "Supermarket"84          },85          {86            "amount": 1200,87            "category": "Housing",88            "date": "2025-02-15",89            "description": "Rent"90          },91          {92            "amount": 24,93            "category": "Entertainment",94            "date": "2025-02-20",95            "description": "Cinema"96          },97          {98            "amount": 18.9,99            "category": "Health",100            "date": "2025-03-02",101            "description": "Pharmacy"102          },103          {104            "amount": 91.3,105            "category": "Groceries",106            "date": "2025-03-08",107            "description": "Supermarket"108          },109          {110            "amount": 1200,111            "category": "Housing",112            "date": "2025-03-15",113            "description": "Rent"114          },115          {116            "amount": 119.99,117            "category": "Shopping",118            "date": "2025-03-19",119            "description": "Running shoes"120          }121        ]122      },123      "provenance": {124        "source": "agent"125      },126      "schemaVersion": 1,127      "type": "prism.data.table",128      "version": 1129    },130    {131      "children": [132        "root"133      ],134      "id": "expensesPage",135      "name": "Expenses",136      "props": {137        "icon": "creditcard"138      },139      "provenance": {140        "source": "agent"141      },142      "schemaVersion": 1,143      "type": "prism.page",144      "version": 1145    },146    {147      "children": [148        "toolbar",149        "monthlyChart",150        "mainSplit",151        "notifications"152      ],153      "id": "root",154      "props": {155        "align": "stretch",156        "grow": true,157        "padding": 16158      },159      "provenance": {160        "source": "agent"161      },162      "schemaVersion": 1,163      "type": "prism.stack",164      "version": 1165    },166    {167      "children": [168        "categoryFilter",169        "importCsv",170        "newExpense"171      ],172      "id": "toolbar",173      "provenance": {174        "source": "agent"175      },176      "schemaVersion": 1,177      "type": "prism.toolbar",178      "version": 1179    },180    {181      "dependencies": [182        "expenses"183      ],184      "id": "monthlyChart",185      "props": {186        "format": "currency",187        "height": 220,188        "query": {189          "aggregates": [190            {191              "as": "total",192              "column": "amount",193              "fn": "sum"194            }195          ],196          "filters": [197            {198              "column": "category",199              "op": "eq",200              "unless": "state.categoryFilter == 'All'",201              "value": {202                "$expr": "state.categoryFilter"203              }204            }205          ],206          "groupBy": {207            "as": "month",208            "bucket": "month",209            "column": "date"210          },211          "sort": [212            {213              "column": "month"214            }215          ],216          "table": "expenses"217        },218        "title": {219          "$expr": "state.categoryFilter == 'All' ? 'Spending per month' : concat('Spending per month: ', state.categoryFilter)"220        },221        "tone": "accent",222        "x": "month",223        "y": "total"224      },225      "provenance": {226        "source": "agent"227      },228      "schemaVersion": 1,229      "type": "prism.chart.bar",230      "version": 1231    },232    {233      "children": [234        "expenseTable",235        "editorCard"236      ],237      "id": "mainSplit",238      "props": {239        "direction": "horizontal",240        "grow": true241      },242      "provenance": {243        "source": "agent"244      },245      "schemaVersion": 1,246      "type": "prism.split",247      "version": 1248    },249    {250      "id": "categoryFilter",251      "props": {252        "includeAll": "All",253        "label": "Category",254        "optionsFrom": {255          "column": "category",256          "table": "expenses"257        },258        "value": {259          "$bind": "categoryFilter"260        },261        "width": 220262      },263      "provenance": {264        "source": "agent"265      },266      "schemaVersion": 1,267      "type": "prism.dropdown",268      "version": 1269    },270    {271      "dependencies": [272        "expenses"273      ],274      "events": {275        "imported": [276          {277            "message": "Expenses imported.",278            "tone": "success",279            "type": "showNotification"280          }281        ]282      },283      "id": "importCsv",284      "props": {285        "table": "expenses",286        "title": "Import CSV…"287      },288      "provenance": {289        "source": "agent"290      },291      "schemaVersion": 1,292      "type": "prism.csvImport",293      "version": 1294    },295    {296      "events": {297        "click": [298          {299            "key": "selectedExpense",300            "type": "setState",301            "value": ""302          }303        ]304      },305      "id": "newExpense",306      "props": {307        "icon": "plus",308        "style": "primary",309        "title": "New Expense"310      },311      "provenance": {312        "source": "agent"313      },314      "schemaVersion": 1,315      "type": "prism.button",316      "version": 1317    },318    {319      "dependencies": [320        "expenses"321      ],322      "id": "expenseTable",323      "props": {324        "columns": [325          {326            "column": "date",327            "format": "date",328            "title": "Date"329          },330          {331            "column": "description",332            "title": "Description"333          },334          {335            "column": "category",336            "format": "badge",337            "title": "Category"338          },339          {340            "align": "trailing",341            "column": "amount",342            "format": "currency",343            "title": "Amount"344          }345        ],346        "emptyMessage": "Import a CSV file or add an expense to get started.",347        "emptyTitle": "No expenses",348        "grow": true,349        "query": {350          "filters": [351            {352              "column": "category",353              "op": "eq",354              "unless": "state.categoryFilter == 'All'",355              "value": {356                "$expr": "state.categoryFilter"357              }358            }359          ],360          "sort": [361            {362              "column": "date",363              "descending": true364            }365          ],366          "table": "expenses"367        },368        "selection": {369          "$bind": "selectedExpense"370        }371      },372      "provenance": {373        "source": "agent"374      },375      "schemaVersion": 1,376      "type": "prism.table",377      "version": 1378    },379    {380      "children": [381        "expenseEditor"382      ],383      "id": "editorCard",384      "props": {385        "title": {386          "$expr": "isEmpty(state.selectedExpense) ? 'New expense' : 'Edit expense'"387        },388        "width": 320389      },390      "provenance": {391        "source": "agent"392      },393      "schemaVersion": 1,394      "type": "prism.card",395      "version": 1396    },397    {398      "dependencies": [399        "expenses"400      ],401      "events": {402        "cancelled": [403          {404            "key": "selectedExpense",405            "type": "setState",406            "value": ""407          }408        ],409        "deleted": [410          {411            "key": "selectedExpense",412            "type": "setState",413            "value": ""414          },415          {416            "message": "Expense deleted.",417            "tone": "info",418            "type": "showNotification"419          }420        ],421        "saved": [422          {423            "key": "selectedExpense",424            "type": "setState",425            "value": ""426          },427          {428            "message": "Expense saved.",429            "tone": "success",430            "type": "showNotification"431          }432        ]433      },434      "id": "expenseEditor",435      "props": {436        "allowDelete": true,437        "fields": [438          "date",439          "description",440          "category",441          "amount"442        ],443        "recordId": {444          "$bind": "selectedExpense"445        },446        "submitTitle": {447          "$expr": "isEmpty(state.selectedExpense) ? 'Add Expense' : 'Save Changes'"448        },449        "table": "expenses"450      },451      "provenance": {452        "source": "agent"453      },454      "schemaVersion": 1,455      "type": "prism.recordEditor",456      "version": 1457    },458    {459      "id": "notifications",460      "provenance": {461        "source": "agent"462      },463      "schemaVersion": 1,464      "type": "prism.notification",465      "version": 1466    }467  ],468  "permissions": [469    "storage.local",470    "files.import.userSelected"471  ],472  "schemaVersion": 1,473  "state": {474    "categoryFilter": "All",475    "selectedExpense": ""476  },477  "summary": "A local expense tracker with CSV import, category filtering, a monthly spending chart and on-device storage.",478  "version": 1479}
Files main
Menu

Theme