devlogging this only now cause I never planned to submit this to flavortown
Alright so ~11 hours, that’s a lot of time, what did I achieve in that timeline? Imma break it down to the best of my memory:
-
Initial stuff, setting everything up, go mod init yadayada. Why go with Go (no pun intended)? Because it’s a very cool and easy to learn language, I barely have experience btw, yet writing stuff is simple, also has a powerful standard library, and it’s basically if Python was a good language. And if I was making a golang YSWS, and didn’t write the site in golang, that’d be a missed opportunity. And why the name “Go Ship!”? Google the card game “Go Fish”. Also, was originally going to use a makefile, but on windows it was a pain, so I discovered taskfile instead, which is also written in Go, and it’s way more awesomesauce than makefile imo.
-
Started building the HTML/CSS and stuff, I’m way too used to react and tailwind so this was a bit slow for me, I could’ve used the tailwind play CDN , but, the IDE wouldn’t autosuggest the classes and stuff then, so I just decided to stick to good old plain HTML+CSS+JS, and it wasn’t that bad. And then I also worked on the RSVP functionality. Fillout? LAME. Using hack club identity? Awesomesauce. Sqlite, Identity, boom, you got a good clean minimal RSVP database, and I can also expand it to support logins as well in the future, technically it already does that with cookies, but it probably needs to be more secure and advanced. No SQLi or anything in there, yet, but still. Basically how the auth/rsvp works is the RSVP button links to hack club auth, user authenticates, gets sent back to callback link, Go grabs the params from the callback request, sends tokens and stuff to HCA, HCA sends response back with more tokens, Go verifies the legitimacy with public keys and JWT to make sure the response is legit, if everything matches, fetch user data from userinfo endpoint with the given user token, save info to the DB and create a session, give the cookie to the user (so they can see they’ve already RSVPed on their browser), 5 big booms.
-
Was basically finished at this point, according to commits, added a few waves to the HTML, also wrote a test cause tests are cool when the orange dot turns to green dot instead of red dot in github, messing around with github actions to setup stuff properly from builds to tests, added a .env.example along with a port option (cause 3000 was already taken on my homelab), added responsiveness to mobile, opengraph for cool embeds on slack/discord, github commit id to the footer because it’s cool, not very useful but cool. Finished stuff up with a potential prizes carousel, and a /stats endpoint which just shows the RSVP count and the binary uptime, the /stats is not used anywhere, yet, but still.
-
Getting up hosted on goship.dino.icu was a bit complicated, since I could’ve just hosted it on goship.bnajns.dev, used CF tunnels called it a day but I wanted to make sure it was on dino.icu, which doesn’t really work with cross-account tunnels afaik, so what I did instead was spin up a free azure VM, install FRP on that and my homelab, did configuring, and used that as a proxy instead, and it works fine.
And that’s pretty much it, I also had the idea to use ai.hackclub.com to make a project idea generator since I saw that idea being used in a few other places, so I’ll add that soon, and also guides, I’ll need to write those as well.