Skip to content

ahgWritesDemos/foundant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hello, Foundant!

Thanks for taking the time to look over my work.

I stuck mainly to the Go standard library, though you'll notice that I included the `httprouter` library. I'm familiar with this library, and chose it because I expected I'd want to pull parameters from the URL, and I didn't want to hand-parse them. I also like its `router.METHOD` family of convenience functions.

As you'll notice, I spent little time on the front-end. My goal was to stand up a simple react app to consume the various endpoints, but given the time constraint I prioritized working code over polish. I considered rendering all pages server-side, but in general that is not the direction I would take in 2021, so when I found myself looking for a templating library, I made the decision to expose sensible JSON endpoints, and rely on your imagination (and charity) for the implementation.

Some considerations:
 Worried about duplicate images, I decided to keep filenames arbitrary, and maintain metadata separately.
 A future version might detect actual duplicate images, and point both metadata records to the same backing file.
 UUIDs are heinous to human eyes. A bespoke random name generator would produce filenames that are easier to type.
 Actual images can be seen at `localhost:8080/images/<uuid>`