A possible backend implementation for the Budget apps on Android & iOS
Find a file
William Brawner 1eab86489b Update repository for GitHub Actions builds
Signed-off-by: William Brawner <me@wbrawner.com>
2023-03-04 10:15:03 -07:00
.github/workflows Update repository for GitHub Actions builds 2023-03-04 10:15:03 -07:00
api Truncate recurring transaction times to seconds 2023-03-04 09:16:49 -07:00
app Generate OpenAPI Spec 2023-02-18 22:51:51 -07:00
core Update Ktor to 2.0.2 2022-06-22 13:42:01 -05:00
db Implement password reset 2022-06-03 22:46:02 -06:00
gradle Bump gradle wrapper to 7.6 2022-12-11 20:27:29 -06:00
storage Implement password reset 2022-06-03 22:46:02 -06:00
testhelpers Implement password reset 2022-06-03 22:46:02 -06:00
web Update Ktor to 2.0.2 2022-06-22 13:42:01 -05:00
.gitignore Remove swagger 2021-03-31 20:21:16 -07:00
build.gradle.kts Use gradle version catalogs 2022-06-02 20:28:44 -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
gradlew Migrate from JDK 8 -> 11 and use Gradle instead of Maven 2020-02-10 17:57:53 -07:00
gradlew.bat Migrate from JDK 8 -> 11 and use Gradle instead of Maven 2020-02-10 17:57:53 -07:00
LICENSE Add license 2019-10-03 15:24:43 -07:00
README.md Update Ktor to 2.0.2 2022-06-22 13:42:01 -05:00
settings.gradle.kts Use gradle version catalogs 2022-06-02 20:28:44 -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

  • JDK 14 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 with gradle:

./gradlew run

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
TWIGS_SMTP_FROM From email address for automated emails sent from Twigs
TWIGS_SMTP_HOST SMTP server host for sending emails
TWIGS_SMTP_PORT SMTP server port for sending emails
TWIGS_SMTP_USER SMTP server username for sending emails
TWIGS_SMTP_PASS SMTP server password for sending emails

Building

Building the app is also handled with gradle:

./gradlew shadowJar