amoxtli

playground

The in-browser environment for lessons and challenges, built on a fork of almostnode.

Stack
  • almostnode
  • vite
  • monaco
  • birpc

Before I tell you about the latest changes, I'll let you in on something I built before: it was based on TutorialKit and it mostly worked, but I decided to move on to a truly Vue-ecosystem-based solution for the whole platform.

Even after I moved to Nuxt Content, and given the fact I forked learn.nuxt.com, the first interactive portion of the book was the playground, which initially was based on web containers but then I came across almostnode and decided to migrate to it.

Some of the nitty, not all of the gritty

I had to fork almostnode and modify it to make it work, but one day it finally did. The main idea is to have a very similar environment that you would have in your own computer with Node running Vite and serving your development environment.

I'm not gonna lie, I used AI heavily for this. But given the results and the many audits that I've made to it, I think it is working as best as I could make it so I'm running with that.

The way I understood web containers work is you need some kind of permission or license if you wanted to use their technology on for profit work, so I didn't want to get into that before being able to share it and charge for it. This is basically my main reason for moving to almostnode.

And not less importantly, I did want to try AI and see how far I could take it for something that I would not otherwise feel comfortable doing on my own and that would definitely had taken much longer. So that's partly the reason why I migrated as well.

What the fork is mostly doing is serving Vue SFCs on real Vite 7, and it supports hot module replacement (HMR), an interactive shell, and the console without the host's page noise (the Nuxt app). It also has a web containers compatible API, to avoid re-wiring the Nuxt content App itself.

This shares a couple features from yehyecoa: the version control system and the drag and drop to re-organize the layout.