Just finished building the document view for my product. This one took about a couple of working days but I'm quite proud of the end result. The requirement was to allow for a folder structure just like on desktop. At first I wasn't sure how I would do this, but I was pretty sure it could be done. I knew a bit about S3
's structure. And once I knew server side would not be a problem, I knew this could be done.
Letting problems stew
Initially, I was stuck on how to get the view to work along with the server. The server was quite simple. Fetch by prefix
from S3
, get the details of the files from the database and just filter out what is needed.
The challenge was I did not know how to make it as simple in the UI. The problems wasn't the UI but rather my approach to it. So I decided to build as much on the server side as I could and then tackle the UI. This was actually a good decision. Also why being able to work on the full stack has some major upsides. Building the server side logic first helped me realize what the UI would need to do and how for me to be able to achieve the desired result.
Luckily for me the UI made from Alpine and Htmx is so simple that stuff just works. Just let the browser do the heavy lifting.
Over time the solution just revealed itself. All I did was walk away whenever I was stuck. Or work on something else. I had a couple of mental breakthroughs that helped to simplify the solution quite a lot. There are some footguns on the server but overall it works quite well. In the end I was so happy that I couldn't wait to let the user who suggested it know. A job well done is satisfying as fuck.