Skip to content

Ali-datasmith/Sales-Intel-Dashboard

Repository files navigation

📊 Sales Intel Terminal

High-Performance Sales Analytics — Built in Pure Python

A Power BI replacement with zero licences, zero infrastructure, and zero compromise.


Python Streamlit Polars DuckDB Plotly License Deploy


Live Demo →  ·  Video Walkthrough →  · 


Screenshot 2026-06-14 11 13 58 PM

Why Sales Intel Terminal?

Your sales data deserves better than a spreadsheet and a Power BI subscription.

Sales Intel Terminal is a self-hosted, open-source analytics engine that ingests your raw CRM export and delivers production-grade dashboards in seconds — no database, no server, no monthly fee.

Built on the fastest Python data stack available:

Polars 1.0  →  Rust columnar engine    →  5–10× faster than Pandas
DuckDB 1.0  →  In-process SQL          →  millisecond GROUP BY on 200K rows
Streamlit   →  Reactive UI             →  zero-config deployment

⚡ Performance

Dataset: 200,000 row CRM export · 12.2 MB CSV

┌─────────────────────────────┬──────────────┬──────────────────────┐
│ Operation                   │ Pandas Stack │ Sales Intel Terminal │
├─────────────────────────────┼──────────────┼──────────────────────┤
│ Load + clean 200K rows      │ ~45 seconds  │ < 5 seconds  ⚡      │
│ GROUP BY aggregation        │ ~8 seconds   │ < 0.1 seconds        │
│ Multi-filter re-query       │ ~12 seconds  │ instant              │
│ Memory footprint            │ ~800 MB      │ ~120 MB              │
└─────────────────────────────┴──────────────┴──────────────────────┘

Dashboard

Four fully interactive views — each with live sidebar filters, CSV export, and glass-morphism UI.


📊 Sales Overview

Revenue KPIs, month-over-month growth, revenue by region, deals by stage, product breakdown, and monthly trend line — all in one view.

[Screenshot 2026-06-14 11 15 54 PM ]


🗺️ Regional Performance

Rep × Region revenue density heatmap. Instantly identify your top territories, coverage gaps, and which reps are underperforming in which regions.

[Screenshot 2026-06-14 11 16 28 PM ]


🌪️ Pipeline Conversion

Stage-by-stage funnel with Emerald → Gold color gradient. Stage Health panel alongside the funnel showing per-stage deal count, % of pipeline, and status badge (WON / OK / MID / LOW).

[Screenshot 2026-06-14 11 16 47 PM ]


👤 Rep Performance

Individual rep scorecard grid with rank medals, Gold revenue values, deal counts, and mini progress bars relative to the top performer. Full ranked leaderboard table below.

[Screenshot 2026-06-14 11 17 13 PM ]


🔐 Security

Access is protected by a single-user login gate — the dashboard is completely inaccessible without authentication.

  • Passwords stored as sha256 hash — never plain text, anywhere
  • Session-based auth via Streamlit session_state
  • Full session wipe on logout — data, filters, and file cache all cleared
  • Glass-morphism login screen with animated Emerald scanline effect

[Screenshot 2026-06-14 11 17 43 PM ]


Data Requirements

Upload any CSV or Excel file with these six columns — names are case-insensitive and auto-normalised:

Column Type Notes
date date / string Deal or transaction date
revenue float / int / string Supports $1,200.00 format — parsed automatically
rep string Sales representative name
region string Geographic region or territory
product string Product or service name
stage string Prospecting · Qualification · Proposal · Negotiation · Closed Won

Missing categorical columns are auto-filled with "Unknown" — the app never crashes on incomplete data.

Example:

date,revenue,rep,region,product,stage
2024-03-15,12500.00,Sara Ahmed,North,Enterprise Plan,Closed Won
2024-03-18,8750.00,James Okafor,West,Starter Pack,Proposal

No data? Hit ⬇ Download Sample CRM Data in the sidebar — a full demo dataset loads instantly.


Architecture

