Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/akevalion/life_cost/llms.txt

Use this file to discover all available pages before exploring further.

The fastest way to run Life Cost is with Docker Compose. The included docker-compose.yml spins up three containers — the Life Cost app, a MySQL 8.0 database, and phpMyAdmin — so you can have a fully working personal finance tracker running on your machine in minutes.

Prerequisites

Before you begin, make sure you have the following:
  • Docker 20.10 or later — Install Docker
  • Docker Compose v2 (docker compose) or the standalone docker-compose v1 — bundled with Docker Desktop
  • A Google Cloud project with OAuth 2.0 credentials (Client ID and Client Secret). See Google OAuth Configuration for step-by-step setup instructions.

Setup Steps

1

Clone the repository

Download the Life Cost source code to your local machine:
git clone https://github.com/akevalion/life_cost.git
cd life_cost
2

Set up Google OAuth credentials

Life Cost requires a Google OAuth 2.0 Client ID and Client Secret to authenticate users. Create these in the Google Cloud Console under your project.Add http://localhost:5000/login/google/authorized as an Authorised redirect URI for your OAuth client.For full instructions, see the Google OAuth Configuration guide.
3

Configure environment variables

The app reads three required environment variables at startup. The simplest approach is to set them directly inside docker-compose.yml (see the file contents below), or export them from a .env file before running Compose:
# .env
DATABASE_URL=mysql://admin:yourpassword@localhost/life_db
GOOGLE_CLIENT_ID=your-google-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-google-client-secret
VariableDescription
DATABASE_URLSQLAlchemy connection string for your MySQL database.
GOOGLE_CLIENT_IDOAuth 2.0 Client ID from Google Cloud Console.
GOOGLE_CLIENT_SECRETOAuth 2.0 Client Secret from Google Cloud Console.
4

Start the stack with Docker Compose

From the project root, bring up all three services in detached mode:
docker-compose up -d
Docker will pull the akevalion/life:0.0.9.Release image (if not already cached) and start the app, mysql, and phpmyadmin containers.The included docker-compose.yml looks like this:
version: '3.8'

services:
  mysql:
    image: mysql:8.0
    container_name: mysql_container
    environment:
      MYSQL_ROOT_PASSWORD: Spigit123!
      MYSQL_DATABASE: life_db
      MYSQL_USER: admin
      MYSQL_PASSWORD: 123
    volumes:
      - mysql_data:/var/lib/mysql
    ports:
      - "3306:3306"

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    container_name: phpmyadmin
    environment:
      PMA_HOST: mysql_container
      MYSQL_ROOT_PASSWORD: Spigit123!
    ports:
      - "8080:80"
    depends_on:
      - mysql

  app:
    image: akevalion/life:0.0.9.Release
    container_name: life_app
    environment:
      DATABASE_URL: "mysql://admin:[email protected]/life_db"
      GOOGLE_CLIENT_ID: "41616688711-9tm06s82c7c8de1hpgt3u204qetq449a.apps.googleusercontent.com"
      GOOGLE_CLIENT_SECRET: "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"
    depends_on:
      - mysql
    ports:
      - "5000:3000"

volumes:
  mysql_data:
The docker-compose.yml above contains placeholder credentials — including hardcoded passwords and a sample Google OAuth client. You must replace MYSQL_ROOT_PASSWORD, MYSQL_PASSWORD, DATABASE_URL, GOOGLE_CLIENT_ID, and GOOGLE_CLIENT_SECRET with your own values before deploying to any shared or internet-facing environment.
On first startup, Life Cost automatically runs db.create_all() via Flask-SQLAlchemy, which creates all required database tables (user, wallet, category, money_transfer, tag, user_wallet) in the configured MySQL database. No manual migration step is needed.
5

Open the app and sign in

Once the containers are running, open your browser and navigate to:
http://localhost:5000
You will be redirected to Google’s OAuth consent screen. Sign in with your Google account — Life Cost will provision your user profile automatically and associate it with any existing wallets. You are now ready to create wallets and start logging transactions.phpMyAdmin is also available at http://localhost:8080 for direct database inspection during development.

Next Steps

Self-Hosting

Deploy Life Cost on your own server or VPS for a permanent installation.

Environment Variables

See the full list of supported environment variables and configuration options.

API Overview

Explore the REST API endpoints for wallets, transactions, tags, and analytics.

Build docs developers (and LLMs) love