Sunscore - See Live

Author avatar
Phil Minielly
February 11, 2025
Projected outputs for Sunscore - a tool for getting energy outputs for solar assets

What it does?

The tool takes in an address and solar asset information to provide potential energy output for the asset.

Annual Outputs

Monthly Outputs

How it’s built

We rely on NREL (National Renewable & Energy Laboratory) and their apis to get the solar output data. We use Google’s Geolocation API to convert an address into latitude & longitude values.

The application is built using RedwoodJS. Redwood is a full-stack React Meta Framework stitching together Typescript & React, Prisma, & Graphql to build robust full-stack web apps.

The creation of assets and generation of reports is hidden behind simple authentication that comes out of the box with Redwood.

The fields describing each asset as well as the output is stored in a Postgres database.

The app is running in a docker container on a vps and the database is running in a separate container.

The containers are built and deployed using Caprover (read more about Caprover and how I am using it here).

Hard Parts/What I Learned

Graphql - Redwood relies on some code gen to generate sdl & mutation mapping files based on our Prisma models. While it can speed up development - making tweaks in functionality (especially looping in our data coming from the api) can required re-generating or updating the auto-generated type definition files.

Docker - Redwood was initially geared towards JamStack development so it’s had to adapt to adopt Docker deployments effectively. Caprover also doesn’t support docker-compose files out of the box. So getting the container to run both the web and api sides from a single Dockerfile as well as connect the separate db container gave me a lot of cool experience getting Docker going on a VPS.