sales-intel-dashboard/
│
├── app.py            # Entry point — login gate, sidebar, routing, landing page
├── credentials.py    # Auth store  — sha256 hashing, single-user validation
├── login.py          # Auth UI     — glass-morphism login, session management
│
├── ingest.py         # The Loader        — CSV/Excel parsing & schema detection
├── transform.py      # The Sanitiser     — Polars 5-step cleaning pipeline
├── db.py             # The Engine        — DuckDB session & SQL aggregation helpers
├── metrics.py        # The Calculator    — MoM growth, variance alerts, KPI logic
├── charts.py         # The Visual Factory — Plotly chart builders (all chart types)
├── funnel.py         # The Funnel Lens   — Drop-off analysis & stage health metrics
├── filters.py        # The Control Panel — Sidebar filter widgets & FilterState
├── views.py          # The Composer      — Full page layouts, export bars, scorecards
├── theme.py          # The Stylist       — Glass-morphism CSS, Plotly template, helpers
├── utils.py          # The Toolkit       — Shared helpers & sample data generator
│
└── requirements.txt  # All dependencies — version-pinned for reproducible deploys

One rule: every file has exactly one responsibility. views.py never touches data. db.py never touches the UI. Adding a new chart means one new function in charts.py — nothing else changes.

Data Flow

User Uploads CSV / Excel
         │
         ▼
   credentials.py    ← login gate — blocks unauthenticated access
         │
         ▼
   ingest.py         ← file parsing, schema detection, format normalisation
         │
         ▼
   transform.py      ← Polars pipeline:
         │             normalize headers → clean revenue → parse dates
         │             → fill categoricals → deduplicate
         ▼
   db.py             ← DuckDB registers Polars DataFrame (zero serialisation)
         │
         ▼
   metrics.py        ← SQL aggregations, MoM growth, KPI computation
         │
         ▼
   charts.py         ← pure Plotly Figure objects (Emerald + Gold themed)
         │
         ▼
   views.py          ← Streamlit composition — filters applied, exports rendered

Tech Stack

Layer Technology Version Why
UI Framework Streamlit 1.36 Reactive Python UI — sidebar, tabs, session state
Data Engine Polars 1.0 Rust columnar — 5–10× faster than Pandas at scale
SQL Layer DuckDB 1.0 In-process SQL on DataFrames — no server, no ETL
Visualisation Plotly 5.22 Interactive dark-mode charts, hover tooltips
Interop Pandas + PyArrow 2.2 + 14 Polars ↔ Pandas bridge for Excel and pivot ops
Auth hashlib stdlib sha256 — zero extra dependency
Runtime Python 3.10+ Core language

Getting Started

1 — Clone

git clone https://github.com/Ali-datasmith/Sales-Intel-Dashboard.git
cd Sales-Intel-Dashboard

2 — Virtual Environment

python -m venv venv
source venv/bin/activate       # macOS / Linux
venv\Scripts\activate          # Windows

3 — Install

pip install -r requirements.txt

4 — Run

streamlit run app.py

Open http://localhost:8501 — log in and upload your CRM export.


Deployment

Streamlit Cloud (Recommended — Free)

1. Push repo to GitHub
2. Visit share.streamlit.io
3. Connect repo → set main file: app.py
4. Deploy

Zero environment variables. Zero secrets file. Runs on the free tier for datasets up to ~200K rows (1 GB RAM).

Changing the Login Password

# Generate a new sha256 hash
python3 -c "import hashlib; print(hashlib.sha256('YourNewPassword'.encode()).hexdigest())"

Replace the password_hash value in credentials.py with the output.

For team deployments: move credentials to .streamlit/secrets.toml and update credentials.py to read from st.secrets.


Dashboard Video

[https://youtu.be/j4qpUIL95nU]


Author

Muhammad Ali Rajput — Data App Developer · Python · Streamlit · Analytics Engineering

GitHub LinkedIn


No BI licences. No infrastructure. No Pandas bottleneck. No public exposure. Just fast, secure, open-source sales analytics.

⭐ Star this repo if it saved you a Power BI subscription.

About

High-Performance Sales Intelligence Terminal built with Polars, DuckDB, Plotly and Streamlit.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages