cd portfolios/jhaily

Jhaily — Automated Monthly Sales Reports

Jhaily — Automated Monthly Sales Reports cover image
Fullstack Python Flask Flask-SQLAlchemy Flask-Login pandas matplotlib xhtml2pdf PostgreSQL (Neon) Cloudflare R2 Render GitHub Actions

A full-stack Flask application built to solve a real small-business problem: turning raw, messy sales data into a report worth reading, automatically, every month.

The data pipeline cleans genuinely inconsistent real-world input — mixed date formats, missing prices, inconsistent item-name casing, duplicate rows — then computes real business metrics: monthly revenue trend, best-selling item and category, busiest/slowest weekday, refund-corrected average transaction value, refund rate, and payment method mix.

Reports are delivered as a styled HTML email with an embedded chart, plus a downloadable PDF version, sent automatically on a schedule. The app supports real user accounts (Flask-Login, securely hashed passwords), multiple businesses per account, and flexible data sources — upload a CSV directly, or point at a live link (e.g. a published Google Sheets export) so reports always use current data with no manual re-upload. Every business gets a working unsubscribe link, included in every email.

Deployed live on Render, backed by a real Postgres database (Neon) and Cloudflare R2 for file storage — both chosen specifically to survive redeploys on a free hosting tier. The monthly report run is triggered by a scheduled GitHub Actions workflow calling a secured API endpoint, avoiding the cost of a dedicated background worker.

No live demo is available for this project yet.