Skip to content

hendrixAIDev/saas-analytics-dashboard

Repository files navigation

πŸ“Š SaaS Analytics Dashboard

A production-ready Streamlit dashboard template for SaaS metrics visualization. Perfect for indie hackers, startup founders, and SaaS businesses who need beautiful analytics without the complexity.

Dashboard Preview

✨ Features

  • πŸ“ˆ Key SaaS Metrics: MRR, customer count, churn rate, growth trends
  • 🎨 Beautiful UI: Custom dark theme with professional styling
  • πŸ” Supabase Auth: Secure login/signup with email+password
  • πŸ€– AI Insights: Powered by Claude API for natural language metric queries
  • πŸ“Š Rich Visualizations: Interactive charts with Plotly
  • πŸ’Ύ PostgreSQL Database: Robust data storage with Supabase
  • πŸ“± Responsive Design: Works on desktop and mobile
  • πŸš€ Easy Setup: Running in under 5 minutes

πŸš€ Quick Start (5 Minutes)

Prerequisites

  • Python 3.11 or higher
  • A Supabase account (free tier works!)
  • Claude API key (from Anthropic)

Step 1: Clone & Install

# Navigate to the project directory
cd saas-analytics-dashboard

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

Step 2: Set Up Supabase

  1. Go to supabase.com and create a new project
  2. Once created, go to SQL Editor and run the contents of schema.sql
  3. Get your credentials from Settings β†’ API:
    • Project URL
    • Anon/Public key

Step 3: Configure Environment

# Copy example env file
cp .env.example .env

# Edit .env and add your credentials:
# - SUPABASE_URL=your_project_url
# - SUPABASE_KEY=your_anon_key
# - ANTHROPIC_API_KEY=your_claude_api_key

Step 4: Seed Sample Data

# Generate 12 months of realistic sample data
python seed_data.py

Step 5: Launch Dashboard

streamlit run app.py

Visit http://localhost:8501 and you're live! πŸŽ‰

πŸ“– Usage

Creating Your First User

  1. Click the "Sign Up" tab
  2. Enter email and password (minimum 6 characters)
  3. Check your email for verification link
  4. Login with your credentials

Navigating the Dashboard

  • Overview: High-level metrics and trends
  • Revenue Analytics: Deep dive into MRR and plan breakdowns
  • Customer Insights: Growth, churn, and cohort retention
  • AI Insights: Ask questions about your metrics in natural language

Sample AI Questions

Try asking:

  • "What's driving my revenue growth?"
  • "How is my churn rate trending?"
  • "Which plan tier is most profitable?"
  • "Should I be worried about customer growth?"

πŸ—‚οΈ Project Structure

saas-analytics-dashboard/
β”œβ”€β”€ app.py                  # Main Streamlit application
β”œβ”€β”€ requirements.txt        # Python dependencies
β”œβ”€β”€ .env.example           # Environment variables template
β”œβ”€β”€ schema.sql             # Database schema
β”œβ”€β”€ seed_data.py           # Sample data generator
β”œβ”€β”€ README.md              # This file
β”œβ”€β”€ CUSTOMIZATION.md       # Customization guide
β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ auth.py           # Supabase authentication
β”‚   β”œβ”€β”€ database.py       # Database queries
β”‚   β”œβ”€β”€ ai_insights.py    # Claude API integration
β”‚   └── charts.py         # Plotly chart generation
└── assets/
    └── style.css         # Custom CSS theme

πŸ”§ Customization

See CUSTOMIZATION.md for detailed instructions on:

  • Changing colors and styling
  • Adding new metrics
  • Modifying database schema
  • Customizing AI prompts
  • Adding new chart types

πŸ’‘ Common Use Cases

For Indie Hackers

Track your SaaS metrics without expensive tools like ChartMogul or Baremetrics. Perfect for validating product-market fit.

For Startup Founders

Share beautiful metrics with investors and team members. Export charts for pitch decks.

For Agencies

White-label template for client dashboards. Customize branding and metrics per client.

πŸ› οΈ Tech Stack

  • Frontend: Streamlit 1.31
  • Database: Supabase (PostgreSQL)
  • Authentication: Supabase Auth
  • Charts: Plotly 5.18
  • AI: Anthropic Claude API
  • Data: Pandas, NumPy

πŸ“Š Metrics Tracked

Metric Description
MRR Monthly Recurring Revenue with growth trends
Customer Count Total active customers with growth rate
Churn Rate Percentage of customers lost each month
Plan Breakdown Revenue and customers by tier (Starter/Pro/Enterprise)
Cohort Retention Customer retention by signup month
New Customers Monthly customer acquisition

πŸ”’ Security Notes

  • Never commit your .env file to git
  • Use environment variables for all secrets
  • Supabase handles authentication securely
  • Row-level security can be added in Supabase for multi-tenancy

πŸ“ License

This template is provided as-is for personal and commercial use.

πŸ†˜ Support

Issues? Check these common solutions:

"No data available"

β†’ Run python seed_data.py to generate sample data

"Supabase credentials not found"

β†’ Make sure .env file exists with valid credentials

"Login failed"

β†’ Check your email for verification link from Supabase

Charts not displaying

β†’ Ensure you have data in the database and tables are created

πŸš€ What's Next?

Once you're comfortable with the template:

  1. Connect Real Data: Replace sample data with your actual SaaS metrics
  2. Add More Metrics: LTV, CAC, runway, burn rate, etc.
  3. Customize Styling: Match your brand colors
  4. Deploy: Use Streamlit Cloud, Heroku, or DigitalOcean
  5. Add Features: Email reports, Slack notifications, export to CSV

πŸ’° Worth $49?

This template saves you:

  • $299/mo - ChartMogul subscription
  • 40+ hours - Building from scratch
  • $2000+ - Hiring a developer

All for a one-time purchase. You get:

  • βœ… Production-ready code
  • βœ… Beautiful UI/UX
  • βœ… AI-powered insights
  • βœ… Full customization rights
  • βœ… No ongoing fees

Built with ❀️ for the indie maker community

Questions? Found a bug? Want to share your customization?
Open an issue or submit a PR!

About

SaaS Analytics Dashboard - Streamlit Template with AI Insights

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors