Courses/Grit Web/Introduction to Grit
Course 0 of 9~30 min12 challenges

Introduction to Grit

This course introduces Grit Framework — what it is, why it was created, how it compares to other tools, and what you'll learn in this course series. No coding in this course — just concepts and understanding. By the end, you'll know exactly what Grit gives you and whether it's right for your project.


Welcome to Grit

Welcome! You're about to learn a framework that will change how you build web applications. Whether you're a Go developer looking for a batteries-included solution, a JavaScript developer curious about Go, or a solo founder who needs to ship fast — Grit was built for you.

This is Course 0 — the conceptual foundation. There's no coding here, no terminal commands, no setup. Just ideas. You'll understand what Grit is, why it exists, what problems it solves, how it compares to frameworks you already know, and what you'll build throughout this course series.

Take your time with this course. The concepts here will make every future course click faster. Understanding the "why" behind Grit is just as important as learning the "how".

What is Grit?

Grit is a full-stack meta-framework that combines Go (for the backend) with React (for the frontend). It gives you a complete, production-ready project in one command — with authentication, admin panel, file uploads, background jobs, email, and more already wired up and working.

Meta-framework: A framework that builds on top of other frameworks. Grit combines Gin (Go web framework), GORM (Go ORM), Next.js or TanStack Router (React frameworks), Tailwind CSS, and shadcn/ui into one cohesive system. You don't configure each one separately — Grit does it for you.
Full-stack: Both the backend (server, database, API) and the frontend (the UI users interact with). Some frameworks only handle one side — Grit handles both.

What Grit is NOT:

  • Not a boilerplate — it's a living framework with a CLI that keeps helping you after the initial scaffold. Generate resources, sync types, deploy — all from the same tool.
  • Not a template — it generates real, customizable code you own. Every file is yours to modify, extend, or delete.
  • Not locked in — you can stop using Grit tomorrow and your code still works. It's standard Go, standard React, standard PostgreSQL. No proprietary runtime.
1

Challenge: Boilerplate vs Framework

In your own words, explain the difference between a boilerplate/template and a framework. Why is Grit a framework and not just a starter template? Think about what happens after the initial project is created.

The Problem Grit Solves

Every time you start a new project, you pay what we call the "Setup Tax" — weeks of work building infrastructure before you write a single line of business logic:

TaskTypical Time
Authentication (JWT, password hashing, tokens)2–3 days
Admin panel (data tables, forms, dashboard)3–5 days
File uploads (S3, presigned URLs, image processing)1–2 days
Email (templates, sending, testing)1 day
Background jobs (queue, workers, retry logic)1–2 days
API documentation (OpenAPI spec, interactive UI)1 day
Security (rate limiting, WAF, headers)1 day
Docker setup (PostgreSQL, Redis, MinIO)half day
Deployment (systemd, reverse proxy, TLS)1 day
Type safety between backend and frontendongoing pain

Total: 2–4 weeks before you write a single line of business logic. And this happens every single time you start a new project.

Grit gives you ALL of this in one command, in under 30 seconds. Run grit new myapp and every item in that table is already done — configured, tested, and ready to use.
2

Challenge: Your Setup Tax

Think about the last project you started. How long did you spend on setup and boilerplate before writing actual features? List the things you set up manually. How many of them are in the table above?

The Motivation — Why Grit Was Created

Grit was created by Muke JohnBaptist, a full-stack developer who was tired of rebuilding the same infrastructure for every project. Auth, admin panels, file uploads, background jobs — they should just work. Now they do.

The key insight: most web applications need the same 80% of infrastructure. Only 20% is unique business logic. Grit gives you the 80% so you can focus on the 20% that makes your app special.

Convention over Configuration: One of Grit's core principles. Instead of making you choose and configure every tool, Grit makes sensible decisions for you. File structure, naming conventions, API response format — all decided. But everything is overridable if you disagree.

