A personal paycheck budgeting app with bill tracking, Capital One planning, and account balance history.
git clone https://github.com/dr-pib/budget.git
cd budgetnpm installCopy the example environment file:
cp .env.example .env.localOpen .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.
npx prisma migrate devThis creates all the tables in your database.
npm run devOpen http://localhost:3000 in your browser.
On first load, you'll be prompted to create a 4-digit PIN.
Railway will host both the web app and the PostgreSQL database.
- Go to railway.app and sign in
- Click New Project
- Choose Deploy from GitHub repo
- Select this repository (
dr-pib/budget)
- In your Railway project, click + New
- Choose Database → PostgreSQL
- Railway creates the database automatically
- Click the PostgreSQL service → Connect tab
- Copy the DATABASE_URL value
- Click your web service → Variables tab
- Add a variable:
DATABASE_URL= (paste the value)
Railway will auto-deploy your app from GitHub on every push.
After the first deploy, run migrations. You can do this one of two ways:
Option A — Railway CLI:
railway run npx prisma migrate deployOption B — Add as a build command: In Railway project settings → Build Command:
npx prisma generate && npx prisma migrate deploy && next build
- Next.js 16 — App Router
- PostgreSQL — Hosted on Railway
- Prisma — ORM and migrations
- Tailwind CSS v4 — Styling
- Recharts — Balance trend chart
- 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