Lumen is a full-stack intelligent finance system designed to automate expense tracking, bill management, document extraction, and real-time financial insights using AI.
This project includes:
- A modern React + TypeScript frontend
- A secure Flask backend with JWT authentication
- File uploads (images/PDFs), bill extraction, and verification
- Automatic transaction creation & categorisation
- AI-powered document analysis
- Add, edit, and view transactions
- Category filtering
- Sorting by date (ASC/DESC)
- Pagination
- Bill preview (images) and bill download
- Upload receipts or invoices
- Automated extraction of vendor, amount, date, and payment info
- Verification status (pending, verified, rejected)
- JWT-based login/signup
- Protected routes on both frontend and backend
-
Every bill upload automatically:
- Creates a Transaction
- Creates a Document entry
- Links the two together
- Summary cards: Verified, Pending, Suspicious
- Table view with actions
- Automatically fills your ITR File based on your transaction
- Allows to directly download the PDF.
- React + TypeScript
- TailwindCSS
- ShadCN UI
- Axios API wrapper
- React Router
- Flask (Python)
- Flask-JWT-Extended
- SQLAlchemy ORM
- SQLite / PostgreSQL
- File uploads + static file serving
cd backend
pip install -r requirements.txt
flask runcreate .env file with perplexity api and gst checker api
Backend runs at: http://localhost:5000
cd frontend
npm install
npm run devFrontend runs at: http://localhost:5173
Create a new user.
Body:
{
"first_name": "",
"last_name": "",
"email": "",
"phone_number": "",
"password": "",
"organization": "",
"aadhar_number": "",
"pan_number": "",
"date_of_birth": "",
"employment_type": "",
"annual_salary": "",
"address": ""
}Authenticate user.
Body:
{ "email": "", "password": "" }Response:
{
"access": "<JWT_ACCESS>",
"refresh": "<JWT_REFRESH>"
}Returns the authenticated user's profile.
Update profile fields.
Accepts any subset of:
first_name, last_name, phone_number, organization,
aadhar_number, pan_number, date_of_birth, employment_type,
annual_salary, address, email
Fetch paginated, optionally filtered, optionally sorted transactions.
Query Params:
page=1
per_page=20
category=food
sort=asc | desc | created_asc | created_desc
Response:
{
"transactions": [...],
"page": 1,
"total_pages": 3,
"total": 60,
"category_filter": null,
"sort": "desc"
}Fetch a single transaction + linked document metadata.
Create a manual transaction (non-bill).
Body:
{
"item_name": "",
"amount": "",
"category": "",
"payment_mode": "",
"transaction_date": "YYYY-MM-DD",
"vendor": "",
"description": "",
"tags": ""
}Fetch paginated documents.
Query Params:
page=1
limit=20
Upload bill โ OCR โ LLM extraction โ GST lookup โ auto-create Transaction & Document.
Form-Data:
file: <file>
vendor: optional
category: optional
notes: optional
Response:
{
"transaction_id": 12,
"document_id": 9,
"status": "verified",
"llm": { ...extracted_fields },
"gst_details": { ... },
"file_url": "/documents/<file>"
}Downloads a stored bill file.
Lookup GSTIN using rotating API keys.
Body:
{ "gstin": "22AAAAA0000A1Z5" }Generate a filled ITR PDF using user profile + transactions.
Body:
{
"form_data": { ... }
}Response: A downloadable PDF.