A multi-tenant financial management application built with .NET Aspire, PostgreSQL, and React.
This project uses multiple methods to store sensitive API credentials:
-
Copy
.env.exampleto.env:cp .env.example .env
-
Edit
.envand add your actual Akahu API credentials:AKAHU_USER_TOKEN=your_actual_user_token AKAHU_APP_TOKEN=your_actual_app_token -
Important: The
.envfile is already in.gitignoreand will not be committed to version control.
-
Copy
missedpay.ApiService/appsettings.Development.json.exampletoappsettings.Development.json:cp missedpay.ApiService/appsettings.Development.json.example missedpay.ApiService/appsettings.Development.json
-
Edit
appsettings.Development.jsonand add your actual tokens in theAkahusection:{ "Akahu": { "UserToken": "your_actual_user_token", "AppToken": "your_actual_app_token" } } -
Important:
appsettings.Development.jsonis in.gitignoreand will not be committed.
Note: Environment variables take precedence over appsettings.json values.
- Sign up at Akahu Developers
- Create an application to get your App Token
- Complete the OAuth flow to get a User Token
missedpay.AppHost- .NET Aspire orchestrationmissedpay.ApiService- REST API with multi-tenancymissedpay.Web- Blazor web applicationmissedpay.Frontend- React frontend applicationmissedpay.ServiceDefaults- Shared service configuration
The application implements production-ready multi-tenancy using:
- UUIDv7 tenant IDs
- Header-based tenant resolution (
X-Tenant-Idheader) - Global query filters in Entity Framework Core
- JWT-based tenant resolution support
See MULTI_TENANCY.md for detailed documentation.
- Go the AppHost directory
cd missedpay.AppHost - Set up your
.envfile (see above) - Run with .NET Aspire:
dotnet run
Use the missedpay.ApiService.http file with the VS Code REST Client extension. The file automatically loads tokens from your .env file.
The query to load Accounts and Transactions from Akahu is:
POST {{ApiService_HostAddress}}/api/Akahu/refresh-all