contre95 / expense-mate

Expenses app is my new excuse to learn DDD and write some Go code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ“ŠπŸ§‰ ExpenseMate

ExpenseMate is an expense tracking app with a handy Telegram bot and a front end. It uses Go, MySQL, SQLite, Fiber, TailwindCSS and HTMX.

Features

  • Create, Update, Delete or Modify expenses. (Web)
  • Import expenses from N26 CSV extract. (Web)
  • Create Rules to automatically categorize imported expenses. (Web)
  • Manage multiple users and attach them to expenses. (Web)
  • Get prompted expenses without category and categorize them. (Telegram)
  • Create expenses. (Telegram)
  • Get an expense summary by category. (Telegram)

You can try a demo, it resets every 3hs. Telegram bot is not enabled.

🦭 Run in a container

podman run -d \
  --name expenses-app \
  --restart always \
  --env STORAGE_ENGINE=sqlite  \
  --env SQLITE_PATH=./exp.db \
  --env LOAD_SAMPLE_DATA=true \
  --env JSON_STORAGE_PATH=./users.json \
  --env TELEGRAM_APITOKEN= \
  -p 8080:8080 \
  contre95/expense-mate:latest

πŸ’» Run locally

All configurations are set in the .env file and passed as environment variables. You can access from localhost:8080

  # Clone the repository
  git clone https://github.com/contre95/expense-mate.git && cd expense-mate
  # Install the dependencies
  go mod tidy
  # Set the .env (you can leave the defaults for a quick start)
  mv .env.example .env
  # Source the env variables
  . <(cat .env | grep -v -e '^$' | grep -v "#" | awk '{print "export " $1}')
  # Run with go
  go run ./cmd/main.go
  # Alternatively run with air
  # air -c air.toml

🟦 Telegram

Optionally you can set up a Telegram bot to interact with the app. All you need is a new bot that can be creating chatting to @BotFather

Check the menu for available commands, please.
/categories - Sends you all the categories available.
/summary - Sends summar of last month's expenses.
/unknown - Categorize unknown expenses. /done and continue in another moment.
/new - Creates a new expense. /fix if you made made a mistake.
/ping - Checks bot availability and health.
/help - Displays this menu.

Front end

image

Grafana (WIP)

image

About

Expenses app is my new excuse to learn DDD and write some Go code.


Languages

Language:Go 61.3%Language:HTML 30.1%Language:JavaScript 5.6%Language:CSS 2.4%Language:Dockerfile 0.6%