Skip to content

perezperret/airledger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Airledger

A simple, toy ledger written in Go as a learning project. Basically provides endpoints to register accounts and send transactions between them, using Postgres locks to to cache balances on each transaction. I hope I can keep improving it (some ideas in TASKS.md) as it's been useful for learning.

I've relied a lot on LLMs to get unstuck so there is still a lot of repetition.

It uses Echo to hndle HTTP requests, I would like to eventually move it to use the standard library.

Set up

Create a database with db/create && db/migrate there is currently no DB cleanup or segregation for tests so the DB will get dirty, can be reset with db/destroy && db/create && db/migrate

Running the server

Run go run app/app.go. (Needs a running postgres service)

Testing

Just run go test ./... to run tests on all subpackages. I would like to add some smoketests starting a server and sending HTTP requests.

Improvements

I would like to add some e2e tests, clean up the code a bit, add processors so external services can be used to move money outside the managed ledgers and would like to try adding a message broker to split up processing.

About

Toy ledger built with Go (golang)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages