A possible backend implementation for the Budget apps on Android & iOS
Find a file
William Brawner f327ffbcfb WIP: Migrate to Go
Signed-off-by: William Brawner <me@wbrawner.com>
2022-05-23 20:44:15 -06:00
.github/workflows Fix cross-platform docker builds 2022-05-18 18:38:18 -06:00
api/src/main/kotlin/com/wbrawner/twigs WIP: Migrate to Go 2022-05-23 20:44:15 -06:00
app Fix monthly recurring transactions not being created when the year changes 2022-02-02 21:21:20 -07:00
core Bump all dependencies 2021-12-18 07:18:52 -07:00
db Bump all dependencies 2021-12-18 07:18:52 -07:00
storage Bump all dependencies 2021-12-18 07:18:52 -07:00
testhelpers Bump all dependencies 2021-12-18 07:18:52 -07:00
web Bump all dependencies 2021-12-18 07:18:52 -07:00
.gitignore WIP: Migrate to Go 2022-05-23 20:44:15 -06:00
docker-compose.yml WIP: Finish ktor migration 2021-08-12 15:22:06 -06:00
Dockerfile Add docker builds for arm 2022-05-18 18:35:15 -06:00
go.mod WIP: Migrate to Go 2022-05-23 20:44:15 -06:00
LICENSE Add license 2019-10-03 15:24:43 -07:00
README.md WIP: Migrate to Go 2022-05-23 20:44:15 -06:00
twigs.go WIP: Migrate to Go 2022-05-23 20:44:15 -06:00

Twigs Server

This is the backend application that powers the Android, iOS, and web applications for Twigs, a personal finance/budgeting app. None of these apps are complete, so expect bugs, and they are all in various stages of development, so expect some feature disparity between platforms.

Prerequisites

  • Go 1.16 or newer
  • PostgreSQL 13 or newer
  • (optional) Docker

Running

Prior to running the app, make sure you have a PostgreSQL server running, with a database and user ready to go. To avoid the hassle of figuring out how to get it installed locally, using Docker is recommended, and a sample docker-compose.yml file is included in the root of the repository. If you already have a PostgreSQL server running, you can run the app from the command line:

go run twigs.go

Configuration

Some parameters of Twigs can be configured via environment variables:

Environment Variable Default Value Note
TWIGS_PORT 8080 Port for web server to listen on
TWIGS_DB_HOST localhost PostgreSQL server host
TWIGS_DB_PORT 5432 PostgreSQL server port
TWIGS_DB_NAME twigs PostgreSQL database name
TWIGS_DB_USER twigs PostgreSQL database user
TWIGS_DB_PASS twigs PostgreSQL database password
TWIGS_PW_SALT Salt to use for password, generated if empty or null

Building

go build