An API and Web App for managing budgets with allocations (buckets of funds based on history) and interfacing with Banks, and FireFlyIII.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
William Lewis dc145649d6
Added versioning
3 months ago
.vscode Added tests and void accounts/envelopes 4 months ago
ActiveAllocator.API Added versioning 3 months ago
ActiveAllocator.Tests Changed project names 4 months ago
Postgres Added authentication 6 months ago
.gitignore Added authentication 6 months ago
ActiveAllocator.code-workspace Added transactions and Accounts 5 months ago
ActiveAllocator.sln Linked the solution and projects 4 months ago Added rule trigger endpoints 4 months ago Added scripts. Fixed front-end url issues. 4 months ago Added scripts. Fixed front-end url issues. 4 months ago Added back-end functionality for API Keys. 3 months ago Added basic run scripts 4 months ago Added basic run scripts 4 months ago

Active Allocator - React & .NET Core API

An API and Web App for managing budgets with allocations (buckets of funds based on history) and interfacing with Banks, and FireFlyIII.

I started with this tutorial. Here is another one that is handy for good structure.

Reference for adding JWT authentication is here.

Docker Repository Usage

Back End

Api Key guide

User Interface


React Select


React Select is a dropdown input react component.

Here is how you load up a default value: ('value' is the important property on the 'Select' component)

    parseAccountValue(debitAccount) !== undefined && 
    <div className="form-group">
        <label className="control-label">Debit Account: </label>
        <Select onChange={(e) => setDebitAccount(e.value)} name="debitAccount" options={accounts} isSearchable="true" isLoading={loading} value={parseAccountValue(debitAccount)} />
  • View Income overview

    • Projected Income - Based on statistical metrics (with controls for fine-tuning sample date range)
    • Historical Income (with source breakdown)
  • View Allocations (Budgets)

    • View balances for any given date (defaulting today)
    • Show total allocated amount for each account in the given timeframe
    • Detail View for each account
      • Recent Transactions
    • Edit allocation rules for a given account
  • Broad Settings

    • Timescale of App (month? 2-week? quarter?)
    • Choose statistical metrics for estimating allocation amount (default to simple average (with lookback range))

Guides and References

Easy background worker guide

Settings / Configuration

Adding Settings with Docker and appsettings.json. Link

.NET 7 Configuration with Minimal API

API Token vs Key

Security analysis / basic overview


.NET Puppeteer Implementation - Puppeteer Sharp



Dev Environment Setup

On Archlinux install the following to use dotnet: sudo pacman -Sy dotnet-sdk dotnet-runtime aspnet-runtime.

For Archlinux install docker with sudo pacman -Sy docker docker-compose.

Then run systemctl start docker.service and systemctl enable docker.service to start and enable on boot the docker engine.

When running pgAdmin (a container in the docker compose stack) if there are errors about permission denied, you will need to set the owner of the directory to user 5050. You can do this with:

sudo chown -R 5050:5050 ./Postgres/pg-admin_data

You may also need to allow full rwx (Read, Write, and Execute) rights on the directory.

sudo chmod -R 777 ./Postgres/pg-admin_data

Install React dependencies if needed - npm install in the ClientApp directory.

Download 'Reverse Engineering' Tools

dotnet tool install --global dotnet-ef
dotnet tool install --global dotnet-aspnet-codegenerator

Confirm it is working with dotnet ef.


  1. Create Entity (or Model) for object.
  2. Add DbSet<object> entry in your DbContext.
  3. Migration
  4. Endpoints (if needed)

To add Migration for new entity:

dotnet ef migrations add InitialCreate
dotnet ef database update

For generating API endpoints for an entity called Note:

$HOME/.dotnet/tools/dotnet-aspnet-codegenerator controller -name NotesController -async -api -m Note -dc MyDBContext --relativeFolderPath Controllers


Create Docker Image

Running sudo dotnet publish will create a docker image targetting linux x64 with the "DefaultContainer" profile and image name of "". Edit the .csproj file to change the version of the image.

To create a docker image explicitly run sudo dotnet publish --os linux --arch x64 -p:PublishProfile=DefaultContainer in the same folder as the dotnet solution. Because we added the Microsoft.NET.Build.Containers package, we don't actually need to use the Dockerfile.

Pushing Docker Image

You will have to be logged in. sudo docker login

First tag sudo docker tag <image_id> (check that the version is right).

Then push sudo docker push

Using API

API should be something like - https://localhost:7260/swagger