Skip to content

ansinko/steward

Repository files navigation

Steward

Personal operating system — finances, daily reflection, and the disciplines that compound. Built as a replacement for an Excel-based system, evolving beyond expenses into a wider life-tracking tool.

"One who is faithful in a very little is also faithful in much, and one who is dishonest in a very little is also dishonest in much." — Luke 16:10 (ESV)

Features

  • Dashboard -- monthly overview with KPI cards, income vs expenses chart, category breakdown, budget progress
  • Expenses -- full CRUD, category filtering, search, CZK/EUR conversion with live ECB rates
  • Income -- track by source (innovis, ocko, etc.), monthly breakdown
  • Budget -- configurable monthly budget per category with progress bars
  • Planner -- monthly checklist of mandatory expenses (rent, subscriptions, insurance) with paid/unpaid status, free spending tracker
  • Taxes -- automatic income tax calculation for Slovak SZCO, health/social insurance tracking with monthly grid
  • Auth -- Google login + email/password via Better Auth
  • Multi-user -- all data scoped to authenticated user

Tech Stack

  • Next.js 16 (App Router, Server Components)
  • TypeScript, Tailwind CSS 4
  • Prisma 7 + PostgreSQL
  • Better Auth (Google OAuth + email/password)
  • Recharts for charts
  • Docker Compose for deployment

Getting Started

Prerequisites

  • Node.js 20+
  • Docker & Docker Compose

1. Clone and install

git clone <repo-url>
cd expense-tracker
npm install

2. Set up environment

Copy .env and fill in your values:

cp .env.example .env

Required variables:

DATABASE_URL="postgresql://expense:expense@localhost:5432/expense_tracker"
BETTER_AUTH_SECRET="<generate with: openssl rand -base64 32>"
BETTER_AUTH_URL="http://localhost:3000"
GOOGLE_CLIENT_ID="<from console.cloud.google.com>"
GOOGLE_CLIENT_SECRET="<from console.cloud.google.com>"

For Google OAuth, create credentials at Google Cloud Console with redirect URI: http://localhost:3000/api/auth/callback/google

3. Start with Docker Compose (recommended)

docker compose up -d

This starts PostgreSQL + the app on http://localhost:3000. Data is persisted in a Docker volume.

To seed with sample data:

npx tsx prisma/seed.ts

4. Or run locally (dev mode)

Start just the database:

docker compose up -d db

Run migrations and start dev server:

npx prisma generate
npx prisma migrate deploy
npm run dev

App runs on http://localhost:3000.

Useful Commands

Command Description
npm run dev Start dev server
npm run build Production build
docker compose up -d Start all services
docker compose down Stop services
docker compose logs app View app logs
npx prisma studio Browse database
npx tsx prisma/seed.ts Seed sample data (skips if data exists)
npx tsx prisma/seed.ts --force Wipe and reseed

Project Structure

src/
  app/
    (app)/          -- authenticated pages (dashboard, expenses, income, budget, planner, taxes)
    sign-in/        -- login page
    api/            -- REST API routes
  components/       -- React components organized by feature
  lib/
    auth.ts         -- Better Auth config
    prisma.ts       -- Prisma client
    constants.ts    -- categories, colors, tax config
    texts.ts        -- all UI strings (Slovak)
    tax-calculator.ts -- income tax calculation
    utils.ts        -- formatters, helpers
prisma/
  schema.prisma     -- database schema
  seed.ts           -- sample data seeder

About

app to track my monthly expenses, created from google sheet version:)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages