What is Wasp?
Wasp (Web Application Specification) is a Rails-like framework for React, Node.js, and Prisma. Build your app in a day and deploy it with a single CLI command!
Why is Wasp awesome
- 🚀 Quick start: Due to its expressiveness, you can create and deploy a production-ready web app from scratch with very few lines of concise, consistent, declarative code.
- 😌 No boilerplate: By abstracting away complex full-stack features, there is less boilerplate code. That means less code to maintain and understand! It also means easier upgrades.
- 🔓 No lock-in: You can deploy the Wasp app anywhere you like. There is no lock-in into specific providers; you have complete control over the code (and can actually check it out in
.wasp/directory if you are interested ). - 🤖 Perfect for AI by design: Thanks to its high-level spec of the whole app, opinionated approach, built-in full-stack features, and tight integration of all parts of the stack, Wasp gives AI (agents) clear guardrails and structure, less boilerplate to manage, and better context management.
Features
- 🔒 Full-stack Auth
- 🖇️ RPC (Client <-> Server)
- 🚀 Simple Deployment
- ⚙ ️Jobs
- ✉️ Email Sending
- 🛟 Full-stack Type Safety
- ...
Code example
Simple Wasp spec file in which you describe the high-level details of your web app:
// file: main.wasp.ts
import { app, page, query, route } from "@wasp/spec";
import { MainPage } from "./src/MainPage" with { type: "ref" }; // Your React code.
import { DashboardPage } from "./src/dashboard/DashboardPage" with { type: "ref" };
import { getTasks } from "./src/queries" with { type: "ref" }; // Your Node.js code.
export default app({
name: "todoApp",
wasp: { version: "^0.24.0" },
title: "ToDo App",
head: ["<link rel='icon' href='/favicon.ico' />"],
auth: {
// Full-stack auth out-of-the-box.
userEntity: "User",
methods: {
email: {
// ...
},
google: {
// ...
},
},
onAuthFailedRedirectTo: "/login",
},
spec: [
route("RootRoute", "/", page(MainPage)),
route(
"DashboardRoute",
"/dashboard",
page(DashboardPage, {
authRequired: true, // Limit access to logged-in users.
}),
),
query(getTasks, {
entities: ["Task"], // Automatic cache invalidation.
}),
],
});