Lokasi ngalangkungan proxy:   
[Ngawartoskeun bug]   [Panyetelan cookie]                
Go
Postgres
Redis
Docker
Next.js
TanStack

Build full-stack apps
with the backend you trust

Scaffold a Go API + React frontend + admin panel in one command. Auth, OAuth, file storage, jobs, AI, observability, OWASP-2025 hardened — meticulously optimized for production. No boilerplate required.

Install or update — macOS / Linux
$curl -fsSL https://gritframework.dev/install.sh | sh
Install or update — Windows (PowerShell)
$iwr -useb https://gritframework.dev/install.ps1 | iex

Detects an existing install and runs grit update; otherwise pulls the right binary for your OS/arch. Prefer Go? go install github.com/MUKE-coder/grit/v3/cmd/grit@latest

internal/handlers/product.go
frontend/src/hooks/use-products.tstsx
package handlers
import (
"net/http"
"github.com/gin-gonic/gin"
"myapp/internal/authz"
)
func (h *ProductHandler) List(c *gin.Context) {
var products []models.Product
h.DB.
Where("user_id = ?", c.GetString("user_id")).
Find(&products)
c.JSON(http.StatusOK, gin.H{
"data": products,
})
}
import { useQuery } from '@tanstack/react-query'
import { api } from '@/lib/api'
export function useProducts() {
return useQuery({
queryKey: ['products'],
queryFn: async () => {
const res = await api
.get('/api/products')
return res.data.data
},
})
}
Both files generated by grit generate resource Product
Features

Elevate your stack
with the modern Go monolith

Grit ships with production-ready features that accelerate development and make building full-stack apps in Go a breeze.

GritGRIT BY NUMBERS
5
ARCHITECTURE MODES
100+
UI COMPONENTS
v3.23
LATEST RELEASE
60-second tour

What is Grit?

A full-stack meta-framework that turns one CLI command into a working Go API, React frontend, and admin panel — with everything you usually wire up by hand already wired up.

STEP / 01

Scaffold a real project

Pick your architecture (single binary, monorepo, mobile, desktop) and one command scaffolds the entire repo — Go API, React frontend, admin panel, Docker, CI, all wired together.

$grit new my-app --triple
STEP / 02

Generate full-stack features

Describe a resource (Product · Order · Invoice). Grit emits the Go model, service, handler, routes, Zod schema, React hooks, and admin page — typed end-to-end, no glue code.

$grit generate resource Product
STEP / 03

Ship to a real server

grit deploy cross-compiles, uploads, sets up systemd, and configures Caddy with auto-TLS. Or push to git and let your platform of choice run the bundled Dockerfile.

$grit deploy --domain acme.app

What you get out of the box

  • No glue code between backend and frontend — generated together, always in sync
  • Production batteries: auth + 2FA, OAuth, storage, jobs, AI, observability
  • Secure-by-default headers; OWASP Top 10:2025 hardened out of the box
Read quick start
Grit's Superpower

One framework.
Three platforms.

The same Go API and the same generated code ship as a web app, a desktop binary, and a mobile app. Pick one. Or ship all three from the same repo.

Web

Next.js · Vite · TanStack

--single / --triple

Desktop

Wails · Frameless · GORM

--desktop

Mobile

Expo · React Native

--mobile

Web — built via grit new --triple --vite

acme.app
Acme · Dashboard
Search…

REVENUE

$84.2K

+12%

USERS

1,284

+8%

CONVERSION

3.2%

+0.4

NPS

72

+5

Revenue · 30 days

Activity

MMaya
CCarlos
IInez

Desktop — grit new-desktop

Acme — Desktop
Acme
Dashboard
Customers
Sales
Reports
Settings

Dashboard

offline · synced

Revenue

$84.2K

Users

1,284

NPS

72

Last 12 days · trending +18%

Mobile — --mobile

9:41
●●●●5G

Good morning

Acme — Sales

Revenue

$84.2K

New users

1,284

Activity

Maya signed in
Invoice #1284 paid
New review (4.8★)

Same Go backend. Same generated React. Same auth.

Pick the targets you need — the API doesn't change.

Compare modes
The Grit Core

One CLI — eight production
primitives wired together

Grit is the chip on the board. Auth, jobs, storage, AI, observability, webhooks, realtime, and cache all light up the moment you scaffold, so you spend your time on product not plumbing.

