dao-treasury 0.0.53__tar.gz → 0.0.55__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of dao-treasury might be problematic. Click here for more details.

Files changed (47) hide show
  1. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/PKG-INFO +1 -1
  2. dao_treasury-0.0.55/dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json +507 -0
  3. dao_treasury-0.0.55/dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json +507 -0
  4. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml +16 -0
  5. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +4 -4
  6. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury.egg-info/PKG-INFO +1 -1
  7. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury.egg-info/SOURCES.txt +2 -0
  8. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/pyproject.toml +1 -1
  9. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/MANIFEST.in +0 -0
  10. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/README.md +0 -0
  11. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json +0 -0
  12. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +0 -0
  13. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +0 -0
  14. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +0 -0
  15. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +0 -0
  16. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/.grafana/provisioning/dashboards/treasury/Treasury.json +0 -0
  17. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/.grafana/provisioning/datasources/datasources.yaml +0 -0
  18. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/ENVIRONMENT_VARIABLES.py +0 -0
  19. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/__init__.py +0 -0
  20. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/_docker.py +0 -0
  21. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/_nicknames.py +0 -0
  22. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/_wallet.py +0 -0
  23. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/constants.py +0 -0
  24. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/db.py +0 -0
  25. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/docker-compose.yaml +0 -0
  26. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/main.py +0 -0
  27. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/py.typed +0 -0
  28. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/sorting/__init__.py +0 -0
  29. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/sorting/_matchers.py +0 -0
  30. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/sorting/_rules.py +0 -0
  31. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/sorting/factory.py +0 -0
  32. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/sorting/rule.py +0 -0
  33. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/sorting/rules/__init__.py +0 -0
  34. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/sorting/rules/ignore/__init__.py +0 -0
  35. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/sorting/rules/ignore/llamapay.py +0 -0
  36. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/streams/__init__.py +0 -0
  37. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/streams/llamapay.py +0 -0
  38. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/treasury.py +0 -0
  39. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury/types.py +0 -0
  40. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury.egg-info/dependency_links.txt +0 -0
  41. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury.egg-info/not-zip-safe +0 -0
  42. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury.egg-info/requires.txt +0 -0
  43. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/dao_treasury.egg-info/top_level.txt +0 -0
  44. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/setup.cfg +0 -0
  45. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/setup.py +0 -0
  46. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/tests/test_treasury.py +0 -0
  47. {dao_treasury-0.0.53 → dao_treasury-0.0.55}/tests/test_wallet.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dao_treasury
3
- Version: 0.0.53
3
+ Version: 0.0.55
4
4
  Summary: Produce comprehensive financial reports for your on-chain org
5
5
  Classifier: Development Status :: 3 - Alpha
6
6
  Classifier: Intended Audience :: Developers
@@ -0,0 +1,507 @@
1
+ {
2
+ "annotations": {
3
+ "list": [
4
+ {
5
+ "builtIn": 1,
6
+ "datasource": {
7
+ "type": "grafana",
8
+ "uid": "-- Grafana --"
9
+ },
10
+ "enable": true,
11
+ "hide": true,
12
+ "iconColor": "rgba(0, 211, 255, 1)",
13
+ "name": "Annotations & Alerts",
14
+ "type": "dashboard"
15
+ }
16
+ ]
17
+ },
18
+ "description": "Shows a breakdown of expenses over time.",
19
+ "editable": true,
20
+ "fiscalYearStartMonth": 0,
21
+ "graphTooltip": 1,
22
+ "id": 5,
23
+ "links": [],
24
+ "panels": [
25
+ {
26
+ "datasource": "SQLite",
27
+ "fieldConfig": {
28
+ "defaults": {
29
+ "color": {
30
+ "mode": "thresholds"
31
+ },
32
+ "mappings": [],
33
+ "thresholds": {
34
+ "mode": "absolute",
35
+ "steps": [
36
+ {
37
+ "color": "green",
38
+ "value": 0
39
+ },
40
+ {
41
+ "color": "red",
42
+ "value": 80
43
+ }
44
+ ]
45
+ }
46
+ },
47
+ "overrides": []
48
+ },
49
+ "gridPos": {
50
+ "h": 4,
51
+ "w": 6,
52
+ "x": 0,
53
+ "y": 0
54
+ },
55
+ "id": 1,
56
+ "options": {
57
+ "colorMode": "value",
58
+ "graphMode": "area",
59
+ "justifyMode": "auto",
60
+ "orientation": "auto",
61
+ "percentChangeColorMode": "standard",
62
+ "reduceOptions": {
63
+ "calcs": [
64
+ "lastNotNull"
65
+ ],
66
+ "fields": "",
67
+ "values": false
68
+ },
69
+ "showPercentChange": false,
70
+ "textMode": "auto",
71
+ "wideLayout": true
72
+ },
73
+ "pluginVersion": "12.2.0",
74
+ "targets": [
75
+ {
76
+ "datasource": "SQLite",
77
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
78
+ "queryType": "table",
79
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
80
+ "refId": "A",
81
+ "timeColumns": [
82
+ "time",
83
+ "ts"
84
+ ]
85
+ }
86
+ ],
87
+ "title": "Total Expenses",
88
+ "type": "stat"
89
+ },
90
+ {
91
+ "datasource": "SQLite",
92
+ "fieldConfig": {
93
+ "defaults": {
94
+ "color": {
95
+ "mode": "thresholds"
96
+ },
97
+ "mappings": [],
98
+ "thresholds": {
99
+ "mode": "absolute",
100
+ "steps": [
101
+ {
102
+ "color": "green",
103
+ "value": 0
104
+ },
105
+ {
106
+ "color": "red",
107
+ "value": 80
108
+ }
109
+ ]
110
+ }
111
+ },
112
+ "overrides": []
113
+ },
114
+ "gridPos": {
115
+ "h": 4,
116
+ "w": 6,
117
+ "x": 6,
118
+ "y": 0
119
+ },
120
+ "id": 4,
121
+ "options": {
122
+ "colorMode": "value",
123
+ "graphMode": "area",
124
+ "justifyMode": "auto",
125
+ "orientation": "auto",
126
+ "percentChangeColorMode": "standard",
127
+ "reduceOptions": {
128
+ "calcs": [
129
+ "lastNotNull"
130
+ ],
131
+ "fields": "",
132
+ "values": false
133
+ },
134
+ "showPercentChange": false,
135
+ "textMode": "auto",
136
+ "wideLayout": true
137
+ },
138
+ "pluginVersion": "12.2.0",
139
+ "targets": [
140
+ {
141
+ "datasource": "SQLite",
142
+ "queryText": "SELECT SUM(t.value_usd) / (((1760217520685 - 1744406320685) / 1000.0 / 60 / 60 / 24 / 30.436875)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= 1744406320685/1000 AND t.timestamp <= 1760217520685/1000",
143
+ "queryType": "table",
144
+ "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 30.436875)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
145
+ "refId": "A",
146
+ "timeColumns": [
147
+ "time",
148
+ "ts"
149
+ ]
150
+ }
151
+ ],
152
+ "title": "Monthly Expenses",
153
+ "type": "stat"
154
+ },
155
+ {
156
+ "datasource": "SQLite",
157
+ "fieldConfig": {
158
+ "defaults": {
159
+ "color": {
160
+ "mode": "thresholds"
161
+ },
162
+ "mappings": [],
163
+ "thresholds": {
164
+ "mode": "absolute",
165
+ "steps": [
166
+ {
167
+ "color": "green",
168
+ "value": 0
169
+ },
170
+ {
171
+ "color": "red",
172
+ "value": 80
173
+ }
174
+ ]
175
+ }
176
+ },
177
+ "overrides": []
178
+ },
179
+ "gridPos": {
180
+ "h": 4,
181
+ "w": 6,
182
+ "x": 12,
183
+ "y": 0
184
+ },
185
+ "id": 2,
186
+ "options": {
187
+ "colorMode": "value",
188
+ "graphMode": "area",
189
+ "justifyMode": "auto",
190
+ "orientation": "auto",
191
+ "percentChangeColorMode": "standard",
192
+ "reduceOptions": {
193
+ "calcs": [
194
+ "lastNotNull"
195
+ ],
196
+ "fields": "",
197
+ "values": false
198
+ },
199
+ "showPercentChange": false,
200
+ "textMode": "auto",
201
+ "wideLayout": true
202
+ },
203
+ "pluginVersion": "12.2.0",
204
+ "targets": [
205
+ {
206
+ "datasource": "SQLite",
207
+ "queryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 7)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
208
+ "queryType": "table",
209
+ "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 7)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
210
+ "refId": "A",
211
+ "timeColumns": [
212
+ "time",
213
+ "ts"
214
+ ]
215
+ }
216
+ ],
217
+ "title": "Weekly Expenses",
218
+ "type": "stat"
219
+ },
220
+ {
221
+ "datasource": "SQLite",
222
+ "fieldConfig": {
223
+ "defaults": {
224
+ "color": {
225
+ "mode": "thresholds"
226
+ },
227
+ "mappings": [],
228
+ "thresholds": {
229
+ "mode": "absolute",
230
+ "steps": [
231
+ {
232
+ "color": "green",
233
+ "value": 0
234
+ },
235
+ {
236
+ "color": "red",
237
+ "value": 80
238
+ }
239
+ ]
240
+ }
241
+ },
242
+ "overrides": []
243
+ },
244
+ "gridPos": {
245
+ "h": 4,
246
+ "w": 6,
247
+ "x": 18,
248
+ "y": 0
249
+ },
250
+ "id": 3,
251
+ "options": {
252
+ "colorMode": "value",
253
+ "graphMode": "area",
254
+ "justifyMode": "auto",
255
+ "orientation": "auto",
256
+ "percentChangeColorMode": "standard",
257
+ "reduceOptions": {
258
+ "calcs": [
259
+ "lastNotNull"
260
+ ],
261
+ "fields": "",
262
+ "values": false
263
+ },
264
+ "showPercentChange": false,
265
+ "textMode": "auto",
266
+ "wideLayout": true
267
+ },
268
+ "pluginVersion": "12.2.0",
269
+ "targets": [
270
+ {
271
+ "datasource": "SQLite",
272
+ "queryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
273
+ "queryType": "table",
274
+ "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
275
+ "refId": "A",
276
+ "timeColumns": [
277
+ "time",
278
+ "ts"
279
+ ]
280
+ }
281
+ ],
282
+ "title": "Daily Expenses",
283
+ "type": "stat"
284
+ },
285
+ {
286
+ "datasource": "SQLite",
287
+ "description": "",
288
+ "fieldConfig": {
289
+ "defaults": {
290
+ "color": {
291
+ "mode": "palette-classic"
292
+ },
293
+ "custom": {
294
+ "axisBorderShow": false,
295
+ "axisCenteredZero": false,
296
+ "axisColorMode": "text",
297
+ "axisLabel": "",
298
+ "axisPlacement": "auto",
299
+ "barAlignment": 0,
300
+ "barWidthFactor": 0.6,
301
+ "drawStyle": "bars",
302
+ "fillOpacity": 70,
303
+ "gradientMode": "none",
304
+ "hideFrom": {
305
+ "legend": false,
306
+ "tooltip": false,
307
+ "viz": false
308
+ },
309
+ "insertNulls": false,
310
+ "lineInterpolation": "linear",
311
+ "lineWidth": 1,
312
+ "pointSize": 5,
313
+ "scaleDistribution": {
314
+ "type": "linear"
315
+ },
316
+ "showPoints": "auto",
317
+ "showValues": false,
318
+ "spanNulls": false,
319
+ "stacking": {
320
+ "group": "A",
321
+ "mode": "normal"
322
+ },
323
+ "thresholdsStyle": {
324
+ "mode": "off"
325
+ }
326
+ },
327
+ "mappings": [],
328
+ "thresholds": {
329
+ "mode": "absolute",
330
+ "steps": [
331
+ {
332
+ "color": "green",
333
+ "value": 0
334
+ },
335
+ {
336
+ "color": "red",
337
+ "value": 80
338
+ }
339
+ ]
340
+ }
341
+ },
342
+ "overrides": [
343
+ {
344
+ "matcher": {
345
+ "id": "byName",
346
+ "options": "Net (sum)"
347
+ },
348
+ "properties": [
349
+ {
350
+ "id": "custom.drawStyle",
351
+ "value": "line"
352
+ },
353
+ {
354
+ "id": "custom.stacking",
355
+ "value": {
356
+ "group": "A",
357
+ "mode": "none"
358
+ }
359
+ },
360
+ {
361
+ "id": "custom.fillOpacity",
362
+ "value": 19
363
+ }
364
+ ]
365
+ }
366
+ ]
367
+ },
368
+ "gridPos": {
369
+ "h": 12,
370
+ "w": 24,
371
+ "x": 0,
372
+ "y": 4
373
+ },
374
+ "id": 11,
375
+ "options": {
376
+ "legend": {
377
+ "calcs": [],
378
+ "displayMode": "list",
379
+ "placement": "bottom",
380
+ "showLegend": true
381
+ },
382
+ "tooltip": {
383
+ "hideZeros": false,
384
+ "mode": "single",
385
+ "sort": "none"
386
+ }
387
+ },
388
+ "pluginVersion": "12.2.0",
389
+ "targets": [
390
+ {
391
+ "datasource": "SQLite",
392
+ "queryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') THEN t.value_usd ELSE 0 END) AS \"Total Expenses\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 GROUP BY timestamp ORDER BY timestamp;",
393
+ "queryType": "table",
394
+ "rawQueryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') THEN t.value_usd ELSE 0 END) AS \"Total Expenses\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 GROUP BY timestamp ORDER BY timestamp;",
395
+ "refId": "A",
396
+ "timeColumns": [
397
+ "timestamp"
398
+ ]
399
+ }
400
+ ],
401
+ "title": "Weekly Cashflow",
402
+ "transformations": [
403
+ {
404
+ "id": "formatTime",
405
+ "options": {
406
+ "outputFormat": "YYYY-WW",
407
+ "timeField": "timestamp",
408
+ "timezone": "browser",
409
+ "useTimezone": true
410
+ }
411
+ },
412
+ {
413
+ "id": "convertFieldType",
414
+ "options": {
415
+ "conversions": [
416
+ {
417
+ "dateFormat": "YYYY-WW",
418
+ "destinationType": "time",
419
+ "targetField": "timestamp"
420
+ }
421
+ ],
422
+ "fields": {}
423
+ }
424
+ },
425
+ {
426
+ "id": "groupBy",
427
+ "options": {
428
+ "fields": {
429
+ "Cost of Revenue": {
430
+ "aggregations": [
431
+ "sum"
432
+ ],
433
+ "operation": "aggregate"
434
+ },
435
+ "Expenses": {
436
+ "aggregations": [
437
+ "sum"
438
+ ],
439
+ "operation": "aggregate"
440
+ },
441
+ "Net": {
442
+ "aggregations": [
443
+ "sum"
444
+ ],
445
+ "operation": "aggregate"
446
+ },
447
+ "Other Expenses": {
448
+ "aggregations": [
449
+ "sum"
450
+ ],
451
+ "operation": "aggregate"
452
+ },
453
+ "Other Income": {
454
+ "aggregations": [
455
+ "sum"
456
+ ],
457
+ "operation": "aggregate"
458
+ },
459
+ "Revenue": {
460
+ "aggregations": [
461
+ "sum"
462
+ ],
463
+ "operation": "aggregate"
464
+ },
465
+ "Timestamp": {
466
+ "aggregations": [],
467
+ "operation": "groupby"
468
+ },
469
+ "Total Expenses": {
470
+ "aggregations": [
471
+ "sum"
472
+ ],
473
+ "operation": "aggregate"
474
+ },
475
+ "Total Revenue": {
476
+ "aggregations": [
477
+ "sum"
478
+ ],
479
+ "operation": "aggregate"
480
+ },
481
+ "timestamp": {
482
+ "aggregations": [],
483
+ "operation": "groupby"
484
+ }
485
+ }
486
+ }
487
+ }
488
+ ],
489
+ "type": "timeseries"
490
+ }
491
+ ],
492
+ "preload": false,
493
+ "refresh": "",
494
+ "schemaVersion": 42,
495
+ "tags": [],
496
+ "templating": {
497
+ "list": []
498
+ },
499
+ "time": {
500
+ "from": "now-6M",
501
+ "to": "now"
502
+ },
503
+ "timepicker": {},
504
+ "timezone": "",
505
+ "title": "Expenses Over Time",
506
+ "version": 1
507
+ }
@@ -0,0 +1,507 @@
1
+ {
2
+ "annotations": {
3
+ "list": [
4
+ {
5
+ "builtIn": 1,
6
+ "datasource": {
7
+ "type": "grafana",
8
+ "uid": "-- Grafana --"
9
+ },
10
+ "enable": true,
11
+ "hide": true,
12
+ "iconColor": "rgba(0, 211, 255, 1)",
13
+ "name": "Annotations & Alerts",
14
+ "type": "dashboard"
15
+ }
16
+ ]
17
+ },
18
+ "description": "Shows a breakdown of expenses over time.",
19
+ "editable": true,
20
+ "fiscalYearStartMonth": 0,
21
+ "graphTooltip": 1,
22
+ "id": 5,
23
+ "links": [],
24
+ "panels": [
25
+ {
26
+ "datasource": "SQLite",
27
+ "fieldConfig": {
28
+ "defaults": {
29
+ "color": {
30
+ "mode": "thresholds"
31
+ },
32
+ "mappings": [],
33
+ "thresholds": {
34
+ "mode": "absolute",
35
+ "steps": [
36
+ {
37
+ "color": "green",
38
+ "value": 0
39
+ },
40
+ {
41
+ "color": "red",
42
+ "value": 80
43
+ }
44
+ ]
45
+ }
46
+ },
47
+ "overrides": []
48
+ },
49
+ "gridPos": {
50
+ "h": 4,
51
+ "w": 6,
52
+ "x": 0,
53
+ "y": 0
54
+ },
55
+ "id": 1,
56
+ "options": {
57
+ "colorMode": "value",
58
+ "graphMode": "area",
59
+ "justifyMode": "auto",
60
+ "orientation": "auto",
61
+ "percentChangeColorMode": "standard",
62
+ "reduceOptions": {
63
+ "calcs": [
64
+ "lastNotNull"
65
+ ],
66
+ "fields": "",
67
+ "values": false
68
+ },
69
+ "showPercentChange": false,
70
+ "textMode": "auto",
71
+ "wideLayout": true
72
+ },
73
+ "pluginVersion": "12.2.0",
74
+ "targets": [
75
+ {
76
+ "datasource": "SQLite",
77
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
78
+ "queryType": "table",
79
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
80
+ "refId": "A",
81
+ "timeColumns": [
82
+ "time",
83
+ "ts"
84
+ ]
85
+ }
86
+ ],
87
+ "title": "Total Revenue",
88
+ "type": "stat"
89
+ },
90
+ {
91
+ "datasource": "SQLite",
92
+ "fieldConfig": {
93
+ "defaults": {
94
+ "color": {
95
+ "mode": "thresholds"
96
+ },
97
+ "mappings": [],
98
+ "thresholds": {
99
+ "mode": "absolute",
100
+ "steps": [
101
+ {
102
+ "color": "green",
103
+ "value": 0
104
+ },
105
+ {
106
+ "color": "red",
107
+ "value": 80
108
+ }
109
+ ]
110
+ }
111
+ },
112
+ "overrides": []
113
+ },
114
+ "gridPos": {
115
+ "h": 4,
116
+ "w": 6,
117
+ "x": 6,
118
+ "y": 0
119
+ },
120
+ "id": 4,
121
+ "options": {
122
+ "colorMode": "value",
123
+ "graphMode": "area",
124
+ "justifyMode": "auto",
125
+ "orientation": "auto",
126
+ "percentChangeColorMode": "standard",
127
+ "reduceOptions": {
128
+ "calcs": [
129
+ "lastNotNull"
130
+ ],
131
+ "fields": "",
132
+ "values": false
133
+ },
134
+ "showPercentChange": false,
135
+ "textMode": "auto",
136
+ "wideLayout": true
137
+ },
138
+ "pluginVersion": "12.2.0",
139
+ "targets": [
140
+ {
141
+ "datasource": "SQLite",
142
+ "queryText": "SELECT SUM(t.value_usd) / (((1760217520685 - 1744406320685) / 1000.0 / 60 / 60 / 24 / 30.436875)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= 1744406320685/1000 AND t.timestamp <= 1760217520685/1000",
143
+ "queryType": "table",
144
+ "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 30.436875)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
145
+ "refId": "A",
146
+ "timeColumns": [
147
+ "time",
148
+ "ts"
149
+ ]
150
+ }
151
+ ],
152
+ "title": "Monthly Revenue",
153
+ "type": "stat"
154
+ },
155
+ {
156
+ "datasource": "SQLite",
157
+ "fieldConfig": {
158
+ "defaults": {
159
+ "color": {
160
+ "mode": "thresholds"
161
+ },
162
+ "mappings": [],
163
+ "thresholds": {
164
+ "mode": "absolute",
165
+ "steps": [
166
+ {
167
+ "color": "green",
168
+ "value": 0
169
+ },
170
+ {
171
+ "color": "red",
172
+ "value": 80
173
+ }
174
+ ]
175
+ }
176
+ },
177
+ "overrides": []
178
+ },
179
+ "gridPos": {
180
+ "h": 4,
181
+ "w": 6,
182
+ "x": 12,
183
+ "y": 0
184
+ },
185
+ "id": 2,
186
+ "options": {
187
+ "colorMode": "value",
188
+ "graphMode": "area",
189
+ "justifyMode": "auto",
190
+ "orientation": "auto",
191
+ "percentChangeColorMode": "standard",
192
+ "reduceOptions": {
193
+ "calcs": [
194
+ "lastNotNull"
195
+ ],
196
+ "fields": "",
197
+ "values": false
198
+ },
199
+ "showPercentChange": false,
200
+ "textMode": "auto",
201
+ "wideLayout": true
202
+ },
203
+ "pluginVersion": "12.2.0",
204
+ "targets": [
205
+ {
206
+ "datasource": "SQLite",
207
+ "queryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 7)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
208
+ "queryType": "table",
209
+ "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 7)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
210
+ "refId": "A",
211
+ "timeColumns": [
212
+ "time",
213
+ "ts"
214
+ ]
215
+ }
216
+ ],
217
+ "title": "Weekly Revenue",
218
+ "type": "stat"
219
+ },
220
+ {
221
+ "datasource": "SQLite",
222
+ "fieldConfig": {
223
+ "defaults": {
224
+ "color": {
225
+ "mode": "thresholds"
226
+ },
227
+ "mappings": [],
228
+ "thresholds": {
229
+ "mode": "absolute",
230
+ "steps": [
231
+ {
232
+ "color": "green",
233
+ "value": 0
234
+ },
235
+ {
236
+ "color": "red",
237
+ "value": 80
238
+ }
239
+ ]
240
+ }
241
+ },
242
+ "overrides": []
243
+ },
244
+ "gridPos": {
245
+ "h": 4,
246
+ "w": 6,
247
+ "x": 18,
248
+ "y": 0
249
+ },
250
+ "id": 3,
251
+ "options": {
252
+ "colorMode": "value",
253
+ "graphMode": "area",
254
+ "justifyMode": "auto",
255
+ "orientation": "auto",
256
+ "percentChangeColorMode": "standard",
257
+ "reduceOptions": {
258
+ "calcs": [
259
+ "lastNotNull"
260
+ ],
261
+ "fields": "",
262
+ "values": false
263
+ },
264
+ "showPercentChange": false,
265
+ "textMode": "auto",
266
+ "wideLayout": true
267
+ },
268
+ "pluginVersion": "12.2.0",
269
+ "targets": [
270
+ {
271
+ "datasource": "SQLite",
272
+ "queryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
273
+ "queryType": "table",
274
+ "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
275
+ "refId": "A",
276
+ "timeColumns": [
277
+ "time",
278
+ "ts"
279
+ ]
280
+ }
281
+ ],
282
+ "title": "Daily Revenue",
283
+ "type": "stat"
284
+ },
285
+ {
286
+ "datasource": "SQLite",
287
+ "description": "",
288
+ "fieldConfig": {
289
+ "defaults": {
290
+ "color": {
291
+ "mode": "palette-classic"
292
+ },
293
+ "custom": {
294
+ "axisBorderShow": false,
295
+ "axisCenteredZero": false,
296
+ "axisColorMode": "text",
297
+ "axisLabel": "",
298
+ "axisPlacement": "auto",
299
+ "barAlignment": 0,
300
+ "barWidthFactor": 0.6,
301
+ "drawStyle": "bars",
302
+ "fillOpacity": 70,
303
+ "gradientMode": "none",
304
+ "hideFrom": {
305
+ "legend": false,
306
+ "tooltip": false,
307
+ "viz": false
308
+ },
309
+ "insertNulls": false,
310
+ "lineInterpolation": "linear",
311
+ "lineWidth": 1,
312
+ "pointSize": 5,
313
+ "scaleDistribution": {
314
+ "type": "linear"
315
+ },
316
+ "showPoints": "auto",
317
+ "showValues": false,
318
+ "spanNulls": false,
319
+ "stacking": {
320
+ "group": "A",
321
+ "mode": "normal"
322
+ },
323
+ "thresholdsStyle": {
324
+ "mode": "off"
325
+ }
326
+ },
327
+ "mappings": [],
328
+ "thresholds": {
329
+ "mode": "absolute",
330
+ "steps": [
331
+ {
332
+ "color": "green",
333
+ "value": 0
334
+ },
335
+ {
336
+ "color": "red",
337
+ "value": 80
338
+ }
339
+ ]
340
+ }
341
+ },
342
+ "overrides": [
343
+ {
344
+ "matcher": {
345
+ "id": "byName",
346
+ "options": "Net (sum)"
347
+ },
348
+ "properties": [
349
+ {
350
+ "id": "custom.drawStyle",
351
+ "value": "line"
352
+ },
353
+ {
354
+ "id": "custom.stacking",
355
+ "value": {
356
+ "group": "A",
357
+ "mode": "none"
358
+ }
359
+ },
360
+ {
361
+ "id": "custom.fillOpacity",
362
+ "value": 19
363
+ }
364
+ ]
365
+ }
366
+ ]
367
+ },
368
+ "gridPos": {
369
+ "h": 12,
370
+ "w": 24,
371
+ "x": 0,
372
+ "y": 4
373
+ },
374
+ "id": 11,
375
+ "options": {
376
+ "legend": {
377
+ "calcs": [],
378
+ "displayMode": "list",
379
+ "placement": "bottom",
380
+ "showLegend": true
381
+ },
382
+ "tooltip": {
383
+ "hideZeros": false,
384
+ "mode": "single",
385
+ "sort": "none"
386
+ }
387
+ },
388
+ "pluginVersion": "12.2.0",
389
+ "targets": [
390
+ {
391
+ "datasource": "SQLite",
392
+ "queryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income') THEN t.value_usd ELSE 0 END) AS \"Total Revenue\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 GROUP BY timestamp ORDER BY timestamp;",
393
+ "queryType": "table",
394
+ "rawQueryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income') THEN t.value_usd ELSE 0 END) AS \"Total Revenue\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 GROUP BY timestamp ORDER BY timestamp;",
395
+ "refId": "A",
396
+ "timeColumns": [
397
+ "timestamp"
398
+ ]
399
+ }
400
+ ],
401
+ "title": "Weekly Cashflow",
402
+ "transformations": [
403
+ {
404
+ "id": "formatTime",
405
+ "options": {
406
+ "outputFormat": "YYYY-WW",
407
+ "timeField": "timestamp",
408
+ "timezone": "browser",
409
+ "useTimezone": true
410
+ }
411
+ },
412
+ {
413
+ "id": "convertFieldType",
414
+ "options": {
415
+ "conversions": [
416
+ {
417
+ "dateFormat": "YYYY-WW",
418
+ "destinationType": "time",
419
+ "targetField": "timestamp"
420
+ }
421
+ ],
422
+ "fields": {}
423
+ }
424
+ },
425
+ {
426
+ "id": "groupBy",
427
+ "options": {
428
+ "fields": {
429
+ "Cost of Revenue": {
430
+ "aggregations": [
431
+ "sum"
432
+ ],
433
+ "operation": "aggregate"
434
+ },
435
+ "Expenses": {
436
+ "aggregations": [
437
+ "sum"
438
+ ],
439
+ "operation": "aggregate"
440
+ },
441
+ "Net": {
442
+ "aggregations": [
443
+ "sum"
444
+ ],
445
+ "operation": "aggregate"
446
+ },
447
+ "Other Expenses": {
448
+ "aggregations": [
449
+ "sum"
450
+ ],
451
+ "operation": "aggregate"
452
+ },
453
+ "Other Income": {
454
+ "aggregations": [
455
+ "sum"
456
+ ],
457
+ "operation": "aggregate"
458
+ },
459
+ "Revenue": {
460
+ "aggregations": [
461
+ "sum"
462
+ ],
463
+ "operation": "aggregate"
464
+ },
465
+ "Timestamp": {
466
+ "aggregations": [],
467
+ "operation": "groupby"
468
+ },
469
+ "Total Expenses": {
470
+ "aggregations": [
471
+ "sum"
472
+ ],
473
+ "operation": "aggregate"
474
+ },
475
+ "Total Revenue": {
476
+ "aggregations": [
477
+ "sum"
478
+ ],
479
+ "operation": "aggregate"
480
+ },
481
+ "timestamp": {
482
+ "aggregations": [],
483
+ "operation": "groupby"
484
+ }
485
+ }
486
+ }
487
+ }
488
+ ],
489
+ "type": "timeseries"
490
+ }
491
+ ],
492
+ "preload": false,
493
+ "refresh": "",
494
+ "schemaVersion": 42,
495
+ "tags": [],
496
+ "templating": {
497
+ "list": []
498
+ },
499
+ "time": {
500
+ "from": "now-6M",
501
+ "to": "now"
502
+ },
503
+ "timepicker": {},
504
+ "timezone": "",
505
+ "title": "Revenue Over Time",
506
+ "version": 4
507
+ }
@@ -58,3 +58,19 @@ providers:
58
58
  editable: false