Think about it: how many times have you debated whether to put your handlers in /controllers or /handlers? Whether to use camelCase or snake_case for API fields? Whether to structure your project by feature or by layer? Grit makes those decisions for you — good decisions, based on years of building production apps — so you can focus on building your product.

3

Challenge: The 80/20 Rule

Name 3 things that are the same in almost every web app (hint: authentication is one). For each, think about how much time you typically spend setting them up from scratch.

What Makes Grit Different

There are plenty of frameworks out there. Here's what sets Grit apart:

1. Choose Your Architecture

No other framework lets you pick between 5 architectures (single, double, triple, API, mobile) from the same CLI. Laravel is always single. Next.js is always single. Rails is always single. Grit adapts to your project.

2. Choose Your Frontend

Next.js for SEO, TanStack Router for speed. Same backend, same components, different routing. Pick what fits your project without changing anything else.

3. Code Generation That Works Both Ways

grit generate creates files. grit remove cleanly deletes them. No leftover code, no broken imports. Most generators only go one direction — Grit goes both.

4. Type Safety Across the Stack

Go types → TypeScript types → Zod schemas. Change a Go model, run grit sync, and your frontend types update automatically. No API contract drift. No runtime surprises.

5. One-Command Deployment

grit deploy builds, uploads, and configures your production server. No CI/CD needed to get started. From localhost to live in one command.

6. Built-in Security

Sentinel WAF, rate limiting, 2FA with TOTP — not plugins, not add-ons. Security by default, not security as an afterthought.

4

Challenge: Framework Comparison

Pick another framework you've used (Laravel, Rails, Next.js, Django, Express). List 3 things Grit does that your framework doesn't include out of the box.

The Tech Stack

Grit is opinionated about its tech stack. Every technology was chosen for a reason — performance, developer experience, community support, or all three. Here's the complete picture:

LayerTechnologyWhy
BackendGo 1.21+Fast, compiled, type-safe
Web FrameworkGinMost popular Go web framework
ORMGORMAuto-migration, relationships, hooks
DatabasePostgreSQL / SQLiteProduction / Desktop
CacheRedisIn-memory speed, pub/sub, queues
Job QueueasynqRedis-backed, reliable, Go-native
File StorageS3-compatibleAWS S3, Cloudflare R2, MinIO
EmailResendModern email API, great DX
AIVercel AI GatewayMulti-provider, streaming
Frontend
RouterNext.js 14+ / TanStack RouterSEO (Next) or SPA speed (TanStack)
UI LibraryReactLargest ecosystem, most talent
StylingTailwind CSS + shadcn/uiUtility-first, copy-paste components
Data FetchingTanStack QueryCaching, refetching, optimistic updates
ValidationZodTypeScript-first schema validation
FormsReact Hook FormPerformant, minimal re-renders
Infrastructure
MonorepoTurborepo + pnpmFast builds, shared packages
SecuritySentinelWAF + rate limiting
ObservabilityPulseTracing + metrics
DB BrowserGORM StudioVisual database management
DesktopWails v2Native desktop apps with Go + React
DeploymentSSH + systemd + CaddySimple, reliable, auto-HTTPS
Go: A programming language created by Google. Known for fast compilation, excellent concurrency, and producing single binary executables. Used by Docker, Kubernetes, and many high-performance systems.
React: A JavaScript library for building user interfaces, created by Meta (Facebook). Uses components and a virtual DOM for efficient UI updates. The most popular frontend library in the world.
Tailwind CSS: A utility-first CSS framework. Instead of writing custom CSS, you apply small utility classes directly in your HTML: "flex items-center gap-4 bg-blue-500 text-white".
shadcn/ui: A collection of beautifully-designed, accessible React components built on Tailwind CSS. Not a component library you install — you copy the source code into your project and own it. This means you can customize every pixel.
5

Challenge: Tech Stack Reasoning