GRIT
v3.23 · production-ready
GRIT-FW-A1
Auth

JWT · OAuth · 2FA

AI Gateway

100+ models · stream

File Storage

S3 · R2 · MinIO

Background Jobs

asynq · retries

Webhooks

Stripe · HMAC · replay

Realtime Hub

WebSockets · channels

Redis Cache

middleware · TTL

Transactional Mail

Resend · templates

One Project · Every Primitive

Ship anything. Wire everything.

From git push to a running app with auth, storage, jobs, realtime, and AI all on the same wire — no glue code, no dashboard tabs to hunt through.

Git push deploys
Docker images
Resource generator
Compose stacks
Grit
Grit Framework
Your Project
LIVEv3.23
Auth + RBAC
File storage
Domains + SSL
Realtime hub
AI Gateway
Pulse observability
CLI deploy

A framework for
developers and agents

Grit has opinions on everything: routing, queues, auth, storage, AI. That's thousands of decisions an AI agent doesn't have to make. The result? Clean Go code that anyone — human or assistant — can extend.

  • Generates Go + React from one CLI command
  • Ships an SKILL.md so agents know the patterns
  • AI Gateway: 100+ models via one API key
  • OWASP 2025 hardened — secure by default
Explore the framework
func (h *AuthHandler) Login(c *gin.Context) {
var req loginRequest
c.ShouldBindJSON(&req)
var user models.User
h.DB.Where("email = ?", req.Email).
First(&user)
if !user.CheckPassword(req.Password) {
c.JSON(401, gin.H{
"error": "Invalid credentials",
})
return
}
tokens, _ := h.AuthService.
GenerateTokenPair(user.ID, user.Email, user.Role)
c.JSON(200, gin.H{
"data": gin.H{"user": user, "tokens": tokens},
})
}

Monitor and fix issues with Pulse

Pulse gives full observability — find errors and performance issues before your team does. Mounted at /pulse/ui on every Grit project.

  • Fix errors and performance with recommended solutions
  • Trace requests, jobs, DB queries, cache hits, errors
  • Wire k6 test runs into the live latency timeline
Explore Pulse
Requests
+14% vs yesterday
124.2Krequests
2xx 122.5K
4xx 1,151
5xx 324
02 Nov 18:00 UTC03 Nov 18:00 UTC
Duration
125ms — 2.2s

The best partner to any front-end

Easily craft frontend experiences with React, TanStack Router, Vue, or Svelte alongside the Grit API. Or accelerate development with a generated Next.js admin panel.

Explore front-ends
users.svelte
users.tsx
users.vue
users.next.tsx

5 architectures, one CLI

Pick the scaffold that fits — embed your SPA in the binary, or split web / admin / API into a monorepo. Same generators across all of them.

More than just Go

Grit works with Gin, GORM, asynq, Resend, Sentinel, Pulse, and a curated stack designed to play together — so you always have what your team adores.

Go
Gin
GORM
PG
Redis
R2
JWT
Resend
AI

Flexible frontend

Ship a Next.js SaaS or a Vite + TanStack Router SPA. Generated hooks + types match either, so swapping the frontend never rewrites your API.

users.tsx
use-users.ts
products.tsx

Form Builder

Grit streamlines form management with simple submissions, intuitive slots and props, and fully typed event handlers for a seamless experience.

Validation
File Uploads
Error Handling
16+ Field Types

Production-grade by default

Enjoy out-of-the-box security headers, percentile latency tracking, and a Lighthouse-ready frontend the moment you run grit new.

100
SECURITY
OWASP 2025
98
PERFORMANCE
Pulse SLO
100
OBSERVABILITY
p50/p95/p99

Background jobs

Redis-backed asynq queue. Image processing, email sending, scheduled cleanup — wired in.

Realtime hub

WebSocket fan-out at /api/ws. SendToUser and Broadcast helpers; useRealtimeEvent hook on the client.

Idempotency-Key

Auto-attached on unsafe methods. Replay the original 2xx response for 24h — safe retries everywhere.

CSV / Excel export

Every generated resource ships /export?format=xlsx. Streaming CSV, chunked XLSX, constant memory.

PDF generation

internal/pdf with a worked Invoice template — typeset, branded, ready to email or download.

Feature flags

In-memory engine, sticky bucketing, percentage rollouts, allow/blocklists, realtime admin push.

Offline-first sync

Local SQLite mirror + outbox with squash semantics. Click Sync, resolve field-level conflicts, push.

