projects
overview
Fakermaker allows you to use pop culture references from movies and tv shows to download realistic fake data in CSV format.
stack
- Kotlin, Spring
- Astro, Vue, TypeScript, tailwindcss
- Cloudflare
- Docker
- Raspberry Pi 5
motivation
I liked making fake data at work for testing our Spring Boot models and thought this would be a fun project to make a portfolio piece.
things learned
- My first iteration of the server had issues with the heap not clearing memory correctly after API calls got made, so I had to do some profiling and optimizing. I ended up multithreading the app using Kotlin coroutines and caching the address and location data, which were expensive operations. The server really took off in speed after that, it was crazy.
- Getting the server to accept the payload was originally tricky, since the payload can change on every request, but after making custom serializers for my data shapes, I was able to parse everything without a problem.
- Kotlin really forces you to handle nulls. Coming from the Java world, I wasn't used to that. I've really come to love how Kotlin forces you to be null safe in making things. Data classes are super nice.
- For deployment, I knew the JVM is hungry but didn't realize just how hungry. The base tier droplet with 1vCPU and 512mb RAM was laughable, and it seemed like overkill paying $20 for 2vCPUs and 4gb of RAM for an app no one would use. I decided to self host it on a Raspberry Pi 5 I had laying around, but I didn't feel super secure about this so I went and bought a $500 Dream Machine Pro... after this new toy arrived I was able to isolate the Pi to its own VLAN.
- I realized I could use Cloudflare tunnels for free and not expose my personal IP, and it was less for me to worry about. After battling a dumb CORS error for many hours and fixing one line of code, I finally got it all working.
- The frontend was fun, but I quickly learned React has better TypeScript support than Vue. Setting up Tanstack to work with Vue was kinda annoying and for future projects I'm definitely sticking to React.
- I FINISHED A PROJECT. I have a terrible habit of starting stuff but never finishing it, so this felt really good (mostly) finishing this project. There's still lots I would change, but I wanted to get back to working on my big side project, plaza.dev.
regrets
Grug have many regrets. Should have used React. Should have used Go.
Plaza
check it out |>
Blazingly fast, beautifully designed. Check it out!