Skip to content

rafaumeu/budgetbuddy

Repository files navigation

Node.js Fastify TypeScript Knex SQLite Vitest Docker Zod


Overview

A lightweight personal finance manager for tracking income and expenses with Fastify and SQLite. Simple, fast, and self-contained — no external database needed. Includes interactive Swagger UI documentation and typed API client generation.

Features

  • Credit and debit transaction recording
  • Account balance summary with running totals
  • Transaction history with date filtering
  • Input validation with Zod schemas
  • Interactive Swagger UI at /docs
  • Typed API client generation via Orval

API Endpoints

Method Route Description
POST /transactions Create a credit or debit transaction
GET /transactions List all transactions
GET /transactions/:id Get a specific transaction
GET /summary Get account balance summary

Interactive documentation available at /docs when running the server.

Generate Typed Client

npx orval  # generates typed API client from OpenAPI spec

Tech Stack

Technology Purpose
Node.js Runtime environment
Fastify 4 HTTP framework
TypeScript Type safety
SQLite3 Embedded database
Knex SQL query builder
Zod Input validation
Vitest Test framework
Swagger API documentation

Getting Started

Prerequisites

  • Node.js 18+
  • npm

Install

git clone https://github.com/rafaumeu/budgetbuddy.git
cd budgetbuddy
npm install
npm run dev

Docker

docker compose up -d    # Start PostgreSQL + App on port 3333
docker compose down     # Stop
docker compose build    # Rebuild

Docker Compose services:

  • postgres — PostgreSQL 14 on port 5432
  • app — Application on port 3333

License

MIT


Built with ❤️ by Rafael Zendron

Use this template

About

BudgetBuddy - A personal transaction manager that helps users track their finances simply and effectively. ✨ Main Features: Transaction Creation (credits and debits) Account Summary for informed financial decisions Transaction Listing and Specific Transaction View Technologies Used: Node.js Fastify SQL

Topics

Resources

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors