Git Product home page Git Product logo

climate-cooperative / home-energy-calculator Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 3.0 511 KB

Home Page: https://app.zwell.io/

License: Apache License 2.0

HTML 0.23% JavaScript 98.45% CSS 1.33%
energy energy-consumption energy-efficiency energy-data sustainability sustainable-development-goals climate-data climate-solutions climate climate-change climate-change-mitigation carbon-emissions

home-energy-calculator's Introduction

Home Energy Calculator

This repo acts as the front-end React app of the energy calculator.

Local Development

This service utilizes webpack and babel to build the static assets and host the local development server.

npm start

This Project relies on running the backend api at the same time locally in order to handle api request. See Mentioned repo for local development startup.

[TODO] Create api response mocks/stubs to simplify local development.

Linting and Formatting

ESLINT

Lints the codebase at src/

npm run lint or npm run lint:fix to apply changes if possible.

PRETTIER

Formats the code

npm run format

home-energy-calculator's People

Contributors

rgraue avatar cooper-roper avatar shilojones avatar codeexpert74 avatar chlsbrcktt avatar

Stargazers

Tobias Augspurger avatar  avatar

Watchers

 avatar

home-energy-calculator's Issues

Score Dial Language

Description

We never landed on the score ranges and what they mean e.g.

0 - 25 = Bad
25 - 50 = OK
50 - 75 = Good
75 + = Awesome.

app zwell io:score 2024-05-06 16-37-47

Mock local API Responses

Description

Don't plug into any specific api

Technical Notes

[Add Technical notes]

Risks

[Add Risks]

Related Issues Or Discussions

[...Issues]

Add spacing below button

Description

When content of a page is scrollable, there should be more space between the 'Next' button and the edge of the screen.

How We Calculate This Formatting

Description

The formatting of the How We Calculate this (should be a capital T) could use some improved styling for readability.

app zwell io:score 2024-05-06 16-48-22

Update Header to Climate-Coop Branding

Description

There recently was a "brand" swap. there are still some leftover remnants of the old brand. These need to be updated to Climate Cooperative logos and resources.

Update the Header component (src/components/Results/Header/header.jsx), so that:

  1. The anchor ref on the logo redirects to https://www.climate-cooperative.org in a new tab (target=_blank)
  2. The image is the one provided.

Technical Notes

[Add Technical notes]

Risks

Image to be provided

Related Issues Or Discussions

[...Issues]

Open Source Config

Description

Make repo more hospitable to open source contribution

Technical Notes

remove blocking actions and unused infra

Risks

[Add Risks]

Related Issues Or Discussions

[...Issues]

Navigation Hover Effect

Description

Improve styling on hover effect on the navigation bar

Technical Notes

[Add Technical notes]

Risks

[Add Risks]

Related Issues Or Discussions

[...Issues]

Pivot away from Local Storage

Description

We use a combo of LocalStorage and React's built in context. Pivot to use context only or introduce Redux. LocalStorage is an older, slower implementation, and doesn't plug in well with React's lifecycle.

Technical Notes

Risks

Research UX around calculator persistent state.

Related Issues Or Discussions

[...Issues]

Move Calculations to API

Description

The FE does a lot of heavy lifting in terms of calculation, especially when rendering the results page. This is a perfect example of something to move to the backend.

This also provides a better separation of concerns between logic and rendering.

In terms of contribution, this will also help introduce an area for improvement and pattern for expansion.

Technical Notes

Create new path in api to handle calculation of results. /score???

Risks

Both FE and BE will need to be worked on simultaneously. Some coordination there.

Related Issues Or Discussions

[...Issues]

DOCUMENT!

Description

Update or create

  • README.md
  • CONTRIBUTING.md
  • LOCAL-DEV.md
  • ECOSYSTEM.md (ecosystem diagram)

Technical Notes

[Add Technical notes]

Risks

[Add Risks]

Related Issues Or Discussions

[...Issues]

Deploy Static Site Infra - Updated

#14

After discussions best path forward is to:

  1. transfer zwell.io domain to route53
  2. Create SSL certs in ACM from domain in route53
  3. Standup cloudflare/route53* -> cloudfront -> s3
  4. upload bundled app to s3

