Vivek

Why I built a full-stack web framework that is made for the AI agents from the ground up

by

Hey Product Hunt!

I wanted to share a quick story behind WebJs and why I spent the last few months building a new web framework from scratch.

Lately, I’ve been using AI agents a lot to help me code. But I noticed a huge problem: modern web frameworks are massive. If an AI agent gets stuck or needs to understand how a framework works under the hood, it can't just read the source code. It’s buried under thousands of lines of minified code, heavy build steps, and complex compilers.

So I wondered, what if a full-stack framework was small enough for an AI to read end-to-end? What if your framework code inside node_modules was completely uncompiled, browseable, and readable, without needing complex setups like Model Context Protocol (MCP)?

That is why I built WebJs (https://webjs.dev).

It is a full-stack framework designed specifically for the AI era. It has file-based routing, server actions, and streaming SSR, just like Next.js. But under the hood, it is 95% smaller than Next.js (around 10k lines of code).

Here is how it works and why it’s built this way:

  1. Built on Web Standards Instead of inventing a new component system, WebJs uses native Web Components. Since the browser does 95% of the heavy lifting, the framework stays tiny. By default, it uses Light DOM so Tailwind classes work out of the box, but you can toggle Shadow DOM with full SSR using a single flag.

  2. The Next.js DX, but without the bloat If you know Next.js, you already know WebJs. It uses the exact same file-tree layout you are used to (page, layout, route, error, and middleware folders). It also plugs into great existing tools like Prisma, Tailwind, and superjson.

  3. Why do AI agents excel with it? Because there is no build step, TypeScript files are type-stripped on the fly and the typescript code is replaced with whitespaces. When your app crashes, the browser console shows the exact code the AI wrote. AI agents can read the actual JavaScript inside node_modules to understand the framework instantly. Every new project also includes AGENTS.md and CONVENTIONS.md files so tools like Claude Code know exactly how to build within your app without breaking things. There are also good to have guardrails already in place using hooks for Claude Code, Opencode, Gemini CLI, Cursor, Windsurf, and Google Antigravity!

I initially built this for myself because I love staying close to web standards but refuse to give up a good developer experience. It took a lot of work to get hydration working perfectly across both Light DOM and Shadow DOM, but it now has 96% code coverage and over 1,000 tests.

If you want to try it out, you can spin up a project in seconds:

npm i -g @webjskit/cli
webjs create my-app
cd my-app && npm install && npm run dev


I’d love to know what you think. Do you see AI changing the way we choose our tech stacks?

Check out the code here if you're curious: https://github.com/vivek7405/webjs

Looking forward to your feedback and questions!

28 views

Add a comment

Replies

Best
Mukund Ladani

This is awesome, I was able to build a full-stack App with very few commands. The best part is that it built the app architecture according to my conventions. I'm really excited to explore this more!

Vivek

@mukund_ladani Thanks! Good to know you found it helpful.