October 12

Why KeyPress?

Out of my super busy schedule, I still couldn't helped myself to push new project! 😂
Let me introduce, KeyPress - A keyboard-first blogging platform.

Keypress's banner


I had the idea of making multi-tenant platform, similar to Vercel's Platform Kit, but using Nuxt 3 as the server-side framework instead of NextJs.

The main challenges I faced is that Nuxt doesn't provide a response rewrite from the middleware, much like Next's NextResponse.rewrite(url) . So, I've came up with a simple and easily understood solution to this!



  1. I created a server middleware, that will read the current hostname and inject a subdomain to event.context from the server side.

    Check out server/middleware/subdomain.ts

Now that we have ssrContext.event.context with subdomain info, we just need to re-wire the vue-router so that when the user land on https://subdomain.keypress.blog , we would want to render different page from the main website.

  1. Thankfully, Nuxt 3 expose the router config in app/router.options.ts , and we are going to map the path based on user/[siteId] when the request is from the subdomain.

    Check out app/router.options.ts

Why KeyPress?

At first, this was going to be a simple demo for multi-tetant once I successfully configure the options above, but then it dawn on me that almost all blogging platform has bad support for keyboard especially when you are writing.

We all love to write in Notion, but the editor still requires some mouse interaction if we want to rearrange blocks, can't press `Tab` to focus properly etc.

So, I took this opportunity to create a whole blogging platform that gives keyboard user the first class experience (I hope so, but still have long way to go) of writing blogs.

I really hope you enjoy exploring KeyPress, and not break your `Tab` key at the same time 😂