Inspiration
I got the idea for Brim from a problem that I thought was easy to overlook. In many places, people need to measure things like medicine, water treatment solutions, or fertiliser, but they do not always have proper measuring equipment available. Most instructions use measurements like millilitres and grams, which can be difficult to follow if all you have is a regular bottle, mug, or container.
I wanted to make something that could help with this without making things more complicated. Instead of expecting people to find measuring tools, I wanted to make everyday containers useful for getting more accurate measurements. That is how Brim started.
What it does
Brim is a simple visual measuring tool that helps people work out how much of something they need using containers they already have.
Users can choose between four different tasks: water treatment, oral rehydration mix, liquid medicine dosing, and crop nutrient dilution. They can then select a container, such as a bottle cap, tea mug, water bottle, or jerrycan.
The app shows a visual version of the selected container with a fill line to show exactly how much is needed. It can also calculate measurements for multiple batches, so users do not have to work everything out themselves.
I also added a few other features, including estimated waste tracking, high contrast mode, voice readout, and a local history of previous calculations. I wanted the app to be useful even in places where internet access is limited.
How I built it
I built Brim as a lightweight web application using HTML, CSS, and vanilla JavaScript. I decided not to use any frameworks because I wanted it to load quickly and work well on older phones and slower internet connections.
One of the main parts I worked on was the visual measuring system. I used SVG to draw the different containers and calculate where the fill line should appear based on the required volume.
For this, I used a simple ratio:
$$r = \frac{V_{\text{target}}}{V_{\text{vessel}}}$$
I then used that ratio to calculate the fill height inside each container drawing.
I also added support for multiple batches. If the total amount needed was larger than the selected container, the app would split the measurement into full containers and the remaining amount, rather than showing one confusing measurement.
I spent time working on the layout too, trying to keep everything on one screen without making it feel crowded. I wanted someone to be able to open the app, select what they needed, and understand the result without having to figure out how the interface works.
Challenges I ran into
One of the biggest challenges was making the app simple without removing useful features. I kept finding things I could add, but I had to think about whether they actually made the experience better or just added more clutter.
Another challenge was getting the container visuals right. A small bottle cap and a large jerrycan have very different capacities, so making their fill levels look clear and accurate took some experimenting.
I also had to figure out how to handle multiple batches. At first, showing larger amounts in a single container diagram did not make much sense, so I changed the logic to show how many full containers were needed and what was left for the final one.
There was also a lot of testing and adjusting involved. Small changes to the calculations or layout could make the instructions less clear, so I had to keep checking how everything looked and behaved.
Accomplishments that I'm proud of
I'm most proud of actually turning the idea into something usable. I managed to build a working measuring tool without relying on heavy frameworks or complicated dependencies.
I'm also happy with the visual measurement system because it makes something that would normally involve calculations much easier to understand. Features like offline storage, voice readout, and high contrast mode also made me think more about how different people might use the app.
The biggest thing I learned from this project is that building something useful is not always about adding more features. Sometimes it is about making one specific problem easier to deal with. I also learned a lot about JavaScript calculations, SVG, responsive layouts, and handling different edge cases.
There are still things I would like to improve, but I'm happy with what I managed to build on my own and how much I learned while working on Brim.