New Website Launch

Finally, a website to post my ramblings...

MartinTheDragonMeta

Years after the domain registration, ntmr.dev is now finally the remake's cozy home and news portal!

The reason for the delay is that around the same time I started working on Project Sorcerer, something that's still in focus of course, but a couple of things have demanded my attention elsewhere, so development on Project Sorcerer became sluggish and at some point came to a complete stop around summer last year.

Now that I have more time to devote to programming again, I decided to take a step back and work on the remake's overdue website. To finally have a news outlet without expecting people to join the Discord server to be informed of current developments.

Speaking of chat platforms, earlier this month I also reopened the self-hosted independent Matrix chat server on the ntmr.dev domain. More info here in another post.


For those interested, below are a few more technical details and some ramblings on the website's inner workings:

Self-hosted

For security reasons, the https://www.ntmr.dev domain is self-hosted like all the other subdomains. This is because a few cookies, for example from https://auth.ntmr.dev, are domain-wide and the www subdomain would otherwise leak them. Initially, the TODO page was hosted on GitHub Pages and then on Codeberg Pages, which are great options if you don't have a domain-wide auth server.

Developed with Kobweb

Developed with the Kobweb framework, the website is just as much Kotlin-powered as the remake itself. Kotlin has been my favorite programming language for many years, and with the Kotlin/JS target and full JavaScript interoperability, frameworks for web development aren't out of the language's reach.

The search for a suitable framework

Orchid

Years ago I was already building a small website for my projects using Orchid. It didn't feature full-stack web development but was rather specializing in static generated documentation websites written in Markdown with Pebble templating support. Unfortunately though, Orchid seems to have been abandoned at some point, despite having been off to a very powerful start.

React

I was also looking at using React with Kotlin/JS, since there were Kotlin bindings/wrappers for it. The big flaw with React though is that it only creates single-page apps that work with client routing and change the page you're looking at locally using JavaScript, so running a React page on a static server host requires a few hacks with custom 404 pages to get everything working. This still doesn't solve the problem of static servers like Codeberg Pages (I was using GitHub Pages back then) returning 404 HTTP status codes, and only then redirecting to the single-page app. Search engines really don't like that and immediately stop crawling a link after receiving a 404 status code. And since your page rank on search engines relies on the amount of links other websites have to your websites and web crawlers following those, your website's page ranking is predestined to be bad with a React app on a static server.

Next.js

There are also a few other more minor reasons not to use React, but either way, there exists a popular framework built on top of React called Next.js, which solves everything missing with React and also supports static page generation of React apps, getting rid of the issues search engines have with the 404 status page hack mentioned earlier while still providing the speed of client-routed web apps. So for a while, I was trying to use Kotlin/JS with Next.js. Though, right off the bat I ran into the issue of no Next.js wrappers/bindings existing for Kotlin/JS, meaning I'd have to set all of that up myself. After a couple attempts, I scratched that idea for being too much work when all I wanted was to build a website to write about and document my projects. And with only server-based Kotlin solutions remaining (I was looking for static page generation), I was running out of options and starting to become afraid I'd have to use plain old JavaScript (or at least TypeScript) after all.

Kobweb!

Luckily, waiting a bit longer and re-researching my options ultimately paid off, as Kobweb then came into existence! Kobweb has absolutely everything I need and is perfectly suited for my use case. Being natively written in Kotlin and based on Compose Multiplatform (a very nice framework for building multiplatform desktop, mobile and web apps, by the way!), there's a lot of power behind it. And with out-of-the-box Markdown support and static page generation, there's nothing more I could have wished for.

To be completely honest though, by now it wouldn't have mattered anymore whether I was using a static page generator or a backend server solution. My search and experimentation began before I had actual servers at my disposal, thus when I was reliant on static page hosting. Nowadays, I could've just gone with something like Ktor directly. Still, I'm happy about Kobweb, it is very comfy to work with in general. Beyond that, Kobweb can also be used for full-stack web development with a dynamic server, which will come into play in another project on the horizon.

The beginning

This story's conclusion marks the beginning of the Nuclear Tech Mod Remake website, which has long felt like a milestone to get out. So thanks for reading and stay tuned for more news posts and ramblings I'll be publishing here!
~Martin