A Report scheduler Console is there where daily, weekly reporrts are being scheduled to send as per users format.
-
Built a reusable report console that previews metrics, renders HTML, and sends email reports on-demand or on a schedule.
-
Frontend (React + Vite) provides timezone-aware date pickers, recipient loader, and HTML preview + send buttons.
-
Backend (FastAPI) exposes endpoints to fetch metrics, compose templates, and send queued emails from live DB.
-
Scheduling support (cron / APScheduler) to auto-populate timezone & recipients and run daily jobs per-org.
-
Modular code organization for easy feature expansion (add new metrics, new templates, alternate mailers).
| Category | Highlights |
|---|---|
| 🔍 Metrics Preview | Pull real-time data from DB based on date filter + org selection |
| 🧠 Smart Email Rendering | Generates production-ready HTML emails using Jinja templates |
| ✉️ Email Sending System | Manual send or scheduled email delivery with retry and logging |
| ⚙️ Automation & Scheduling | Supports timezone-aware recurring jobs (APScheduler/cron) |
| 👥 Recipient Management | Bulk add emails, auto-remove duplicates, org-level defaults |
| 🧩 Modular Architecture | Easy to extend with more metrics, templates, or providers |
React (Vite)
Axios
Modern component UI with responsive layout & form controls
FastAPI
Jinja2
APScheduler (or cronjobs)
SQLAlchemy / DB integration
PostgreSQL (configurable)
SMTP (SendGrid / SES / SMTP Relay)
📁 backend/
├─ app/
│ ├─ controllers/ # API Routes
│ ├─ domain/ # Business models
│ ├─ email/ # SMTP + HTML rendering + dispatch
│ ├─ infrastructure/ # DB + queue integrations
│ ├─ services/ # Core logic (metrics, scheduler)
│ ├─ templates/ # Email HTML Templates (Jinja)
│ └─ main.py # FastAPI entrypoint
📁 frontend/
├─ src/
│ ├─ api.js # API bindings
│ ├─ App.jsx # Main UI Flow
│ └─ main.jsx
cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000