Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💰 FinFlo

Your finances, in plain English. Type what you spent, FinFlo logs it, forecasts where your cash is heading, and keeps your bills and invoices under control — no spreadsheets, no accounting degree.


🌟 Why FinFlo

Small business owners shouldn't need a bookkeeper to answer "can I make payroll this month?" FinFlo is a lightweight AI-powered finance layer that turns a sentence like "paid $150 for electricity" into a properly categorized ledger entry, and turns that ledger into forecasts, trends, and accounts payable/receivable tracking — automatically.

🧠 What It Does

  • 🗣️ Natural language → ledger. Type "bought coffee beans for $150" and FinFlo classifies it (category, payment method, in/out direction) and posts it to your ledger.
  • 📊 Live dashboard. Revenue, expenses, and net cash flow for the last 30 days, always current.
  • 📈 Cash flow forecasting. Prophet-powered projections (7/30/90 days) for revenue, expenses, profit, and cash flow, with real confidence intervals — not guesses.
  • 🧾 Finance Flow (AP/AR). Track bills you owe and invoices you're owed, with aging charts, overdue-vendor and top-customer insights, CSV export, and one-click mark-as-paid.

🔧 Under the Hood

Layer Stack
Frontend Next.js 15 (App Router), React 19, Tailwind, shadcn/ui, Recharts
Backend FastAPI (Python)
Database Supabase (PostgreSQL) — plain SQL, no ORM
Natural language → SQL Groq (llama-3.1-8b-instant)
Forecasting Facebook Prophet, with seasonality that scales to how much history you actually have

Cash flow convention: expenses are stored as negative amounts, revenue as positive — this is what both the dashboard math and the forecaster key off of.


🚀 Quick Start

1. Database (Supabase)

Create a free project at supabase.com, then open SQL Editor → New query, paste in the contents of Backend/schema.sql, and run it. This creates the ledger table plus the Finance Flow tables (vendors, customers, payables, receivables) and seeds a couple of sample vendors/customers. Safe to re-run any time.

Grab your project's URL and anon/publishable key from Project Settings → API — you'll need them next.

2. Backend

cd Backend
python -m venv env

# Activate
env\Scripts\activate        # Windows
source env/bin/activate     # macOS/Linux

pip install -r ../requirements.txt
cp .env.example .env         # then fill in SUPABASE_URL, SUPABASE_ANON_KEY, GROQ_API_KEY

uvicorn main:app --reload

API docs live at http://localhost:8000/docs.

Want to see it working immediately, without entering data by hand? Run python seed_mock_data.py to seed ~90 days of realistic sample transactions plus a handful of Finance Flow bills/invoices. Forecasting needs at least 10 different days of history to run at all, so this is the fastest way to see it in action.

3. Frontend

cd Frontend
npm install
cp .env.local.example .env.local   # defaults to http://localhost:8000, which is right for local dev

npm run dev

Open http://localhost:3000.


💡 Example Usage

Add an expense:

curl -X POST "http://localhost:8000/generate-sql" \
  -H "Content-Type: application/json" \
  -d '{"input_text": "bought coffee beans for $150"}'

Get a 30-day revenue forecast:

curl "http://localhost:8000/forecast/revenue/30"

List everything currently owed to you:

curl "http://localhost:8000/finance/receivables"

📘 Notes on Forecasting

Prophet needs real signal to work with:

  • At least 10 distinct days of ledger history before any forecast will run (this is about calendar days, not transaction count — 50 entries logged in one day still won't be enough). You'll get a clear message telling you how many more days you need rather than a dead-end error.
  • Seasonality scales up with history: weekly patterns kick in after ~2 weeks of data, monthly patterns after ~90 days. This keeps early forecasts stable instead of overfitting a seasonal curve to a handful of data points.

🔮 What's Next

  • 📱 Mobile-friendly quick-entry (PWA)
  • 🔔 Runway/low-cash alerts once a starting balance is tracked
  • 📦 CSV/tax-prep exports beyond Finance Flow
  • 🔐 Auth + multi-user support

About

Finlo is an AI CFO + finance OS

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages