Commit Graph
4222 Commits
Author SHA1 Message Date
rick 40eefc6163 Add stored procedures, triggers, grants, and seed data (section 4)
CI / docker (push) Has been cancelled
CI / build-and-test (push) Has started running
Stored procedures organized by domain:
- 003-procedures-financial.sql: CreateFinancialTransaction (with gap-free
  OrganizationSequenceId), AddTransactionRow (with foreign currency),
  tag/dependency management, account CRUD, budgets, period closing
- 004-procedures-apar.sql: Expense claims (with VatCents, groups),
  inbound/outbound invoices (with sequence IDs, VAT), payouts, payments,
  payment groups, refunds, documents
- 005-procedures-support.sql: Users, RBAC (roles/permissions/assignments),
  organizations (VAT config, tax info), crypto (hot wallet addresses,
  UTXOs), exchange rates (micro-BTC scaling), mail queue, event queue,
  system settings

Security layer:
- 006-triggers.sql: INSERT/UPDATE/DELETE triggers on FinancialTransactionRows
  that reject operations where the transaction date falls in a closed
  fiscal period (defense-in-depth alongside application enforcement)
- 007-grants.sql: Three-tier MySQL users (uc_read SELECT, uc_write
  EXECUTE, uc_admin ALL)

Seed data:
- 008-seed.sql: Financial dependency types, BCH crypto chain, schema version

Combined initialization script:
- 000-initialize.sql: Runs all files in order

Made-with: Cursor
2026-04-08 16:28:33 +02:00
rick 0514b9bd18 Add v6 database schema DDL (sections 2-3)
Two schema files covering all v6 tables:
- 001-tables.sql: Organizations (denormalized OOD), Users, Roles/RBAC,
  FinancialAccounts (with OwnerUserId, native currency, bitcoin fields),
  FinancialTransactions (with OrganizationSequenceId, BlockchainHash),
  FinancialTransactionRows (with foreign currency, bitcoin derivation),
  Dependencies, Tags/TagSets/TagTypes, Budgets
- 002-tables-apar.sql: ExpenseClaims (with VatCents, groups),
  InboundInvoices (with native currency, bitcoin satoshis),
  OutboundInvoices + Items (with credit links, VAT),
  Payouts, PaymentGroups, Payments, Refunds, Documents,
  FinancialAccountDocuments, Currencies, ExchangeRateSnapshots +
  Datapoints (micro-BTC scaling), CryptoChains, HotWalletAddresses,
  HotWalletUtxos, MailQueue, MailTemplates, EventQueue, SystemSettings

Key v5→v6 differences:
- ObjectOptionalData EAV denormalized to first-class columns
- FinancialTransactionRowsNativeCurrency merged into Rows table
- People → Users (simplified, no geography/membership)
- utf8mb4 throughout, no legacy latin1
- Amount (double) columns removed; AmountCents (bigint) only
- Budget tables unified (annual + monthly in one table)
- v5 FlatData → SystemSettings

Also updates data-migration spec for mysqldump-based workflow.

Made-with: Cursor
2026-04-08 16:25:58 +02:00
rick 8aafe681b1 Scaffold v6 solution, frontend, CI, and Docker
CI / docker (push) Has been cancelled
CI / build-and-test (push) Has been cancelled
Section 1 complete (tasks 1.1-1.7):
- .NET 8 solution with 8 projects (Common, Basic, Database, Logic, Api,
  Backend, Migration, Tests) and correct dependency graph
- NuGet deps: MySqlConnector, NBitcoin, Microsoft.Extensions.Hosting,
  xunit, coverlet
- Common layer: IHasIdentity, enums (Permission, FinancialAccountType,
  DocumentType, CryptoChain, ExpenseClaimStatus, InvoiceStatus,
  PayoutStatus, FinancialDependencyType)
- React + TypeScript + Vite frontend with MUI, react-router, react-i18next
- Localization: EN, SV, DE translation files
- Vite builds to src/UsingCash.Api/wwwroot for static serving
- Multi-stage Dockerfile: Node build + .NET build -> aspnet runtime
- Gitea Actions CI: build, test, lint, Docker image
- appsettings.json with read/write/admin DB credential structure

Also updates data-migration spec/design for mysqldump-based workflow.

Made-with: Cursor
2026-04-08 16:21:00 +02:00
rick 212f19ac19 Add v6-rewrite OpenSpec: proposal, design, specs, and tasks
Complete specification for rewriting Swarmops v5 as using.cash v6:
- Proposal: scope buckets (Working Rewrite / First Beyond Working / Maybe),
  non-goals (governance, geography, memberships permanently cut)
- Design: 18 architectural decisions including preserved patterns
  (Basic/Logic, stored procs, credential split), new patterns (repository
  classes, chain abstraction, rate providers), and operational concerns
  (Galera awareness, continuation transactions, VAT booking, OOD
  denormalization)
- Specs: 17 capability specifications with SHALL/MUST requirements and
  WHEN/THEN scenarios, covering accounting core, AP/AR, crypto treasury,
  exchange rates, organizations, users/auth, documents, comms, dashboard,
  end-of-month, backend worker, event bus, data migration, API layer,
  frontend app, and CI/packaging
- Tasks: 145 implementation tasks grouped by subsystem, ordered by
  dependency (migration gates API/frontend work)

Two rounds of adversarial review incorporated.