* entry point may be tentative. linking to cloudflare might boost SEO, but also may bring the same present the same issues that made us move to route53

Repo Health

With the addition of new developers the repo needs some clean up and patterns created.

Create:

  • PR template
  • Issue Template?
  • Branch protection rule (that protect us, not slow us down)
  • pre-commit hooks (husky and lint-staged)

migrate calculation off React

Description

We should move the calculation to be handled on the API

Technical Notes

[]

Risks

[]

Related Issues Or Discussions

[]

View/Edit Answers

Description

The View/Edit Answers Dialogue Content could use some improvement to formatting and a method for allowing people to quickly go back and edit their choices to get a new result.

app zwell io:score 2024-05-06 16-55-04

Invalid URL Handling

Description

If you enter a valid or invalid URL you get an access denied message. We need handle more gracefully. Valid URLs should return a proper response and invalid URLs should 404?
app zwell io:score 2024-05-02 17-13-58

Faster Local DevServer

Description

The DevServer we use right now (webpack) has been reported as slow, and is slowing down development. Look into ways to decrease live build/dev time

Technical Notes

(https://esbuild.github.io/)

Risks

If it ain't broke, don't fix it

Related Issues Or Discussions

[...Issues]

Styling Overhaul Results Page

Description

Results page should reflect figma design

Technical Notes

[Add Technical notes]

Risks

[Add Risks]

Related Issues Or Discussions

[...Issues]

Parameterize Pipeline

The Pipeline as of now has a lot of had coded values in the terraform. Its better to parameterize these values, allowing for re-usable code with simple config changes.

add variables for:

  • Application name
  • ACM Cert name
  • domain name
  • CNAME aliases

Final form page

the last page of the form needs a button for 'No' when asked if they have solar panels and wind

Source Buttons Unselected

Description

If the user has gone through the form and returns to the heating and or cooling page, the source is not selected when it should be

Technical Notes

image

Issue Logging

Description

When app files log issues so we can diagnose any additional bugs we need to fix.

Technical Notes

[Add Technical notes]

Risks

[Add Risks]

Related Issues Or Discussions

[...Issues]

Use Cloudfront to add HTTPS to Static Site (S3)

To utilize zwell's DNS provider (cloudflare) and seucre traffic over https, cloudfront has to be wired into sit between cloudflare proxy and s3. This allows for https traffic to come in (verified with ssl cert) to cloudfront and then gets forwarded to s3 via http.

Technical notes:

  • Add cert to ACM using existing origin cert (MUST BE IN US-EAST-1 REGION)
  • Create cloudfront terraform
  • Update CNAME rule in cloudfront to forward to cloudfront distro endpoint

https://aws.amazon.com/cloudfront/

Calculator - favicon

The favicon is currently the React.js default one. Update to be the zwellhome.com one.

Description:

  • Using Webpack Locally, it picks it up, but currently the app is being built via react-scripts in the pipeline. Update the favicon location and usage, to work with react-scripts.

Technial notes:

  • Update public/index.html?
  • manually update s3 bucket to remove lingering default favicon

Result Page Error

Description

Not sure why we received no results. Captured the console to see if it can be diagnosed.

app zwell io:score 2024-05-06 16-31-41

Bug - invalid zipcode

Description

When an invalid zipcode is entered, it is possible to continue through the calculator, even though the zipcode data returned will error out on the results page.

Technical Notes

  • add validation to /zipcode page
  • add validation to results page. Maybe an error page? or component
  • don't use window local storage... we already use react's context functionality

Risks

none

Related Issues Or Discussions

#29 #30

Deploy Static Assets to S3

In order to serve the calculator app (react app) we need to bundle it to a single set of assets, and push to S3. From there the networking infra will handle the rest.

Items to upload:

  • index.html
  • pics/assets
  • fonts??
  • bundles react app

"See How You Compare!" Dialog Styling

Description

On results page, "See How You Compare!" content should have better styling. Creative freedom welcome.

Technical Notes

We do not have a styling guideline but try to use the same colors as used.

Validate Calculator

Smoke test the app.

Go through e2e and find places that don't work as expected. Make Issues for these to track.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.