"Storage as a service, network as a service, CPU as a service, your mom as a service..."
— nexovec, 2024
This is the third iteration of my quest for the holy grail - building a CRUD web app.
Previously, I have considered metaframeworks: Next.js, SvelteKit, and Astro. Before that, MERN with vanilla Js.
The stack here splits an app into frontend (Vite + React) and backend (Hono + Drizzle + bun:sqlite). Authentication is session cookie-based user-password storage (hashing) and verification. Communication via the Fetch API (REST API).
This code is the frontend part. See the accompanied backend.
bun install
bun run devIf this breaks, start with bun create hono my-app and recreate the structure.
Notice that I did not place .env inside .gitignore.
-
No emails, no password resets.
-
Only a single active user session is allowed.
-
Only
bun run dev.
Pros (BE + FE):
-
The Fetch API instead of obscure rushed components du jour.
-
Much easier to understand and debug.
-
More help from ChatGPT or DeepSeek.
Cons (BE + FE):
-
Two separate projects (deployment, runtimes, build systems, state, routing, .env...). Enforcing a single repo is reinventing a metaframework.
-
It must be an SPA. An MPA with SSR/SSG React and hydration is, again, reinventing a metaframework.
-
If we remove React, we’re back to static templating and raw strings. At the very least, React provides JSX, useState, and useEffect.