Skip to content

Repository files navigation

Guren

X (Twitter) GitHub Discussions License: MIT GitHub Sponsors

The fullstack TypeScript framework for the AI-agent era.

Laravel-style conventions, end-to-end type safety, and built-in agent introspection and verification — routing, controllers, ORM, authentication, and Inertia.js + React in one cohesive experience that humans and AI coding agents navigate from the same map.

v2 — Stable. Breaking changes only in major releases, per the release policy.


Quick Start

# 1. Scaffold a new app with authentication (dependencies install automatically)
bunx create-guren-app my-app --auth
cd my-app

# 2. Run migrations and seed the demo user (SQLite by default — no server needed)
bun run db:migrate
bun run db:seed

# 3. Start the dev server
bun run dev

Open http://localhost:3333 and sign in at /login with demo@example.com / secret.

Add features as you go

bunx guren add auth            # Authentication
bunx guren add resource posts --fields "title:string,body:text"  # CRUD resource
bunx guren add queue           # Background jobs
bunx guren add mail            # Email sending
bunx guren add cache           # Cache layer
bunx guren add notifications   # Multi-channel notifications
bunx guren add storage         # File storage
bunx guren add events          # Events & listeners
bunx guren add broadcasting    # Real-time (SSE)
bunx guren add schedule        # Cron scheduling
bunx guren add lint            # oxlint with the Guren rules

Run bun run codegen after adding features to regenerate types. When you are ready to ship, bun run build creates the production build.


What you get

  • Agent-ready by defaultguren context hands an agent the project map with API signatures, guren check and guren audit verify its work mechanically, and every new app ships an agent harness — and before you have an app, the Guren skills are one npx skills add gurenjs/agent-skills (or claude plugin marketplace add gurenjs/agent-skills) away. In a public, blind-scored evaluation, every agent trial shipped a working feature
  • Laravel-style MVC — routes, controllers, and an Eloquent-inspired Model API
  • Inertia.js + React — SPA-like UX without a separate frontend app
  • Drizzle ORM — swap database backends through an adapter (PostgreSQL / MySQL / SQLite)
  • End-to-end type safetybunx guren codegen generates types from schema to frontend props
  • Batteries included — auth, queues, mail, cache, notifications, storage, broadcasting, scheduling
  • Bun-first, deploy anywhere — develop on the Bun toolchain, then self-host on a Bun server or ship to AWS Lambda, Vercel, or Cloudflare Workers with first-party plugins

A taste of the code

Controller

import { Controller } from '@guren/core'
import { z } from 'zod'
import { pages } from '@/.guren/pages.gen'
import { Post } from '../Models/Post'

const PostSchema = z.object({
  title: z.string().min(1),
  body: z.string().min(1),
})

export class PostController extends Controller {
  async index() {
    const posts = await Post.all()
    return this.inertia(pages.posts.Index, { posts })
  }

  async store() {
    const data = await this.validateBody(PostSchema)
    const user = await this.auth.userOrFail()
    await Post.create({ ...data, authorId: user.id })
    return this.redirect('/posts')
  }
}

Routes

import { Router } from '@guren/core'

export function registerWebRoutes(router: Router): void {
  router.get('/posts', [PostController, 'index'])
  router.post('/posts', [PostController, 'store'])
}

Model

import { defineModel } from '@guren/orm'
import { posts } from '@/db/schema'

export class Post extends defineModel(posts) {}

const post = await Post.findOrFail(1)

Documentation


Requirements

  • Bun v1.1+
  • Docker (for the bundled PostgreSQL container)

Contributing

Issues, discussions, and pull requests are welcome. See CONTRIBUTING.md for setup and workflow.

Support Guren

If Guren is useful to you or your team, consider sponsoring development on GitHub Sponsors. Sponsorships fund ongoing maintenance, documentation, and new features.

License

MIT License

About

Guren is a Bun-native TypeScript MVC framework that unites Laravel-like ergonomics with Hono, Inertia.js, React, and Drizzle ORM, aiming to deliver a fast, elegant full-stack workflow that keeps frontend and backend work in sync.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

26 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages