Take a bite out of high electric bills!
Follow these steps to get the Sharkbite MVP running on your local machine!
β‘ Prerequisites
- Git installed on your system.
- Miniconda or Anaconda installed on your system.
Open your git bash and run the following command to clone the project files:
git clone https://github.com/ShruAgarwal/Sharkbite.gitIt is generally recommended to use a Conda environment so as to manage project dependencies and ensure compatibility.
- Open up the Conda terminal and create a new Conda environment named
sharkbite_env(or your preferred name) withPython 3.11(within the main repo):
conda create -n sharkbite_env python=3.11- Activate the newly created environment:
conda activate sharkbite_envThe necessary Python packages are listed in the requirements.txt file. Install them using pip:
pip install -r requirements.txtπ Replace the placeholder key values with your actual credentials within the
secrets.tomlfile below as follows:
# .streamlit/secrets.toml
NREL_API_KEY = "YOUR_API_KEY_HERE"
# AWS Credentials for accessing Amazon Bedrock model are required to power the AI features.
AWS_ACCESS_KEY_ID = "YOUR_AWS_ACCESS_KEY_ID_HERE"
AWS_SECRET_ACCESS_KEY = "YOUR_AWS_SECRET_ACCESS_KEY_HERE"
AWS_REGION = "us-west-2" # e.g., Use the region where you have LLM model access -- us-east-1, us-west-1Do not commit this file with your actual key to a public repository.
Once the environment is set up and the API key is configured, run the following command in your terminal:
streamlit run sharkbite_app.pyThis will start the Streamlit development server, and the application should open automatically in your default web browser. If not, the terminal will provide a local URL: http://localhost:8501 that you can open manually.
The flowchart (Mermaid) shows how a user is guided from a simple project idea to a complete, compliant, and investor-ready financial package, with integrated backend processes and optional AI analysis features at each key step.
Sharkbite/
βββ .github/
β βββ workflows/
β βββ main.yml # GitHub CI/CD Actions
βββ .streamlit/
β βββ config.toml # Main App Theme
β βββ secrets.toml # API keys and other secrets
βββ assets/
β βββ custom_style.css # Custom CSS file
β βββ logo.png # App logo
βββ static/
β βββ BebasNeue-Regular.ttf # Custom font family for headers in the app
βββ sharkbite_engine/ # Core logic and utilities
β βββ solar_calculator_logic.py # Calculation functions for sizing, dispatch, and simplified financials
β βββ incentive_definitions.py # Structured definitions for all grant and incentive programs
β βββ claude_service.py # Manages all interactions with the Claude LLM Model on AWS Bedrock
β βββ pdf_generator.py # Logic for creating the final PDF report
β βββ ui_login_screen.py # Streamlit main login screen function
β βββ ui_unified_intake_screen.py # Streamlit screen 1 rendering functions
β βββ ui_calculator_screen.py # Streamlit screen 2 rendering functions
β βββ ui_ppa_analyzer_screen.py # Renders the optional PPA vs. Ownership analysis screen for homeowners
β βββ ui_reap_flow_screens.py # Streamlit screens 3-7 rendering functions
β βββ utils.py # Contains shared constants, helper functions, and the final calculator
βββ tests/ # Automated tests for the application
β βββ test_e2e_ppa_flow.py # E2E test for conditional PPA button rendering
β βββ test_integration_claude_service.py # Integration tests for AI service functions
β βββ test_login.py # Test for the login functionality
β βββ test_unit_calculator_logic.py # Unit tests for core financial & dispatch logic
β βββ test_unit_utils.py # Unit tests for helper functions (REAP, etc.)
βββ sharkbite_mvp v1.0/ # Older App Version
βββ sharkbite_app.py # Streamlit App
βββ requirements.txt # Project dependencies
βββ .gitignore # Files/dependencies to ignore
βββ README.md # About the project & general instructions