BudgetBuddy - Personal Finance Tracker Development

Aditya

Aditya Mandhare

๐Ÿ“Ÿ BudgetBuddy - Personal Finance Tracker

BudgetBuddy is a full-stack personal finance tracker built with:
React Native (Expo) for the mobile frontend
Clerk for authentication
Node.js + Express for the backend
PostgreSQL (via Neon) as the database
Upstash Redis for rate limiting
Optional cron job to prevent server cold starts on free hosting

๐Ÿ“ฒ Features

๐Ÿ” Secure authentication using Clerk
โž• Add income/expense transactions
๐Ÿ“Š View summary: balance, income, expenses
๐Ÿ“ƒ๏ธ View and delete past transactions
๐Ÿ”„ Pull-to-refresh and offline-friendly UI
๐ŸŒ Rate limiting via Upstash Redis
โ˜๏ธ Cloud-ready: supports serverless PostgreSQL and cron ping

โœจ Tech Stack

Frontend (Expo) Backend (Express) Infra React Native (Expo) Express.js Neon PostgreSQL Clerk Auth PostgreSQL (via postgres.js) Upstash Redis Zustand REST APIs CRON (for cold start) Expo Router Rate Limiter

๐Ÿ› ๏ธ Getting Started

โš™๏ธ Backend Setup

1. Clone and Install
git clone https://github.com/yourusername/budgetbuddy-backend.git
cd budgetbuddy-backend
npm install
2. Environment Variables
Create a .env file in the root and add:
PORT=2000
DATABASE_URL=your_neon_postgres_url
API_URL=https://your-app-domain.com/api/health
UPSTASH_REDIS_REST_URL=your_upstash_url
UPSTASH_REDIS_REST_TOKEN=your_upstash_token
NODE_ENV=development
3. Run Locally
node index.js
Neon/Postgres table will auto-create if not present.

๐Ÿ“ฑ Frontend Setup

Clone and setup the React Native frontend (already done):
cd budgetbuddy-frontend
npm install
Add this to your app.config.js or app.json:
"extra": {
"expoPublicClerkPublishableKey": "your_clerk_publishable_key"
}
Run on Emulator / Device
npx expo start

๐Ÿ“ก๏ธ API Endpoints

All endpoints prefixed with /api/transactions
Method Endpoint Description GET /api/health Health check POST /api/transactions/ Add a new transaction GET /api/transactions/:userId Get all transactions for user DELETE /api/transactions/:id Delete a transaction GET /api/transactions/summary/:userId Get balance, income, expenses

๐Ÿงถ Rate Limiting

Using Upstash Redis:
100 requests per minute
Defined in middleware/rateLimiter.js

๐Ÿ”€ CRON (Optional, for Render/Free Hosting)

In production, cron runs every 14 mins to ping /api/health and prevent cold starts:
"*/14 * * * *"

๐Ÿ” Security Notes

โœ… Clerk publishableKey is public-safe
โŒ Never expose Clerk secret keys, DB credentials, or JWTs in frontend or public repos

๐Ÿ›† Deployment Suggestions

Backend: Deploy on Render, Railway, or Vercel Serverless
Frontend: Use EAS Build to generate signed APK
Database: Neon for serverless PostgreSQL

๐Ÿ“ธ Screenshots

๐Ÿง‘โ€๐Ÿ’ป Author

Aditya Kiran Mandhare
๐Ÿ”— GitHub | LinkedIn
Like this project

Posted Jul 6, 2025

Developed BudgetBuddy, a personal finance tracker using React Native, Node.js, and PostgreSQL.