diff --git a/README.md b/README.md new file mode 100644 index 0000000..525ab6f --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# Finnow + +A financial tracking and planning application for individuals! + +This application consists of a backend API that separately stores and accesses each user's data, and a Flutter-based frontend for desktop and mobile applications for users. + +There's a `run.sh` script available in the main directory to help with running the various parts of the app. The following commands are available: + +|Command|Description| +|--- |--- | +|`./run.sh api`|Runs the API locally for development.| +|`./run.sh app`|Runs the app locally for development.| +|`./run.sh clean`|Cleans all projects of build artefacts and other temporary files.| +|`./run.sh build`|Builds all projects to produce artefacts for final usage.| diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..fdcc7a5 --- /dev/null +++ b/run.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# This script serves as an easy starting point for common project actions like +# running or building the Finnow projects. Invoke it like so: +# > ./run.sh +# where is one of the below commands. + +# "api" command to start the API. +if [ $1 = "api" ]; then + echo "Running API..." + dub --root=finnow-api --quiet run + +# "app" command to start the app. +elif [ $1 = "app" ]; then + echo "Running APP..." + cd flutter_app + flutter run + cd .. + +# "clean" command to clean all projects. +elif [ $1 = "clean" ]; then + dub --root=finnow-api --quiet clean + echo "Cleaned api." + cd flutter_app + flutter clean --suppress-analytics + cd .. + echo "Cleaned flutter app." + +# "build" command to build all projects. +elif [ $1 = "build" ]; then + dub --root=finnow-api --quiet clean + dub --root=finnow-api --quiet build --build=release + echo "Built api." + cd flutter_app + flutter build linux + # flutter build apk + cd .. + echo "Built apps." + +else + echo "Unknown command: $1" + exit 1 +fi