For each layer in the tech stack (backend, ORM, database, frontend, styling, data fetching), explain in one sentence why that technology was chosen. Think about popularity, performance, and developer experience.

Who is Grit For?

Grit was designed for seven types of developers:

1.
Go Developers

Who want a batteries-included framework like Laravel or Rails, but in Go. No more gluing together 15 libraries for every project.

2.
Laravel Developers

Migrating to Go and wanting familiar patterns — single-app mode, artisan-like CLI, convention-driven structure.

3.
Next.js Developers

Who want a proper backend instead of serverless functions. Real database connections, real background jobs, real performance.

4.
MERN Stack Developers

Who want a structured monorepo with type safety instead of loosely connected services.

5.
Solo Developers

Building SaaS products who need to ship fast without cutting corners on quality or security.

6.
Agencies

Building client projects who need consistent, production-ready scaffolding for every engagement.

7.
Students and Beginners

Learning full-stack development with a guided framework that teaches best practices by example.

6

Challenge: Find Your Persona

Which persona fits you best? Write down your background and what you hope to build with Grit. If none of these fit perfectly, describe your own persona — who are you and what do you need?

The 5 Architecture Modes

One of Grit's most powerful features is architecture flexibility. When you run grit new, you choose the architecture that fits your project. You'll learn each in detail in Course 1, but here's a quick overview:

Triple: Web + Admin + API

A monorepo with three apps — a public website, an admin dashboard, and a Go API. Best for SaaS apps, platforms, and anything that needs a separate admin experience.

Double: Web + API

A monorepo with two apps — a public website and a Go API. Best for simpler apps, blogs, and landing pages with a backend.

Single: One Go Binary

One Go binary with the frontend embedded. Like Laravel — everything in one place. Best for microservices and internal tools.

API Only: Go Backend

Just the Go API — no frontend. Best for mobile backends, headless APIs, and services consumed by other apps.

Mobile: API + Expo

Go API plus a React Native app built with Expo. Best for mobile-first products.

There's also grit new-desktop for standalone Wails desktop apps with SQLite. It's a separate command because desktop apps have different requirements than web apps.
7

Challenge: Choose Your Architecture

For each project idea below, which architecture would you choose and why?

  • (a) A blog with an admin panel
  • (b) A mobile fitness app
  • (c) An internal company tool
  • (d) A SaaS with billing and admin
  • (e) A REST API for a mobile game

What Ships With Every Project

Every Grit project comes with 18 features out of the box. You'll learn each one in detail throughout this course series, but here's what you get on day one:

Auth (JWT + 2FA + OAuth)
Admin Panel
Code Generator
File Storage (S3)
Email (Resend)
Background Jobs
Cron Scheduler
AI Integration
Redis Cache
GORM Studio
API Docs (OpenAPI)
Security (Sentinel)
Observability (Pulse)
100 UI Components
Docker Setup
Test Suite
One-Cmd Deployment
Type Sync (Go → TS)
8

Challenge: Your Top 3

Which 3 features are you most excited about? Which ones would save you the most time compared to building them yourself? Write down your top 3 and estimate how many hours each would take to build from scratch.

The Grit Philosophy

Every framework has a philosophy — a set of beliefs that guide every decision. Here are the six principles behind Grit:

1. Convention over Configuration

Sensible defaults for everything. File structure, naming, API format — all decided. But every convention is overridable. You get speed by default and flexibility when you need it.

2. Code Generation over Runtime Magic

You own the code. When Grit generates a file, it's real code you can read, modify, and debug. No hidden runtime behavior, no magic annotations, no black boxes. If something breaks, you can see exactly why.

3. Batteries Included, Optionally Removable

Everything is included by default. Don't need email? Delete the email service file. Don't need AI? Remove the AI handler. Features are modular — removing one doesn't break the others.

4. Beautiful by Default

Every generated UI uses a premium dark theme with 100 pre-built components. Your app looks polished from minute one — not like a default Bootstrap template.

