Skip to content

Dew DB

I have a large collection of Mountain Dew cans. Wanna see?

Dew DB interface

Background

I have been a fan of Mountain Dew since I was 13 years old. Growing up, I never was a soda drinker. Only when my middle school soccer team banned players from drinking soda did the allure of the syrupy magic elixir grab me. Dew was my poison of choice - the citrusy flavor was more approachable to this late bloomer in the soda-consuming world compared to the sharp and bitter cola.

Dew then became a core part of my personal brand as a kid. It was a great time to be a Dew fan. There were constant new releases, marketing campaigns, and cultural events. I even took a vacation to Mountain City, TN to get an opportunity to taste new flavors of Dew at the Mtn Dew Outpost.

The Project

I now have quite the sizable collection of Dews. In 2023, I started a project to catalogue the cans on my shelf in a database that would publish to a read-only API. It started as a Django application with a web interface I could access on my phone, getting the data onto a SQLite DB on my server. At the time, I was using Django at work, so it was an extension of what was familiar. I catalogued exactly three flavors using this method. It was a pain, and the fun part of the project was building and imagining, not cataloguing.

The Slop

This project sat on the shelf (ha!) for about three years before I wanted to pick it back up. I had written the original 2023 code by hand. This past year, I have gotten into agentic development (the term people use who are too ashamed to admit that they vibecoded something) and wanted to try to revive Dew DB.

The first prototype existed pretty quickly from just a few simple Claude Code prompts, but the process of getting data loaded for my collection was a pain. This wasn’t something where I was inputting data from a spreadsheet - the data didn’t exist. I chose to create a special mobile app specifically for data input. Keeping in line with my other vibecoded projects, the mobile version was created using Google's Flutter framework. The read-only API needed to be scope-expanded to a permissioned read-write API. I handled permissions using Microsoft's Entra ID. Following the docs to expose a Write permission to only specific users in my Microsoft tenant allowed me to enforce read-only by default.

I chose the UPC barcode on the can as a good identifier in the cataloguing app and got to work scanning about 90 cans on my shelf. Earlier, I had mentally estimated I had about 40 different flavors. One value of the database was quantifying just how big my collection had become!

Information about the Dews I don’t have on my shelf comes from the Dew Fandom wiki. Fandom, despite their many flaws, licenses their wikis as CC-BY-SA. I'm able to use this data for this purpose as long as I attribute the wiki as the source.

The Frontend

The original interface was a simple table view.

Dew DB frontend interface

Dew DB's frontend is an Astro static site that retrieves the list of Dews at build time using the API. The frontend does not do any GET requests to the API during browsing - only during the build.

I asked Claude Design to give me three options for the frontend.

Facts Panel Frontend It called this one The Facts Panel, based on the nutrition label. Cute, but not very practical.

Tasting Notes Frontend The Tasting Notes option felt more like a magazine than a database of my collection.

The Cooler frontend The Cooler is the option I selected. It's supposed to emulate the shelves of a gas station fridge. It also includes a denser list view:

The Cooler list view

There is also a ranked view that brings the can art/representation and the tagline to the forefront with a larger score.

The Cooler ranked view

Notice that there are community reviews - if you so desire, you can leave a review for any of the flavors I have listed in the collection. This is the frontend's only live API request. After a sign-in using Firebase Auth, it issues a POST request to the backend API with the review details. All posts are moderated before publication. I also use Cloudflare Turnstile as my bot prevention tool.

DewBot

I also created a Mastodon bot named DewBot that announces when anything gets added to the shelf, as well as a daily "Here's a Dew I have!" post.

DewBot Mastodon screengrab

Mastodon has a built-in RSS feature. If you want to view my Mountain Dew collection in a feed reader, that is a supported workflow.

Supremely Cool; Supremely Useless

This is a pointless project that I have very much enjoyed. Why care about tracking a sugar water brand container collection enough to have a web API tracking its completeness? Simply because I can. It's "software development" as a form of play.

Vibecoding has reduced the time cost of software development and the amount of effort. I get to be the "ideas guy" - usually a worthless position - and see the software come to life in front of me. Do I get the same fulfillment or satisfaction out of this project as I would from something I've built over time like my home server or my home automation? Absolutely not. However, I'm still having a blast. I've dipped my toes into frontend in a way I would have shied away from in the past.

Check out Dew DB at https://dew.grantmclravy.com. If you're feeling interactive, leave a review on a flavor. Or just share your feedback - I'm @[email protected] in the Fediverse.