Business owners and small teams need recurring reports — sales summaries, KPI check-ins — but generating and sending them is almost always a manual chore: open the data, build the summary, send it, repeat next week. There's rarely a lightweight way to say "just send me this, automatically, on a schedule" without either doing it by hand or paying for a heavyweight BI platform.
A multi-user platform where anyone can connect a data source, set a schedule, and have a report show up automatically — no code, no dashboard visit required:
- Bring your own data — upload a CSV, or connect a REST API / PostgreSQL database
- Set it and forget it — daily, weekly, or monthly schedules, powered by a real background job scheduler
- Delivered where you already are — straight to Telegram or email, not another dashboard to remember to check
- Full visibility — a history log of every run, success or failure, with a clear reason when something goes wrong
- 🔐 Multi-user accounts — JWT authentication, each user's data sources and schedules are private
- 🗂️ Flexible data sources — CSV upload, REST API endpoint, or external PostgreSQL connection, all behind one common interface
- ⏰ Real scheduling — APScheduler-backed daily/weekly/monthly jobs that survive app restarts (reloaded from the database on startup)
- 📤 Two delivery channels — Telegram bot messages or plain-text email, with graceful truncation for Telegram's message limit
- 📋 Report history — every scheduled run is logged (success or failure, with the reason), visible per schedule
- 🖥️ Simple dashboard — a Streamlit UI covering the whole flow: data sources, schedules, and history — no separate admin tool needed
- 🛡️ Fails safe — a failed report generation or delivery is logged clearly, never crashes the scheduler or blocks other users' jobs
- 🐳 One-command deploy — Docker Compose brings up the API, dashboard, and database together
| Layer | Tool | Purpose |
|---|---|---|
| API / Auth | FastAPI | JWT auth, REST endpoints for sources/schedules/logs |
| Dashboard | Streamlit | Forms and tables — login, data sources, schedules, history |
| Scheduling | APScheduler | Background cron-style jobs, persisted across restarts |
| Database | PostgreSQL | Users, data sources, schedules, report logs |
| Delivery | Telegram Bot API, smtplib | Report delivery channels |
| Auth | python-jose, passlib (bcrypt) | JWT signing, password hashing |
| Deployment | Docker Compose | App, dashboard, and database together |
| Testing | pytest | 45 tests — auth, data sources, scheduler, delivery, all mocked |
User uploads CSV / connects API/DB
│
▼
Data Source (stored per user)
│
▼
Schedule (daily / weekly / monthly)
│
▼
APScheduler fires on schedule
│
▼
Load data → build plain-text report
│
▼
Deliver via Telegram or email
│
▼
Logged to Report History
git clone https://github.com/rizalcodes/autoreport.git
cd autoreport
cp .env.example .env
# edit .env: set DB_PASSWORD, JWT_SECRET_KEY, and TELEGRAM_BOT_TOKEN/SMTP credentials
docker compose up --build- Dashboard: http://localhost:8501
- API docs (Swagger): http://localhost:8000/docs
Register an account, upload a data source, and create a schedule — reports arrive automatically from then on.
Heads up: there's a
SCHEDULER_TEST_INTERVAL_SECONDSdev override for quickly verifying the scheduler fires — it makes every active schedule run every N seconds instead of on its real cadence. Great for testing, dangerous if left on: remove it (and pause test schedules) before walking away, or it'll keep delivering every few seconds until stopped.
python -m venv venv
venv/Scripts/pip install -r requirements.txt
venv/Scripts/python -m pytest45 tests, all using in-memory SQLite and mocked Telegram/SMTP — no live services or real credentials required.
autoreport/
├── app.py # Streamlit dashboard
├── api_client.py # HTTP client wrapper (dashboard -> API)
├── api/
│ ├── main.py # FastAPI: auth, data sources, schedules
│ ├── auth.py # JWT + password hashing
│ └── models.py # User, DataSource, ReportSchedule, ReportLog
├── sources/
│ ├── csv_source.py # CSV upload handling
│ └── db_source.py # API / PostgreSQL connections
├── scheduler/
│ ├── jobs.py # APScheduler integration
│ └── report_builder.py # Pure DataFrame -> report text
├── delivery/
│ ├── telegram.py # Telegram Bot API delivery
│ └── email.py # SMTP email delivery
├── tests/ # 45 tests
├── docker-compose.yml # app + frontend + db
└── Dockerfile
Rizal
Built with FastAPI, Streamlit, and the belief that a report you have to remember to generate is a report that eventually doesn't get generated.