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
This commit is contained in:
2026-04-08 16:21:00 +02:00
parent 212f19ac19
commit 8aafe681b1
46 changed files with 4927 additions and 19 deletions
+8
View File
@@ -0,0 +1,8 @@
bin/
obj/
*.user
*.suo
.vs/
*.DotSettings.user
node_modules/
dist/
+13
View File
@@ -0,0 +1,13 @@
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapGet("/api/health", () => Results.Ok(new { status = "healthy" }));
app.UseDefaultFiles();
app.UseStaticFiles();
app.MapFallbackToFile("index.html");
app.Run();
public partial class Program { }
@@ -0,0 +1,31 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:50697",
"sslPort": 0
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5222",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
+18
View File
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>UsingCash.Api</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\UsingCash.Common\UsingCash.Common.csproj" />
<ProjectReference Include="..\UsingCash.Basic\UsingCash.Basic.csproj" />
<ProjectReference Include="..\UsingCash.Database\UsingCash.Database.csproj" />
<ProjectReference Include="..\UsingCash.Logic\UsingCash.Logic.csproj" />
<ProjectReference Include="..\UsingCash.Backend\UsingCash.Backend.csproj" />
</ItemGroup>
</Project>
+6
View File
@@ -0,0 +1,6 @@
@UsingCash.Api_HostAddress = http://localhost:5222
GET {{UsingCash.Api_HostAddress}}/weatherforecast/
Accept: application/json
###
@@ -0,0 +1,35 @@
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"Microsoft.AspNetCore": "Information"
}
},
"Database": {
"Read": {
"Server": "localhost",
"Database": "usingcash_dev",
"Username": "root",
"Password": "",
"SslMode": "None"
},
"Write": {
"Server": "localhost",
"Database": "usingcash_dev",
"Username": "root",
"Password": "",
"SslMode": "None"
},
"Admin": {
"Server": "localhost",
"Database": "usingcash_dev",
"Username": "root",
"Password": "",
"SslMode": "None"
}
},
"Storage": {
"DocumentRoot": "./dev-uploads"
},
"DevMode": true
}
+41
View File
@@ -0,0 +1,41 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"Database": {
"Read": {
"Server": "localhost",
"Database": "usingcash",
"Username": "uc_read",
"Password": "",
"SslMode": "Preferred"
},
"Write": {
"Server": "localhost",
"Database": "usingcash",
"Username": "uc_write",
"Password": "",
"SslMode": "Preferred"
},
"Admin": {
"Server": "localhost",
"Database": "usingcash",
"Username": "uc_admin",
"Password": "",
"SslMode": "Preferred"
}
},
"Smtp": {
"Host": "localhost",
"Port": 25,
"Username": "",
"Password": ""
},
"Storage": {
"DocumentRoot": "/var/lib/usingcash/upload"
},
"DevMode": false
}
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>UsingCash.Backend</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\UsingCash.Common\UsingCash.Common.csproj" />
<ProjectReference Include="..\UsingCash.Basic\UsingCash.Basic.csproj" />
<ProjectReference Include="..\UsingCash.Database\UsingCash.Database.csproj" />
<ProjectReference Include="..\UsingCash.Logic\UsingCash.Logic.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.*" />
</ItemGroup>
</Project>
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>UsingCash.Basic</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\UsingCash.Common\UsingCash.Common.csproj" />
</ItemGroup>
</Project>
@@ -0,0 +1,7 @@
namespace UsingCash.Common.Enums;
public enum CryptoChain
{
Unknown = 0,
BitcoinCash
}
@@ -0,0 +1,16 @@
namespace UsingCash.Common.Enums;
public enum DocumentType
{
Unknown = 0,
ExpenseReceipt,
InboundInvoice,
OutboundInvoice,
FinancialTransactionSupport,
FinancialAccountDocument,
BankStatement,
BankTransactionData,
BankPaymentData,
OrganizationLogo,
TemporaryUpload
}
@@ -0,0 +1,13 @@
namespace UsingCash.Common.Enums;
public enum ExpenseClaimStatus
{
Unknown = 0,
Created,
Attested,
Validated,
Approved,
PaidOut,
Denied,
Refunded
}
@@ -0,0 +1,10 @@
namespace UsingCash.Common.Enums;
public enum FinancialAccountType
{
Unknown = 0,
Asset,
Debt,
Income,
Cost
}
@@ -0,0 +1,14 @@
namespace UsingCash.Common.Enums;
public enum FinancialDependencyType
{
Unknown = 0,
ExpenseClaim,
InboundInvoice,
OutboundInvoice,
Salary,
CashAdvance,
Payout,
FinancialTransaction,
VatReport
}
@@ -0,0 +1,11 @@
namespace UsingCash.Common.Enums;
public enum InvoiceStatus
{
Unknown = 0,
Created,
Attested,
Paid,
Closed,
Denied
}
@@ -0,0 +1,9 @@
namespace UsingCash.Common.Enums;
public enum PayoutStatus
{
Unknown = 0,
Created,
Executed,
Confirmed
}
+24
View File
@@ -0,0 +1,24 @@
namespace UsingCash.Common.Enums;
public enum Permission
{
Unknown = 0,
CanViewLedgers,
CanEditTransactions,
CanAttestExpenses,
CanValidateReceipts,
CanManagePayouts,
CanManageCrypto,
CanManageBudgets,
CanManageAccounts,
CanUploadDocuments,
CanViewDocuments,
CanSendMail,
CanAdminOrg,
CanAdminSystem,
CanManageUsers,
CanManageRoles,
CanCloseLedgers,
CanCreateInvoices,
CanManageInvoices
}
+11
View File
@@ -0,0 +1,11 @@
namespace UsingCash.Common;
public interface IHasIdentity
{
int Identity { get; }
}
public interface IHasIdentities
{
IEnumerable<int> Identities { get; }
}
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>UsingCash.Common</RootNamespace>
</PropertyGroup>
</Project>
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>UsingCash.Database</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\UsingCash.Common\UsingCash.Common.csproj" />
<ProjectReference Include="..\UsingCash.Basic\UsingCash.Basic.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MySqlConnector" Version="2.*" />
</ItemGroup>
</Project>
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>UsingCash.Logic</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\UsingCash.Common\UsingCash.Common.csproj" />
<ProjectReference Include="..\UsingCash.Basic\UsingCash.Basic.csproj" />
<ProjectReference Include="..\UsingCash.Database\UsingCash.Database.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NBitcoin" Version="7.*" />
</ItemGroup>
</Project>
+18
View File
@@ -0,0 +1,18 @@
namespace UsingCash.Migration;
public class Program
{
public static int Main(string[] args)
{
Console.WriteLine("UsingCash Migration Tool");
Console.WriteLine("Usage: UsingCash.Migration --v5-conn <connstr> --v6-conn <connstr> [--verify] [--audit]");
if (args.Length == 0)
{
Console.WriteLine("No arguments provided. Exiting.");
return 1;
}
return 0;
}
}
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>UsingCash.Migration</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\UsingCash.Common\UsingCash.Common.csproj" />
<ProjectReference Include="..\UsingCash.Basic\UsingCash.Basic.csproj" />
<ProjectReference Include="..\UsingCash.Database\UsingCash.Database.csproj" />
<ProjectReference Include="..\UsingCash.Logic\UsingCash.Logic.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MySqlConnector" Version="2.*" />
</ItemGroup>
</Project>
+1
View File
@@ -0,0 +1 @@
global using Xunit;
+14
View File
@@ -0,0 +1,14 @@
namespace UsingCash.Tests;
public class SolutionBuildTest
{
[Fact]
public void AllProjectsReferenceCorrectly()
{
var commonType = typeof(Common.IHasIdentity);
var enumType = typeof(Common.Enums.FinancialAccountType);
Assert.NotNull(commonType);
Assert.NotNull(enumType);
}
}
@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>UsingCash.Tests</RootNamespace>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\UsingCash.Common\UsingCash.Common.csproj" />
<ProjectReference Include="..\UsingCash.Basic\UsingCash.Basic.csproj" />
<ProjectReference Include="..\UsingCash.Database\UsingCash.Database.csproj" />
<ProjectReference Include="..\UsingCash.Logic\UsingCash.Logic.csproj" />
<ProjectReference Include="..\UsingCash.Api\UsingCash.Api.csproj" />
<ProjectReference Include="..\UsingCash.Migration\UsingCash.Migration.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.*" />
<PackageReference Include="xunit" Version="2.*" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.*" />
</ItemGroup>
</Project>
+64
View File
@@ -0,0 +1,64 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsingCash.Common", "UsingCash.Common\UsingCash.Common.csproj", "{FC8F60E0-4B8F-4396-B76C-D0DAB5443563}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsingCash.Basic", "UsingCash.Basic\UsingCash.Basic.csproj", "{D2ECBE37-9634-4D69-84A8-628CD8B029DA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsingCash.Database", "UsingCash.Database\UsingCash.Database.csproj", "{2749E72C-3FF3-423E-B306-2F5CEB90D867}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsingCash.Logic", "UsingCash.Logic\UsingCash.Logic.csproj", "{205464FC-E082-489F-9D08-505C00405609}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsingCash.Api", "UsingCash.Api\UsingCash.Api.csproj", "{2655741C-7AF7-4452-85F9-1A027603F3DB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsingCash.Backend", "UsingCash.Backend\UsingCash.Backend.csproj", "{ACF1E0ED-2BE2-4627-BA7B-5AD5BF05185E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsingCash.Migration", "UsingCash.Migration\UsingCash.Migration.csproj", "{984B0C84-CECC-4B6B-88FA-C8085888CCCF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsingCash.Tests", "UsingCash.Tests\UsingCash.Tests.csproj", "{412BFD43-6B22-41C1-AA3C-22C5939BBC82}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FC8F60E0-4B8F-4396-B76C-D0DAB5443563}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FC8F60E0-4B8F-4396-B76C-D0DAB5443563}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FC8F60E0-4B8F-4396-B76C-D0DAB5443563}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FC8F60E0-4B8F-4396-B76C-D0DAB5443563}.Release|Any CPU.Build.0 = Release|Any CPU
{D2ECBE37-9634-4D69-84A8-628CD8B029DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D2ECBE37-9634-4D69-84A8-628CD8B029DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D2ECBE37-9634-4D69-84A8-628CD8B029DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D2ECBE37-9634-4D69-84A8-628CD8B029DA}.Release|Any CPU.Build.0 = Release|Any CPU
{2749E72C-3FF3-423E-B306-2F5CEB90D867}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2749E72C-3FF3-423E-B306-2F5CEB90D867}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2749E72C-3FF3-423E-B306-2F5CEB90D867}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2749E72C-3FF3-423E-B306-2F5CEB90D867}.Release|Any CPU.Build.0 = Release|Any CPU
{205464FC-E082-489F-9D08-505C00405609}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{205464FC-E082-489F-9D08-505C00405609}.Debug|Any CPU.Build.0 = Debug|Any CPU
{205464FC-E082-489F-9D08-505C00405609}.Release|Any CPU.ActiveCfg = Release|Any CPU
{205464FC-E082-489F-9D08-505C00405609}.Release|Any CPU.Build.0 = Release|Any CPU
{2655741C-7AF7-4452-85F9-1A027603F3DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2655741C-7AF7-4452-85F9-1A027603F3DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2655741C-7AF7-4452-85F9-1A027603F3DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2655741C-7AF7-4452-85F9-1A027603F3DB}.Release|Any CPU.Build.0 = Release|Any CPU
{ACF1E0ED-2BE2-4627-BA7B-5AD5BF05185E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ACF1E0ED-2BE2-4627-BA7B-5AD5BF05185E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ACF1E0ED-2BE2-4627-BA7B-5AD5BF05185E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ACF1E0ED-2BE2-4627-BA7B-5AD5BF05185E}.Release|Any CPU.Build.0 = Release|Any CPU
{984B0C84-CECC-4B6B-88FA-C8085888CCCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{984B0C84-CECC-4B6B-88FA-C8085888CCCF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{984B0C84-CECC-4B6B-88FA-C8085888CCCF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{984B0C84-CECC-4B6B-88FA-C8085888CCCF}.Release|Any CPU.Build.0 = Release|Any CPU
{412BFD43-6B22-41C1-AA3C-22C5939BBC82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{412BFD43-6B22-41C1-AA3C-22C5939BBC82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{412BFD43-6B22-41C1-AA3C-22C5939BBC82}.Release|Any CPU.ActiveCfg = Release|Any CPU
{412BFD43-6B22-41C1-AA3C-22C5939BBC82}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal