β¨ Why I Built This
I wanted a dashboard that automatically parses bank transactions from my email, stores them neatly, and visualizes insights using charts β all with FastAPI, MongoDB, and React.
π Features
- π§ AI-based detection of bank transactions from emails
- π Frontend dashboard with Pie Chart summary
- π οΈ FastAPI backend with MongoDB aggregation
- β‘ Deployed on Render.com
π§± Tech Stack
- Backend: FastAPI, MongoDB
- Frontend: React
- Email Parsing: Postmark Inbound Webhooks + LLM
- Deployment: Render.com (single service, no Docker needed)
π Project Structure
.
βββ backend
β βββ main.py
β βββ routers/
β βββ frontend/ # frontend build (dist folder goes here)
βββ frontend
βββ postmark-dashboard
βββ public/
βββ src/
βββ dist/ # built files (copied to backend/frontend)
π§ͺ Sample MongoDB Data
You can use the following test data to populate your MongoDB:
[
{
"is_transaction": true,
"bank_name": "ICICI Bank",
"amount": 2590,
"currency": "INR",
"transaction_type": "debit",
"description": "UPI RRN :904123451122",
"confidence": 100,
"created_at": "2025-04-07T07:05:32.997Z"
},
{
"is_transaction": true,
"bank_name": "Bank Of Maharashtra",
"amount": 1920,
"currency": "INR",
"transaction_type": "debit",
"description": "UPI RRN :708312128688",
"confidence": 98,
"created_at": "2025-04-10T10:21:18.234Z"
}
]
π How to Run
π Setup Webhook using ngrok
To receive emails via webhook in local FastAPI:
ngrok http 8000
Copy the public URL shown (e.g. https://abcd1234.ngrok.io)
Set Postmark inbound webhook to
https://abcd1234.ngrok.io/inbound-webhook
Make sure the FastAPI server is running when using ngrok.
π§ Backend
git clone https://github.com/Johnnaidu619/PostmarkChallenge.git
cd PostmarkChallenge/backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload
β οΈ Make sure MongoDB is running and connection string is set in
.env
with keys LLM_API_KEY,MONGO_URL,MONGO_DB_NAME
and for frontend .env key is VITE_SITE_URL.
π Frontend
cd frontend/postmark-dashboard
npm install
npm run dev
β Live Demo
π Check it here
Top comments (1)
pretty cool setup, feels like something i'd use to get my mess together - you ever run into stuff that surprised you after seeing the data laid out?