Melty Colors

You can check out this website here. You can also read blog posts I wrote while developing it here, here and here. The source can code be found on Github.

Melty Blood is a fighting game released in september 2021. It contains a way to customize colors for your characters, using presets colors. After reading about that feature, I decided to make a website to allow people to share their creations and the colors they used. I started working on it about 4 days before the game release, and I wanted to play the game more than code, so time was of the essence, I had to finish this site fast. This lead many of my tech choices for this project.

Frontend

Since this website didn’t need a lot of interaction, I decided to go for plain old server rendered templates instead of a Javascript framework. The engine I chose was jte but I believe any would have worked. I did add htmx for the “load more” feature, but it was not used anywhere else (I could have used it to make the site “SPA-ish”). As I used it before with great pleasure, I added TailwindCSS to avoid writing actual css.

Backend

For the backend, I used Javalin. Java is the language I’m most familiar with so that was an easy decision, and I wanted a web framework smaller than something like Spring Boot. Javalin reminded me of Express and was perfect for the size of the site I made. I’m not sure how it would fare for somehting much bigger, but I believe it could work with a good code structure. My data layer consisted of Jdbi, a thin layer over sql, coupled with sqlite (any sql database would have worked, but sqlite made deployement and backup easier). Jdbi was very simple to use and lead to pretty readable code so I enjoyed using it.

Deployement

As for the other pieces, i wanted to go as simple as possible there. Building is handled by maven (+ some npm/postcss for TailwindCSS). I’m just building a jar with dependencies and running it. I’m also using Caddy as a web server. Its very easy to run and got me an https reverse proxy without configuration. Both the Javalin app and Caddy run through systemd services. Backup is handled by a simple script zipping the content of the data folder (containing the sqlite db file and the images) to a folder every day (using crontab). Files older than a week are wiped off.