Skip to content

bestxxt/SmartLedger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

84 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Smart Ledger πŸ‘‹

Smart Ledger is a self-hosted, LLM-powered, multi-input personal expense tracking system designed for privacy-conscious users who want intelligent automation without sacrificing data ownership.

HomePage.png Card.png Setting.png
EditPage.png Voice.png Picture.png

⭐ Key Features

  • πŸ›‘οΈ Self-hosted Deploy Smart Ledger on your own server or machine. Your financial data remains fully under your control β€” no third-party storage, no data tracking. Seamlessly sync across devices to keep your records accessible and consistent.

  • πŸŽ™οΈ Voice Input Record spoken expense entries. Powered by Whisper for speech recognition and integrated with an LLM for context understanding, Smart Ledger can convert your voice into clean, structured financial transactions with ease.

  • πŸ“· Picture Input Snap photos of receipts or bills. Smart Ledger uses multi-LLM models to automatically extract key financial details like amount, date, and category β€” no manual typing required.

  • πŸ’» Beautiful User Interface Enjoy a modern, mobile-friendly UI built with Next.js. Designed for simplicity and speed. Can be added to your home screen and run in fullscreen like a native app on iOS/macOS β€” no need to go through the App Store. Just open in Safari and "Add to Home Screen."

  • πŸ’± Multi-Currency Support Automatically detects and converts multiple currencies from input (voice, image, or text) β€” perfect for international usage or travel expense tracking.

  • 🏷️ Tagging & Categorization Add your own custom tags or let the AI suggest and infer tags based on transaction content. Smart Ledger helps keep your records organized effortlessly.

  • πŸ”’ Full Privacy & Control All components are open-source and self-manageable . No vendor lock-in, no hidden data sharing β€” just transparent software that puts you in charge.

πŸ›£οΈ Planned Direction

The following changes are planned for future development:

  1. Frontend-first storage, optional backend

    • Remove the hard dependency on MongoDB. The app will become frontend-first: data is stored in IndexedDB by default.
    • Backend sync is optional: users can optionally sync data to a server for backup or cross-device use. When used, the backend can still use MongoDB (or another database) for persistence.
  2. Separate UIs for desktop and mobile

    • Mobile: use Framework7 for a native-feel mobile UI.
    • Desktop: framework for the desktop UI is not yet decided (TBD).

πŸš€ Quickstart

πŸ—£οΈ Install Whisper Transcription Server (Required)

Smart Ledger uses a separate FastAPI-based Whisper server (powered by faster-whisper) to handle speech-to-text transcription.

Requirements

  • 3.8 < Python < 3.12

  • ffmpeg installed (for pydub to work)

  • A machine with CPU or CUDA-compatible GPU

Install dependencies

Go to /whisper

pip install -r requirements.txt

Prepare environment variables

Create a .env file in the root of the whisper server directory.

cp .env.example .env

Run the server

python whisper_server.py

Or with uvicorn:

uvicorn whisper_server:app --host 0.0.0.0 --port 8000

If you want to use cuda: install cuDNN at https://developer.nvidia.com/cudnn-downloads


☁️ Run in Vercel

  1. Import the GitHub repo into Vercel
  2. Configure Environment Variables In the Vercel dashboard, go to your project's Settings > Environment Variables and add the following (based on .env.example)
Key Description
MONGODB_URI Your MongoDB connection string.
MONGODB_DB The database name
NEXTAUTH_URL Your Vercel domain (e.g. https://your-app.vercel.app)
NEXTAUTH_SECRET A random secret string
GEMINI_API_KEY Your Gemini API key
GEMINI_MODEL e.g. gemini-2.0-flash
INVITE_CODE Invite code, used for register
TRANSCRIPTION_URL Your Whisper server URL
TRANSCRIPTION_API_KEY Your Whisper service
EXCHANGE_RATE_API_KEY Currency exchange API key
  1. Click "Deploy" Vercel will build and deploy your app automatically. It may take 1–2 minutes.

  2. Done! You’ll get a live URL like https://smartledger-yourname.vercel.app.


πŸ’» Run In Your sever

  1. Clone the repository
git clone https://github.com/bestxxt/SmartLedger.git
cd smart-ledger
  1. Install dependencies
npm install
  1. Set up environment variables Copy .env.example and rename it:
cp .env.example .env.local

Then fill in the required values like MongoDB URI, API keys, etc.

  1. Run the app in development
npm run dev

(Optional) Run in background using PM2

PM2 is a production-grade process manager for Node.js applications. It keeps your app running in the background, automatically restarts it on crash or reboot, and makes it easy to manage logs and processes.

Install PM2 globally

npm install -g pm2

Build the Next.js app (if not already done)

If you're deploying the production build:

npm run build

Start the app with PM2

pm2 start "npm run start" --name smart-ledger
  • npm run start starts your Next.js app in production mode.

  • --name smart-ledger assigns a name to your process for easy management.

Save the PM2 process list

This ensures your app will restart automatically on system reboot.

pm2 save

πŸ” (Optional) Set up PM2 to start on boot

pm2 startup

Follow the printed instructions (it will give you a command to run, e.g. sudo env PATH=... pm2 startup systemd -u youruser --hp /home/youruser).

Monitor or manage the process

pm2 list              # View all running apps
pm2 logs smart-ledger # View logs for your app
pm2 restart smart-ledger # Restart the app
pm2 stop smart-ledger    # Stop the app

🎬 Demo Videos

πŸŽ™οΈ Voice Input Demo (Multiple Expenses + Income)

This video demonstrates Smart Ledger's ability to process natural voice input and generate multiple transactions β€” including both expenses and income β€” in a single sentence.

I said: I had lunch with colleagues at a Korean restaurant, spent 28 dollars. On my way home I stopped to get gas, paid 40 dollars. Also, I received my salary today β€” 8000 dollars just landed in my account.”

voice-demo.gif

πŸ“· Receipt Image Input Demo

This video shows how Smart Ledger extracts transaction details from a receipt image using Multi LLM Model and generates a structured expense record.

image-demo.gif

🚧 Development Progress

Current Version: v0.1.0 (Alpha)

βœ… Core

  • User login
  • User logout
  • Change password and email used to login
  • User authentication and multi-device sync
  • Admin account management
  • User registration
  • iPhone shortcut support
  • Google login
  • WeChat login
  • Multi-user account support
  • Offline mode (local caching)
  • Export to Excel / CSV
  • Forgot password

🎨 User Interface

  • Homepage with expense list
  • Voice / Camera / Text input modes
  • Transaction edit & delete cards
  • Settings page (language, currency, tag management...)
  • Spending trend visualization
  • Installable fullscreen Web App (PWA-style experience)
  • Transaction search and filters (in progress)
  • Statistic page
  • Export page

🧠 AI Features

  • Voice input via Whisper
  • Receipt image recognition (LLM-based parsing)
  • Auto-categorization and tag suggestions via LLM
  • Multi-currency detection and handling

πŸ“¦ Deploy

  • Vercel support
  • Docker support

πŸ“„ License

Smart Ledger is open-source and released under the MIT License.

About

Self-hosted, Multi LLM model based smart ledger assistant

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages