Skip to content

Personal finance tracker with Go backend and Next.js frontend. Track expenses, set budgets, automate recurring transactions, and view spending analytics. Deployed on Oracle Cloud + Vercel.

License

Notifications You must be signed in to change notification settings

vidya381/myspendo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

196 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySpendo

A simple personal finance tracker to help you manage income, expenses, and budgets. Built with Go and Next.js.

Go Next.js React PostgreSQL

Live Demo: https://myspendo.vercel.app

What It Does

Track your money, set budgets, and see where your cash goes. That's pretty much it.

Features

Transactions

  • Add/edit/delete income and expenses
  • Search and filter by category, date, amount
  • Export to CSV or JSON

Budgets

  • Set monthly or yearly spending limits
  • Per-category or overall budgets
  • Alert notifications when you exceed thresholds

Recurring Transactions

  • Auto-create transactions (daily, weekly, monthly, yearly)
  • Handles subscriptions, rent, bills automatically
  • Background job processes every hour

Analytics

  • Dashboard with charts and graphs
  • Monthly breakdowns and trends
  • Category-wise spending analysis

Architecture

┌─────────────────────────────────────────────────┐
│     Next.js Frontend (React + TypeScript)       │
│     Dashboard │ Transactions │ Budgets          │
└────────────────────┬────────────────────────────┘
                     │ REST API (JWT Auth)
┌────────────────────▼────────────────────────────┐
│           Go Backend (Port 8080)                │
│   Handlers │ Middleware │ Background Jobs       │
└────────────────────┬────────────────────────────┘
                     │ SQL Queries
┌────────────────────▼────────────────────────────┐
│              PostgreSQL Database                │
│   Users │ Categories │ Transactions │ Budgets   │
└─────────────────────────────────────────────────┘

Tech Stack

Backend: Go 1.24, PostgreSQL, JWT auth Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS, Recharts

Getting Started

You'll need:

  • Node.js 18+
  • Go 1.24+
  • PostgreSQL 14+

Setup

1. Clone the repo

git clone https://github.com/vidya381/myspendo.git
cd myspendo

2. Setup PostgreSQL

psql -U postgres
CREATE DATABASE myspendo;
\q

3. Backend setup

cd go-backend

# Install dependencies
go mod download

# Configure environment
cp .env.example .env
# Edit .env with your database credentials and JWT secret

# Run migrations
go run migrate.go

# Start server
go run main.go db.go

Backend runs on http://localhost:8080

4. Frontend setup

cd nextjs-frontend

# Install dependencies
npm install

# Configure environment
cp .env.example .env.local
# Leave NEXT_PUBLIC_API_URL empty to use proxy (recommended)

# Start dev server
npm run dev

Frontend runs on http://localhost:3000

Environment Variables

Backend (.env)

# Database
DATABASE_URL=postgresql://postgres:password@localhost:5432/myspendo?sslmode=disable

# Or use individual params
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=your_password
DB_NAME=myspendo
DB_SSLMODE=disable

# Auth (generate with: openssl rand -hex 32)
JWT_SECRET=your_strong_random_secret

# CORS
CORS_ORIGIN=http://localhost:3000

Frontend (.env.local)

# Leave empty to use Next.js rewrites proxy (prevents CORS issues)
NEXT_PUBLIC_API_URL=

Deployment

  • Backend: Deploy to Render (or any Go hosting)
  • Frontend: Deploy to Vercel
  • Database: Use Neon (or any PostgreSQL hosting)

API Docs

See go-backend/API.md for all API endpoints and examples.

Project Structure

myspendo/
├── go-backend/          # Go REST API
│   ├── main.go         # Server and routes
│   ├── handlers/       # API handlers
│   ├── middleware/     # Auth, rate limiting, security
│   ├── models/         # Data models
│   ├── migrations/     # SQL migrations
│   └── utils/          # Helpers
├── nextjs-frontend/     # React frontend
│   └── src/
│       ├── app/        # Pages
│       ├── components/ # React components
│       └── context/    # Auth state
└── README.md

Security

  • JWT tokens (72-hour expiry)
  • Bcrypt password hashing
  • Rate limiting (5 req/min for login, 100 req/min for API)
  • Input validation and sanitization
  • HTTPS enforcement (production)
  • CORS protection

Built with Go, Next.js, React, and PostgreSQL. Background jobs handle recurring transaction processing every hour. See API.md for all endpoints and examples.


About

Personal finance tracker with Go backend and Next.js frontend. Track expenses, set budgets, automate recurring transactions, and view spending analytics. Deployed on Oracle Cloud + Vercel.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages