I started work on this blog last week.with grand dreams of blogtastic fame through the almighty SEO and my stalky dear friend google.I initially though that this would not be much more work than getting a svelte / react project of the ground,it wasn’t.

in all honesty it is not too complex but I simply started off the wrong foot.

mainly it was that i had never written a single line of go in my life

I started off by doing a couple of simple go experiments like cumulative sum and simple functions before completely jumping in at the deep end. initially I though about using a NoSQL db like I have always done, I have so far mainly used MongoDB and firebase.recently I made a small todo project using Pocketbase and fell in love with it.Initially I started off with a local sqlite3 db and that worked fine… while I was hosting everything locally.

which I decided soon I didn’t really want to figure out how to do properly right now.I initially wanted to use some sort of cdn but since this would have a database and be a bit dynamic it would be a lot more hassle to get working then I was willing to go through with.

this may sound lazy, but to me I would rather do it decently and get it of the ground and learn and improve later, than get nothing of the ground or have it take so long that I lose interest.

so I then decided to give railway a try, since I liked the ui and I saw some go guy using it. I honestly like it a lot so far.Initially I hit a bit of a roadblock though since when hosting it remotely the db would always reset to the state of the db at the GitHub repo when redeploying.

since sqlite3 had worked fine and I was head over heels for pocketbase I decided I would look into something sql related.I then went on a quest for a sql db hosting service.

  • SupaBase, but it felt a bit clunky and verbose to get off the ground.
  • PlanetScale, looked nice and probably very performant but also… costly so no.
  • Cloudflare sql. ui looked ugly and honestly a lot more than needed for a basic blog.
  • appwrite. honestly there was so much different functionality and I wasn’t in the mood to find what I needed.
  • neon. I… love… it, very easy to set up, nice guide, nice ui.

so if it wasn’t clear I used neon.neon was almost just a drop in replacement for sqlite, but I unfortunately decided to delete all the sqlite3 code I had and rewrite it for neon before realising that.

for a moment I wanted the site to be a ssg page since I though it would yield better SEO results but after trying and failing and researching I figured out that SEO wise it wouldn’t make to much of a difference.

after researching that I found a way to generate inline css and js scripts in the go server and render it to the html before sending it so basically server side rendering it and doing the same for the independent blogs, so SEO should not be an issue.

posting to the blog has a very simple interface which posts with htmx, if I wanted a wee bit more performance I could just write a small script to post but htmx is just so neat and nice. it has a double password protected guard made with just secrets kept on railway so safe but not too much of a hassle.

now the main point, the page now get 100 on all fronts on google lighthouse and almost no warnings.I would say I learnt a lot about how rendering works just through obsessing about SEO works.so I would recommend trying this sort of obsession out.

I could drone on a bit more, but all in all after doing this once I don’t think making another project with gin and go will be too hard.I will defiantly do so again.

after finishing this project I have a couple of things I want to research.

  • hosting a remote Pocketbase server.
  • making a project with gin/go and svelte working together. (I love svelte)
  • live chat app with go/gin.
  • more dynamic apps with good SEO

this is a bit of a rant but what do you expect I am a programmer.