Last synced12s ago

Tamper-evident audit log

Every mutation is appended to a SHA-256 hash chain. Verify integrity from the admin in one click.

a3f1...c92POST /api/invoices
b9d2...44ePUT /api/users/42
c1e7...8afDELETE /api/blogs/9
integrity verified

Cursor pagination

Sticky-page pagination on every generated list endpoint. No skipped rows when data shifts mid-scroll.

#1284Invoice — Acme Inc
Paid
#1283Invoice — Globex
Pending
#1282Invoice — Initech
Overdue
has_more · cursor: eyJ0ID...

Everything Included

Batteries-included framework

Every Grit project ships with production-ready features out of the box.

Authentication + 2FA

JWT, OAuth2, TOTP, backup codes, trusted devices

Terminal
POST /api/auth/register → JWT tokens
POST /api/auth/login → JWT tokens (or totp_required + pending_token)
POST /api/auth/totp/verify → Exchange TOTP code for JWT
GET /api/auth/me → Current user (protected)
GET /api/auth/oauth/:provider → Google, GitHub social login

Admin Panel

DataTable, FormBuilder, dashboard widgets, resource definitions.

  • - Sort, filter, paginate, search
  • - 16+ form field types
  • - Multi-step form wizards
  • - 4 style variants

AI Gateway

One API key, hundreds of models via Vercel AI Gateway.

anthropic/claude-sonnet-4-6

File Storage

Presigned URL uploads to S3, R2, or MinIO. Image processing. Progress tracking.

Full-Stack Code Generation

One command generates Go + React + admin in seconds

Terminal
$ grit generate resource Product --fields "name:string,price:float,stock:int"
✓ internal/models/product.go
✓ internal/services/product.go
✓ internal/handlers/product.go
✓ apps/admin/src/routes/_dashboard/resources/products.tsx
✓ Injected model, handler, routes, resource registry
✅ Resource Product generated successfully!

Flexible Architecture

Choose how you build

Coming from Laravel? Choose Single. MERN stack? Choose Double. Building a SaaS? Choose Triple.

Single

Go + embedded SPA

--single

Double

Web + API monorepo

--double

Triple

Web + Admin + API

--triple

API Only

Go backend only

--api

Mobile

API + Expo

--mobile

One-Command Deploy

From code to production
in one command

grit deploy builds your app, uploads via SSH, configures systemd, and sets up Caddy with auto-TLS.

  • 01Cross-compiles Go binary for Linux (CGO_ENABLED=0)
  • 02Builds frontend if present (pnpm build)
  • 03Uploads binary via SCP
  • 04Creates systemd service with auto-restart
  • 05Configures Caddy reverse proxy with Let's Encrypt TLS
Deploy guide
Terminal
$ grit deploy --host deploy@server.com --domain myapp.com
→ Building frontend...
→ Building Go binary (linux/amd64)...
→ Uploading binary to /opt/myapp/
→ Setting up systemd service...
→ Configuring Caddy reverse proxy...
✓ Deployment successful!
Live at: https://myapp.com

What Ships With Every Project

Production-ready from day one

JWT Authentication

Register, login, refresh, OAuth2 social login (Google, GitHub). Role-based access control.

Two-Factor Auth

TOTP authenticator app, 10 backup codes, trusted devices with 30-day sliding cookie.

File Storage

Presigned URL uploads to S3, R2, or MinIO. Image processing. Progress tracking.

Email (Resend)

Transactional emails with Go HTML templates. Dev uses Mailhog.

Background Jobs

Redis-backed job queue via asynq. Image processing, email sending.

Redis Cache

Cache middleware for any route. Set/Get/Delete. Configurable TTL.

New in v3.23

OWASP 2025 hardened

Reliability, auditability, and security — usually a year of integration work — wired into every scaffolded project.

Offline-first desktop sync

Git-style: work locally → click Sync → resolve conflicts → push

Local SQLite mirror + outbox with squash semantics. Manual Sync button. Field-level conflict dialog when the server moved on. Versioned writes with optimistic-lock. Read the guide →

grit new app --triple --vite --desktop

Tamper-evident audit log

Every authenticated mutation auto-logged. SHA-256 hash chain proves the log wasn't edited via SQL.

GET /admin/activity/integrity

SSRF + IDOR closed