59
59
  options:
60
60
  path: /etc/grafana/provisioning/dashboards/streams
61
+
62
+ - name: 'Revenue Over Time'
63
+ folder: 'Breakdowns'
64
+ type: file
65
+ disableDeletion: true
66
+ editable: false
67
+ options:
68
+ path: /etc/grafana/provisioning/dashboards/breakdowns
69
+
70
+ - name: 'Expenses Over Time'
71
+ folder: 'Breakdowns'
72
+ type: file
73
+ disableDeletion: true
74
+ editable: false
75
+ options:
76
+ path: /etc/grafana/provisioning/dashboards/breakdowns
@@ -78,7 +78,7 @@
78
78
  "targets": [
79
79
  {
80
80
  "datasource": "SQLite",
81
- "queryText": "SELECT\n month AS \"Month\",\n SUM(CASE WHEN s.top_category = 'Revenue' THEN value_usd ELSE 0 END) AS \"Revenue\",\n SUM(CASE WHEN s.top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END) AS \"Cost of Revenue\",\n SUM(CASE WHEN s.top_category = 'Expenses' THEN value_usd ELSE 0 END) AS \"Expenses\",\n SUM(CASE WHEN s.top_category = 'Other Income' THEN value_usd ELSE 0 END) AS \"Other Income\",\n SUM(CASE WHEN s.top_category = 'Other Expenses' THEN value_usd ELSE 0 END) AS \"Other Expense\",\n (\n SUM(CASE WHEN s.top_category = 'Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN s.top_category = 'Other Income' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Other Expenses' THEN value_usd ELSE 0 END)\n ) AS \"Sorted Net\",\n SUM(CASE WHEN s.top_category = 'Sort Me (Inbound)' THEN value_usd ELSE 0 END) AS \"Unsorted Income\",\n SUM(CASE WHEN s.top_category = 'Sort Me (Outbound)' THEN value_usd ELSE 0 END) AS \"Unsorted Expense\",\n (\n SUM(CASE WHEN s.top_category = 'Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN s.top_category = 'Other Income' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Other Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN s.top_category = 'Sort Me (Inbound)' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Sort Me (Outbound)' THEN value_usd ELSE 0 END)\n ) AS \"Net\"\nFROM (\n SELECT\n strftime('%Y-%m', datetime(t.timestamp, 'unixepoch')) AS month,\n gh.top_category,\n COALESCE(t.value_usd, 0) AS value_usd\n FROM treasury_txs AS t\n JOIN txgroups AS tg ON t.txgroup_id = tg.txgroup_id\n JOIN txgroup_hierarchy AS gh ON tg.txgroup_id = gh.txgroup_id\n WHERE t.timestamp >= strftime('%s', '2025-01-01') AND tg.name <> 'Ignore'\n) AS s\nGROUP BY month;",
81
+ "queryText": "SELECT\n month AS \"Month\",\n SUM(CASE WHEN s.top_category = 'Revenue' THEN value_usd ELSE 0 END) AS \"Revenue\",\n SUM(CASE WHEN s.top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END) AS \"Cost of Revenue\",\n SUM(CASE WHEN s.top_category = 'Expenses' THEN value_usd ELSE 0 END) AS \"Expenses\",\n SUM(CASE WHEN s.top_category = 'Other Income' THEN value_usd ELSE 0 END) AS \"Other Income\",\n SUM(CASE WHEN s.top_category = 'Other Expenses' THEN value_usd ELSE 0 END) AS \"Other Expense\",\n (\n SUM(CASE WHEN s.top_category = 'Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN s.top_category = 'Other Income' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Other Expenses' THEN value_usd ELSE 0 END)\n ) AS \"Sorted Net\",\n SUM(CASE WHEN s.top_category = 'Sort Me (Inbound)' THEN value_usd ELSE 0 END) AS \"Unsorted Income\",\n SUM(CASE WHEN s.top_category = 'Sort Me (Outbound)' THEN value_usd ELSE 0 END) AS \"Unsorted Expense\",\n (\n SUM(CASE WHEN s.top_category = 'Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN s.top_category = 'Other Income' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Other Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN s.top_category = 'Sort Me (Inbound)' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Sort Me (Outbound)' THEN value_usd ELSE 0 END)\n ) AS \"Net\"\nFROM (\n SELECT\n strftime('%Y-%m', datetime(t.timestamp, 'unixepoch')) AS month,\n gh.top_category,\n COALESCE(t.value_usd, 0) AS value_usd\n FROM treasury_txs AS t\n JOIN txgroups AS tg ON t.txgroup_id = tg.txgroup_id\n JOIN txgroup_hierarchy AS gh ON tg.txgroup_id = gh.txgroup_id\n WHERE t.timestamp >= $__from / 1000 AND tg.name <> 'Ignore'\n) AS s\nGROUP BY month;",
82
82
  "queryType": "table",
83
83
  "rawQueryText": "SELECT\n month AS \"Month\",\n SUM(CASE WHEN s.top_category = 'Revenue' THEN value_usd ELSE 0 END) AS \"Revenue\",\n SUM(CASE WHEN s.top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END) AS \"Cost of Revenue\",\n SUM(CASE WHEN s.top_category = 'Expenses' THEN value_usd ELSE 0 END) AS \"Expenses\",\n SUM(CASE WHEN s.top_category = 'Other Income' THEN value_usd ELSE 0 END) AS \"Other Income\",\n SUM(CASE WHEN s.top_category = 'Other Expenses' THEN value_usd ELSE 0 END) AS \"Other Expense\",\n (\n SUM(CASE WHEN s.top_category = 'Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN s.top_category = 'Other Income' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Other Expenses' THEN value_usd ELSE 0 END)\n ) AS \"Sorted Net\",\n SUM(CASE WHEN s.top_category = 'Sort Me (Inbound)' THEN value_usd ELSE 0 END) AS \"Unsorted Income\",\n SUM(CASE WHEN s.top_category = 'Sort Me (Outbound)' THEN value_usd ELSE 0 END) AS \"Unsorted Expense\",\n (\n SUM(CASE WHEN s.top_category = 'Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN s.top_category = 'Other Income' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Other Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN s.top_category = 'Sort Me (Inbound)' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Sort Me (Outbound)' THEN value_usd ELSE 0 END)\n ) AS \"Net\"\nFROM (\n SELECT\n strftime('%Y-%m', datetime(t.timestamp, 'unixepoch')) AS month,\n gh.top_category,\n COALESCE(t.value_usd, 0) AS value_usd\n FROM treasury_txs AS t\n JOIN txgroups AS tg ON t.txgroup_id = tg.txgroup_id\n JOIN txgroup_hierarchy AS gh ON tg.txgroup_id = gh.txgroup_id\n WHERE t.timestamp >= strftime('%s', '2025-01-01') AND tg.name <> 'Ignore'\n) AS s\nGROUP BY month;",
84
84
  "refId": "A"
@@ -96,7 +96,7 @@
96
96
  "list": []
97
97
  },
98
98
  "time": {
99
- "from": "now-6h",
99
+ "from": "now/y",
100
100
  "to": "now"
101
101
  },
102
102
  "timepicker": {},
@@ -104,5 +104,5 @@
104
104
  "title": "Monthly P&L",
105
105
  "description": "Summarizes the DAO's monthly profit and loss, providing a breakdown of sorted and unsorted financial activity for each month. Supports financial reporting and tracking the progress of transaction categorization.",
106
106
  "uid": "a63fa9a7-d4f3-4092-9bde-194add8bcbeb",
107
- "version": 1
108
- }
107
+ "version": 2
108
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dao_treasury
3
- Version: 0.0.53
3
+ Version: 0.0.55
4
4
  Summary: Produce comprehensive financial reports for your on-chain org
5
5
  Classifier: Development Status :: 3 - Alpha
6
6
  Classifier: Intended Audience :: Developers
@@ -21,6 +21,8 @@ dao_treasury.egg-info/not-zip-safe
21
21
  dao_treasury.egg-info/requires.txt
22
22
  dao_treasury.egg-info/top_level.txt
23
23
  dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml
24
+ dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json
25
+ dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json
24
26
  dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json
25
27
  dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json
26
28
  dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "dao-treasury"
3
- version = "0.0.53"
3
+ version = "0.0.55"
4
4
  description = "Produce comprehensive financial reports for your on-chain org"
5
5
  authors = ["BobTheBuidler <bobthebuidlerdefi@gmail.com>"]
6
6
  license = "MIT"
File without changes
File without changes
File without changes
File without changes