Made-with: Cursor
2026-04-08 16:02:58 +02:00
Rick Falkvinge 15a5a0ce76 Changing something to force a build 2024-10-07 13:10:37 +02:00
Rick Falkvinge dd137f6ce8 Changing something to force a build 2024-10-07 12:56:39 +02:00
Rick Falkvinge 63f78beb77 Also works better if the URI is unescaped 2024-10-07 12:43:16 +02:00
Rick Falkvinge 36cf5d229e Works better if you spell URI correctly 2024-10-07 12:33:18 +02:00
Rick Falkvinge b85b0692f1 Works better if you spell URI correctly 2024-10-07 12:24:50 +02:00
Rick Falkvinge 3116d213b8 Adapting QR code generation to run locally 2024-10-07 12:03:58 +02:00
Rick Falkvinge babc87041f Removed Google Charts for QR generation 2024-10-07 11:03:26 +02:00
Rick Falkvinge d73cc256c7 Fixed Postbank DE import 2023 2023-09-06 19:22:41 +02:00
Rick Falkvinge f1c5a9eea2 Forcing a build 2023-09-06 16:43:44 +02:00
Rick Falkvinge 9e16bccd6c Works better spelled correctly 2023-09-06 16:19:00 +02:00
Rick Falkvinge bf8508bcea Another Postbank-DE fix 2023-09-06 16:09:11 +02:00
Rick Falkvinge 02731cb286 Update Postbank format 2023-09-06 15:53:11 +02:00
Rick Falkvinge ef56586db3 Fuckup 2023-09-06 15:08:52 +02:00
Rick Falkvinge 6d3ad008ed Merge branch 'master' of https://github.com/Swarmops/Swarmops 2023-09-06 11:53:24 +02:00
Rick Falkvinge 4b8722c557 Update SEB field names 2023 2023-09-06 11:26:00 +02:00
Rick Falkvinge 1b96bf3d6f Forcing a build to test build machine dist-upgrade 2022-08-16 21:18:24 +02:00
Rick Falkvinge 793401b22c Forcing build 2022-08-14 15:26:28 +02:00
Rick Falkvinge 99ca6fe76d Removed hardcoded dummy items 2022-08-10 18:11:51 +02:00
Rick Falkvinge a8e49e7cb2 Added closing to EOM page 2022-08-10 17:32:18 +02:00
Rick Falkvinge ad868c0988 Dumbfix 2022-08-10 17:22:53 +02:00
Rick Falkvinge 41f98c990f Loc for End-of-Month 2022-08-10 16:41:23 +02:00
Rick Falkvinge c4416c8bbd Dumbfix 2022-08-10 16:23:24 +02:00
Rick Falkvinge 89514c1796 More remade localization 2022-08-10 16:00:28 +02:00
Rick Falkvinge 6387b80963 Relocced one more page 2022-08-10 15:11:56 +02:00
Rick Falkvinge a3b6f9c52c Attempt 2 to allow for decimal point 2022-08-10 10:20:51 +02:00
Rick Falkvinge b3fea84e7d Loc of bases will probably get rid of some problems 2022-08-10 09:58:06 +02:00
Rick Falkvinge bdb663fd95 Permit use of decimal comma 2022-08-10 09:32:15 +02:00
Rick Falkvinge dd666cd950 Search Replace syntax fix 2022-08-10 09:22:35 +02:00
Rick Falkvinge 5353aad610 Loc should be done for Inspect Ledgers 2022-08-10 08:56:27 +02:00
Rick Falkvinge 055324978e More loc 2022-08-09 21:34:16 +02:00
Rick Falkvinge 2ee09b13c8 More Loc 2022-08-09 21:30:29 +02:00
Rick Falkvinge 4465437cd0 Update Loc 2022-08-09 17:44:00 +02:00
Rick Falkvinge c7c48af695 Untangling loc as EOL QFE 2022-08-09 17:16:44 +02:00
Rick Falkvinge 4dd68e0eb0 Let's test if this was the intended loc method 2022-08-09 09:19:41 +02:00
Rick Falkvinge 79c9e1cbaf Untangling loc mess 2022-08-08 17:54:04 +02:00
Rick Falkvinge 843812b6e1 Fix to loc 2022-08-08 11:29:12 +02:00
Rick Falkvinge 8e3dbf308a Added expense claim spec loc 2022-08-08 10:18:09 +02:00
Rick Falkvinge 6386e49de1 Why were those commented out 2022-08-06 08:50:56 +02:00
Rick Falkvinge 296d0f6e15 And another fix for the right field 2022-08-05 18:37:56 +02:00
Rick Falkvinge 67997d506f Testing fix for nullref 2022-08-05 18:34:31 +02:00
Rick Falkvinge 23b8c77f07 Fixed possible nullref 2022-08-03 15:31:02 +02:00
Rick Falkvinge 3847e9498c Removing so-called Fulhack for debugging 2022-08-03 12:21:18 +02:00
Rick Falkvinge bac750c204 Merge branch 'master' of https://github.com/Swarmops/Swarmops 2022-08-03 12:01:36 +02:00
Rick Falkvinge 84f74b0543 Fix for Pages.Financial loc 2022-08-03 12:01:29 +02:00
Rick FalkvingeandGitHub f6e384df9c Merge pull request #39 from Swarmops/dependabot/nuget/Backend/System.Text.RegularExpressions-4.3.1
Bump System.Text.RegularExpressions from 4.3.0 to 4.3.1 in /Backend
2022-08-03 10:38:26 +02:00
Rick FalkvingeandGitHub 9a453cca9a Merge pull request #40 from Swarmops/dependabot/nuget/Site/System.Text.RegularExpressions-4.3.1
Bump System.Text.RegularExpressions from 4.3.0 to 4.3.1 in /Site
2022-08-03 10:38:11 +02:00