Open Source Contributions
We’re big fans of open source technologies. We love React, Bootstrap, Ruby on Rails, and Laravel. The communities behind these tools have pushed software development forward in unimaginable ways, and we are the beneficiaries. Where we can, we like to give back.
Electric Rate Engine
https://www.npmjs.com/package/@bellawatt/electric-rate-engine
Our CEO’s background is in cost of service and rate design, so a decent amount of our projects are related to electric rates. Instead of building rate calculators from scratch each time, we built an internal library to handle detailed rate calculations. After a handful of projects, we decided to open source it for the community’s benefit.
Although the package is listed above, please feel free to see it in action on our rates page.
Inertia for Rails
https://github.com/inertiajs/inertia-rails
Inertia.js is a nice, small library that was originally written for Laravel, and we repurposed for Rails. It significantly reduces the amount of boilerplate code required to get React and Rails to communicate effectively, and increases the points of shared work.
The package allows us to write front ends that leverage React’s reusability while keeping our calculations in fast and easy-to-read Rails. We started this as a hackathon, and have enjoyed it so much we continue to maintain the package. We encourage you to try it out!
Helper Hooks for React
https://www.npmjs.com/package/@bellawatt/react-hooks
We build a lot of React-based front end calculators that have 30+ input parameters. Saving and storing these inputs are crucial for:
- sharing state throughout the app
- saving them to local storage for returning visits
- storing them in the URL to share a visiting user's configuration, and
- sending parameters to Google Analytics
Instead of writing the functionality from scratch each time, we built a package of hooks that standardizes all of the functionality in a light and seamless way.