Skip to content

ishaanman7898/THRIVE_MERIT

Repository files navigation

Thrive Tools

Version 2.5.2 | Virtual Enterprise Operation Suite

Thrive Tools is a comprehensive business operations platform designed for Virtual Enterprise (VE) teams. Built with Streamlit and integrated with Supabase, this suite provides an all-in-one solution for managing inventory, automating customer communications, and processing sales data.


core Modules

1. Inventory Management

The inventory module serves as the central source of truth for all product stock levels.

  • Supabase Integration: Direct real-time synchronization with Supabase tables for high availability and consistency.
  • Dynamic Adjustments: Dual tracking of 'Stock Left' (available for sale) and 'Stock Bought' (total procurement history).
  • Bulk Data Editing: An integrated data editor allows for rapid spreadsheet-style updates to multiple products simultaneously.
  • Automated Invoice Parsing: Built-in support for converting VE Wholesale Marketplace PDF invoices into CSV format using pdfplumber, streamlining the replenishment process.
  • Stock Status Logic: Automatic classification of products as 'In Stock', 'Low Stock', 'Out of Stock', or 'Backordered' based on inventory thresholds.

2. Email Fulfillment System

A specialized tool for automating post-purchase communications with customers.

  • Automated Dispatch: Rapidly sends branded fulfillment notifications using smtplib and Gmail SMTP integration.
  • Product Image Retrieval: Fetches high-resolution images directly from Supabase-stored URLs and attaches them to outbound emails as high-quality MIME attachments.
  • Inventory Synchronization: When sending fulfillment emails, the system can automatically deduct quantity from the Supabase inventory table.
  • Bulk Processing: Support for importing customer order lists via CSV to queue dozens of emails at once.
  • Parser Engine: A robust regex-based parser processes complex product strings (e.g., 'Product Name x2') to identify SKUs and quantities accurately.

3. Product Merger

A data integration utility designed to bridge the gap between various export formats.

  • Shopify Compatibility: Specifically tuned to merge Shopify 'Orders' CSV and 'Products' CSV files.
  • Unified Reporting: Combines transaction details with item-level data to produce a standardized master report including customer details, products ordered, totals, and taxes.
  • Data Standardization: Automatically cleans and strips whitespace from CSV columns to ensure high-fidelity merging.

Security and Authentication

  • User Authentication: Secure access is enforced via Supabase Authentication (Email and Password).
  • Session Management: Implements a 30-minute inactivity timeout to protect sensitive business data.
  • Credential Storage: Sensitive API keys and SMTP credentials are managed via Streamlit Secrets or local environment variables (.env), ensuring they are never hardcoded.

Technical Architecture

  • Frontend: Streamlit Framework
  • Datastore: Supabase (PostgreSQL)
  • Languages: Python 3.12+
  • Key Libraries:
    • pandas: For complex data manipulation and CSV processing.
    • supabase-py: For backend database communication.
    • pdfplumber: For high-accuracy PDF invoice extraction.
    • requests: For fetching product imagery from cloud storage.

Installation and Deployment

1. Prerequisites

  • Python 3.12 or higher installed.
  • A Supabase project with 'products' and 'inventory' tables configured.
  • A Gmail account with an App Password generated for SMTP access.

2. Local Setup

  1. Clone the repository:
    git clone [repository-url]
    cd "Streamlit Thrive Tools"
  2. Install the required dependencies:
    pip install -r requirements.txt
  3. Configure your secrets in a .env file:
    SUPABASE_URL="https://your-project.supabase.co"
    SUPABASE_ANON_KEY="your-anon-key"
    SMTP_SENDER_EMAIL="your-email@gmail.com"
    SMTP_APP_PASSWORD="your-app-password"
  4. Run the application:
    streamlit run thrive.py

3. Deployment to Streamlit Cloud

  1. Push your code to a GitHub repository.
  2. Connect your repository to Streamlit Cloud.
  3. Add the environment variables from your .env file into the Streamlit Cloud 'Secrets' panel.

File Structure Overview

  • thrive.py: Main application entry point and layout configuration.
  • auth.py: Authentication middleware and session tracking.
  • inventory_management.py: Inventory logic and PDF parsing utilities.
  • email_sender.py: SMTP automation and Supabase image handling.
  • supabase_client.py: Shared client initialization for database access.
  • product_merger.py: CSV processing and data joining logic.
  • email_templates.py: HTML structures for customer notifications.

Contributing

As an open-source project, contributions are welcome. Please ensure that any pull requests follow the existing coding style and include documentation for new features.


License

This project is open-source. For specific licensing terms, please refer to the LICENSE file (if available) or contact the maintainers.

Copyright 2026 Virtual Enterprise Operations Suite

About

A comprehensive Streamlit suite for Virtual Enterprise (VE) operations (Thrive Wellness), featuring Supabase-backed inventory management, automated email fulfillment with product imagery, and order-product data merging.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages