Blitz is a batteries-included framework that's inspired by Ruby on Rails, is built on Next.js, and features a "Zero-API" data layer abstraction that eliminates the need for REST/GraphQL.
// app/projects/mutations/createProject.ts
import { resolver } from "blitz"
import db from "db"
import * as z from "zod"
// This provides runtime validation + type safety
export const CreateProject = z
.object({
name: z.string(),
})
// resolver.pipe is a functional pipe
export default resolver.pipe(
// Validate the input data
resolver.zod(CreateProject),
// Ensure user is logged in
resolver.authorize(),
// Perform business logic
async (input) => {
const project = await db.project.create({ data: input })
return project
}
)
āZero-APIā data layer lets you import server code directly into your components instead of having to manually add API endpoints and do client-side fetching and caching.
New Blitz apps come with all the boring stuff already set up for you! Like ESLint, Prettier, Jest, user sign up, log in, and password reset.
Provides helpful defaults and conventions for things like routing, file structure, and authentication while also being extremely flexible.
Our community is warm, safe, diverse, inclusive, and fun! LGBTQ+, women, and minorities are especially welcome.
Please read our Code of Conduct.
We are all in this together, from the youngest to the oldest. We are all more similar than we are different. We love to work together.
We invite you to help make Blitz the best framework we've ever had!
Built-in authentication is super easy and very secure. Works with any identity provider, including self-hosted username and password and third-parties like Auth0.
You can use any database you want. Prisma 2 is the default database client, but you can remove that and use anything else like Fauna or DynamoDB.
One command to install code and/or packages into your blitz app. Examples: `blitz install tailwind` or `blitz install chakra-ui`. Recipes can be created by anyone.
Blitz is set up for server intensive tasks like sending emails, cron jobs, background processing, generating PDFs, etc. Currently we have minimal backend guides, but are working on developing more patterns and adding more docs.
Blitz is built with Typescript and the Blitz data layer is fully end-to-end typesafe. All types are completely static without needing a separate type generation process!
Itās early days, but Blitz code scaffolding is going to be extremely powerful. Great for both prototyping and for building real apps. Will be able to override any template and customize for your project.
Your financial contributions help ensure Blitz continues to be developed and
maintained! We have monthly sponsorship options starting at $5/month.