Phi is an open source system for managing your finances. Phi provides tools to efficiently ingest finance data and generate financial reports such as trial balance, income statement, balance sheet and journal.
It is written in go, consisting of multiple containerized microservices. The services communicate with GRPC and use PostgresQL compatible databases for storage. Currently Phi has following services:
| Service | Spec | Description |
|---|---|---|
| Core | Link | Core functionality such as Accounts, Transactions and Postings |
| Auth | Link | User management and authentication via JWT's |
Skaffold is a system to rapidly develop distributed systems on a local kubernetes cluster. With it you can get Phi running on your local machine in a few commands.
- Install skaffold.
- Install a local kubernetes distribution such as minikube or kind.
- Deploy a PostgresQL compatible database to your local cluster. In this example we will use cockroachdb. Wait for the pods to be up and running.
kubectl create -f https://raw.githubusercontent.com/cockroachdb/cockroach/master/cloud/kubernetes/cockroachdb-statefulset.yaml
kubectl get pods- Initialize the cockroachdb cluster.
kubectl create -f https://raw.githubusercontent.com/cockroachdb/cockroach/master/cloud/kubernetes/cluster-init.yaml- Connect to the database.
kubectl run cockroachdb -it --image=cockroachdb/cockroach:v20.2.4 --rm --restart=Never -- sql --insecure --host=cockroachdb-public- Create needed databases and users.
CREATE DATABASE phi_core;
CREATE DATABASE phi_auth;
CREATE USER phi_core;
CREATE USER phi_auth;
GRANT ALL ON DATABASE phi_core TO phi_core;
GRANT ALL ON DATABASE phi_auth TO phi_auth;- Deploy Phi.
skaffold dev --port-forward