safefetch.Get blocks private/IMDS IPs with DNS-rebind defence. authz.MustOwn returns 404 to prevent enumeration.

OWASP A01 closed

Feature flags + A/B

In-memory engine, sticky bucketing, percentage rollouts, allow/blocklists, realtime push when admin toggles.

flags.IsEnabled(c, "new_ui")

Webhook receiver + k6 load test suite + security CI

The "every business app needs this" primitives, baked in

  • Stripe / GitHub / HMAC verifiers with auto-dedup on (provider, external_id)
  • k6 test suite — smoke / load / stress / spike / soak / breakpoint
  • Dependabot + govulncheck + CodeQL CI on every PR
  • CSRF middleware double-submit cookie for OAuth flows
  • Security event log with typed events + hash chain
  • CSP / COOP / CORP headers strict by default

Framework Comparison

How Grit compares

FeatureGritNext.jsLaravel
Go Backend
React Frontend
Admin Panel
Code Generator
JWT + OAuth2
Two-Factor Auth
File Storage
Background Jobs
AI Integration
One-Command Deploy
Multiple Architectures
Desktop App
Offline-First Sync
Audit Log + Hash Chain
Feature Flags
OWASP 2025 Hardened

Trusted by builders
all over the world

sentinel

“Grit's code generator and Sentinel integration meant we shipped a secure WAF + audit dashboard the same week we started the project.”

AC
Alex Chen
Founder, Skywatcher

“Grit is our sourdough starter and multitool for full-stack projects large and small. The single-app mode in particular is fresh and useful.”

IC
Ian Callahan
Harvard Art Museums

“Grit takes the pain out of building modern, scalable Go web apps. The tabbed code generator is a love-letter to senior devs.”

AF
Aaron Francis
Co-founder, Try Hard Studios

“Grit's elegance, performance, and developer experience are unmatched for Go. The generated code is clean enough to teach from.”

CP
Chandresh Patel
CEO, Bacancy
pulse

“The Grit ecosystem has been integral to the success of our product. The framework lets us move fast and ship regularly without dropping a single SLO.”

JE
Jack Ellis
Founder, Fathom Analytics

“Grit is a breath of fresh air in the Go ecosystem, with a brilliant community around it. Generators that actually feel like Rails.”

EH
Erika Heidi
Creator, Minicli

“The framework, the ecosystem, and the community — it's the perfect package for shipping production Go apps.”

ZK
Zuzana Kunckova
Founder, GoBuilders
Muke JohnBaptist
“I built Grit because I was tired of spending weeks setting up the same boilerplate for every project. Auth, admin panels, file uploads, background jobs — they should just work. Now they do. One command, and you have a production-ready app. That's the framework I wanted to use.”
Muke JohnBaptist
Creator of Grit Framework

FAQ

Frequently asked questions

Do I need to know Go to use Grit?

Basic Go knowledge helps, but Grit generates most of the code for you. The generated code follows clear patterns (handler → service → model) that are easy to extend. If you know any backend language, you'll pick it up fast.

Can I use Grit with an existing project?

Grit is designed for greenfield projects. It scaffolds the full project structure. However, you can use grit generate resource in existing Grit projects to add new features incrementally.

Is Grit production-ready?

Yes. Every scaffolded project includes JWT auth, RBAC, rate limiting (Sentinel), observability (Pulse), error handling, CORS, gzip compression, connection pooling, and graceful shutdown. It's designed for production from day one.

What's the difference between Single and Triple architecture?

Single embeds the React SPA into the Go binary via go:embed — one file to deploy. Triple is a Turborepo monorepo with separate web app, admin panel, and API — ideal for teams and complex products.

Can I switch from Next.js to TanStack Router later?

The backend (Go API) is identical regardless of frontend choice. You'd need to rebuild the frontend pages, but all hooks, types, and API patterns are the same. The admin panel components are also framework-agnostic React.

How does grit deploy work? Is it like Vercel?

grit deploy is for self-hosted deployments. It SSHs to your server, uploads the binary, configures systemd, and sets up Caddy with auto-TLS. For Vercel/Railway, just push to git — the Dockerfile is included.

Is Grit open source?

Yes, Grit is fully open source under the MIT license. The CLI, all plugins, and the documentation are on GitHub.

Start using Grit today

Install the CLI and scaffold your first project. Or dive into the docs to plan your architecture first.

go install github.com/MUKE-coder/grit/v3/cmd/grit@latest
grit new my-app