Added run.sh and README.md

This commit is contained in:
Andrew Lalis 2024-08-01 18:53:03 -04:00
parent 76d1cfccb0
commit 0362fe3323
2 changed files with 57 additions and 0 deletions

14
README.md Normal file
View File

@ -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.|

43
run.sh Executable file
View File

@ -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 <command>
# where <command> 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