5. Monorepo Native

Shared types between Go and TypeScript. Change a model on the backend, run grit sync, and your frontend types update. One repo, one source of truth.

6. Vibe Coding Ready

Grit generates an AI skill file that teaches AI assistants (like Claude, Cursor, or Copilot) your project's structure, conventions, and patterns. Your AI pair programmer understands your project from day one.

9

Challenge: Philosophy Reflection

Which philosophy resonates most with you? Have you been burned by "runtime magic" or"configuration hell" before? Share a specific experience where one of these principles would have saved you time or frustration.

Comparison with Other Frameworks

How does Grit stack up against the most popular frameworks? Here's an honest comparison:

FeatureGritLaravelRailsNext.jsT3 StackDjango
Go PerformanceYesNoNoNoNoNo
React FrontendYesNoNoYesYesNo
Admin PanelYesNova ($)YesNoNoYes
Code GeneratorYesYesYesNoNoNo
Built-in 2FAYesNoNoNoNoNo
One-Cmd DeployYesForge ($)NoVercelNoNo
Type-Safe APIYesNoNoYesYesNo
Grit is not "better" than these frameworks. They each have strengths. Laravel has the largest ecosystem. Rails has the most mature conventions. Next.js has the best React SSR. Django has the best admin. Grit fills a specific gap: the Go + React full-stack framework that doesn't exist elsewhere.
10

Challenge: Closest Competitor

Look at the comparison table. Which framework is closest to Grit? What does Grit offer that it doesn't? And what does that framework offer that Grit doesn't?

What You'll Learn in This Course Series

This course series has 9 courses that take you from zero to deploying a production-ready application. Here's the roadmap:

0.
Introduction to Grit

What Grit is, why it exists, and what you will learn (this course)

1.
Your First Grit App

Install Grit, scaffold a project, explore the folder structure, run dev servers

2.
Code Generator Mastery

Generate full-stack CRUD resources with one command

3.
Authentication & Authorization

JWT, 2FA with TOTP, OAuth providers, role-based access

4.
Admin Panel Customization

DataTable, FormBuilder, dashboard widgets, custom styles

5.
File Storage & Uploads

S3-compatible storage, presigned URLs, image processing, MinIO

6.
Background Jobs & Email

asynq job queue, cron scheduling, Resend email integration

7.
AI-Powered Features

Vercel AI Gateway, streaming responses, multi-provider support

8.
Deploy to Production

grit deploy, systemd, Caddy reverse proxy, Docker, auto-HTTPS

By the end of this series, you'll be able to build and deploy a production-ready full-stack application with Go and React — including authentication, admin panel, file uploads, background jobs, AI features, and automated deployment.

11

Challenge: Your Project Idea

Write down one project idea you want to build with Grit. What architecture would you use (triple, double, single, API, or mobile)? What resources would you need to generate (e.g., users, products, orders)? Which of the 18 built-in features would your project need?

Summary

Here's everything you learned in this course:

  • Grit is a full-stack meta-framework combining Go (backend) with React (frontend)
  • It solves the "Setup Tax" — giving you 2-4 weeks of infrastructure in 30 seconds
  • Grit was created to let developers focus on the 20% that makes their app unique
  • It offers 5 architecture modes: triple, double, single, API, and mobile
  • You can choose between Next.js and TanStack Router for the frontend
  • Every project ships with 18 production-ready features out of the box
  • The philosophy centers on convention over configuration and code you own
  • Type safety flows from Go to TypeScript to Zod with grit sync
  • Grit fills the gap of a Go + React full-stack framework
  • The course series covers 9 courses from introduction to production deployment
12

Challenge: Prepare for Course 1

Before starting Course 1, prepare your development environment. Visit these links and bookmark them:

Star the GitHub repo, subscribe to YouTube, follow on LinkedIn. You're ready to start building.