Skip to content

SolarSizerCalculator helps users calculate the optimal size and number of solar panels based on daily energy consumption and location.

Notifications You must be signed in to change notification settings

medelm1/solar-sizer-calculator

Repository files navigation

SolarSizerCalculator

A web application to help users calculate the optimal size and number of solar panels based on daily energy consumption and location.

Project Overview

Solar Sizer Calculator is an intuitive tool designed to help homeowners and solar enthusiasts determine the optimal size and number of solar panels required based on their daily energy consumption and location. By entering essential data such as energy usage, solar panel wattage, and average sunlight hours, users can quickly estimate their solar requirements and make informed decisions about their solar energy investments. The application aims to promote sustainable energy solutions and empower users to optimize their solar power systems efficiently.

Key Features

User Inputs

  • Daily Energy Consumption: Users input the average daily energy usage in kilowatt-hours (kWh), derived from a list of household appliances.
  • Appliance Details: For each appliance, users provide:
  • Power Rating: The wattage of the appliance (e.g., 1500W).
  • Usage Hours: The average daily hours the appliance is used.
  • Number of Units: The quantity of that appliance in the household.
  • Category: Classification of the appliance (e.g., heating, cooling, lighting, etc.).
  • Solar Panel Output: The wattage of a single solar panel (e.g., 300W).
  • Average Sunlight Hours: The average number of peak sunlight hours per day in the user’s location.

Calculation Logic

  • The application retrieves the appliance data and user inputs.
  • It calculates the daily energy consumption based on the appliance details.
  • It determines the solar panel output using the provided data.
  • It calculates the number of panels needed by dividing the daily energy consumption by the panel output.

Settings Configuration

  • Users can configure their energy cost rating (e.g., $0.12 per kWh), currency preferences, dark mode toggle, and location settings.
  • The app uses the location to obtain peak sunlight hours through a third-party API, ensuring accurate solar panel power production calculations.

Output Display

  • The results are presented clearly, showing:
  • The total wattage required.
  • The number of solar panels needed.
  • Additional information such as total system size, potential energy production, and estimated cost savings based on the configured energy cost rating.

Technologies Used

  • Backend: Laravel
  • Frontend: Vue.js 3
  • State Management: Pinia
  • Styling: Tailwind CSS
  • Database: MySQL
  • Build Tool: Vite
  • HTTP Client: Axios
  • Version Control: Git, GitHub

Getting Started

Prerequisites

  • PHP >= 8.2
  • Composer
  • Node.js and npm
  • MySQL

Installation Instructions

  1. Clone the repository:
git clone https://github.com/medelm1/solar-sizer-calculator
cd solar-sizer-calculator
  1. Install Backend Dependencies:
composer install 

-Make sure the 'fileinfo' extension is enabled in your php.ini file:

php --ini (This shows the filepath to the .ini file.)

-Within the .ini file, look for the line ';extension=fileinfo' and delete the semicoln. The save the file and restart your terminal. -Verify installation of the 'fileinfo' extension:

php -m

-fileinfo should be listed in the output.

  1. Set Up Environment: Copy .env.example to .env and update the database configuration and other necessary settings.
cp .env.example .env
  1. Generate Application Key:
php artisan key:generate
  1. Run Migrations:
php artisan migrate

-Make sure the 'pdo_mysql' extension is enabled in your php.ini file:

php --ini (This shows the filepath to the .ini file.)

-Within the .ini file, look for the line ';pdo_mysql' and delete the semicoln. The save the file and restart your terminal. -Verify installation of the 'pdo_mysql' extension:

php -m

-fileinfo should be listed in the output.

  1. Seed the Database
php artisan db:seed --class=DatabaseSeeder
  1. Install Frontend Dependencies:
npm install
  1. Run the Development Server:
npm run dev
  1. Start the Backend Server:
php artisan serve

Now your application should be running at http://localhost:8000.

Contributing

Contributions are welcome! If you would like to contribute to the project, please follow these steps:

  1. Fork the repository.

  2. Create a new branch for your feature or bug fix:

git checkout -b feature/my-feature
  1. Make your changes and commit them:
git commit -m "Add my feature"
  1. Push to the branch:
git push origin feature/my-feature
  1. Open a Pull Request and describe your changes.

Thank you for contributing!

About

SolarSizerCalculator helps users calculate the optimal size and number of solar panels based on daily energy consumption and location.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published