Skip to content

dr-pib/budget

Repository files navigation

Budget App

A personal paycheck budgeting app with bill tracking, Capital One planning, and account balance history.


Setup (Local Development)

1. Clone the repo

git clone https://github.com/dr-pib/budget.git
cd budget

2. Install dependencies

npm install

3. Configure your database

Copy the example environment file:

cp .env.example .env.local

Open .env.local and fill in your PostgreSQL connection string:

DATABASE_URL=postgresql://user:password@host:5432/dbname

For local development you can use a local PostgreSQL server. For Railway deployment, see below.

4. Set up the database schema

npx prisma migrate dev

This creates all the tables in your database.

5. Start the app

npm run dev

Open http://localhost:3000 in your browser.

On first load, you'll be prompted to create a 4-digit PIN.


Deploying to Railway

Railway will host both the web app and the PostgreSQL database.

Step 1 — Create a Railway project

  1. Go to railway.app and sign in
  2. Click New Project
  3. Choose Deploy from GitHub repo
  4. Select this repository (dr-pib/budget)

Step 2 — Add a PostgreSQL database

  1. In your Railway project, click + New
  2. Choose Database → PostgreSQL
  3. Railway creates the database automatically

Step 3 — Connect the database to your app

  1. Click the PostgreSQL service → Connect tab
  2. Copy the DATABASE_URL value
  3. Click your web service → Variables tab
  4. Add a variable: DATABASE_URL = (paste the value)

Railway will auto-deploy your app from GitHub on every push.

Step 4 — Run database migrations on Railway

After the first deploy, run migrations. You can do this one of two ways:

Option A — Railway CLI:

railway run npx prisma migrate deploy

Option B — Add as a build command: In Railway project settings → Build Command:

npx prisma generate && npx prisma migrate deploy && next build

Tech Stack

  • Next.js 16 — App Router
  • PostgreSQL — Hosted on Railway
  • Prisma — ORM and migrations
  • Tailwind CSS v4 — Styling
  • Recharts — Balance trend chart

Features

  • PIN protection — 4-digit PIN with 7-day session cookies
  • Paycheck Calculator — Detailed punch entry with night differential and weighted-average OT
  • Bills Tab — Recurring and one-off bills assigned to pay periods
  • Dashboard — Account balances, Capital One paydown planning
  • History — Past pay periods and balance trend charts
  • Pay Period Rollover — Advance button archives current period and generates the next one

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages