Configs2026年5月23日·1 分钟阅读

Wasp — Full-Stack React & Node.js Framework with Declarative DSL

Wasp is an open-source full-stack web framework that uses a simple declarative language alongside React and Node.js to eliminate boilerplate for auth, jobs, and deployment.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Wasp Overview
通用 CLI 安装命令
npx tokrepo install a2d9d3ef-56a1-11f1-9bc6-00163e2b0d79

Introduction

Wasp is an open-source, full-stack web framework that pairs a concise declarative configuration language with React on the frontend and Node.js on the backend. It handles common full-stack concerns like authentication, database access, background jobs, and email out of the box, letting developers focus on business logic rather than wiring together dozens of libraries.

What Wasp Does

  • Provides a single .wasp config file that declares routes, pages, queries, actions, and auth
  • Generates a complete React + Express + Prisma application from the declarative spec
  • Includes built-in authentication with email/password, Google, GitHub, and Keycloak providers
  • Supports background jobs, scheduled tasks (cron), and server-side middleware
  • Offers one-command deployment to Fly.io or self-hosted Docker setups

Architecture Overview

Wasp uses a custom compiler that reads .wasp files and the developer's React/Node.js code, then generates a full-stack project with a React SPA frontend, Express API backend, and Prisma ORM layer. The compiler stitches together routing, RPC calls, auth middleware, and database models so the developer writes only the differentiating logic while Wasp produces the glue code.

Self-Hosting & Configuration

  • Requires Node.js 18+ and the Wasp CLI binary installed via the official installer
  • Define data models in the .wasp file using Prisma schema syntax for database entities
  • Configure environment variables in .env.server and .env.client for secrets and API keys
  • Run wasp db migrate-dev to apply schema changes to PostgreSQL or SQLite
  • Deploy with wasp deploy fly or build a Docker image with wasp build for self-hosting

Key Features

  • Declarative DSL eliminates hundreds of lines of boilerplate for auth, routing, and data fetching
  • Full-stack type safety with TypeScript across client and server code
  • Automatic optimistic UI updates and cache invalidation for queries and actions
  • Built-in email sending integration with SendGrid, Mailgun, or SMTP providers
  • Hot module replacement and instant dev server startup for rapid iteration

Comparison with Similar Tools

  • Next.js — React meta-framework focused on SSR/SSG; Wasp is more opinionated and includes backend logic
  • Redwood.js — full-stack React + GraphQL framework; Wasp uses a custom DSL instead of GraphQL
  • Blitz.js — zero-API full-stack React framework built on Next.js; Wasp generates code from a declarative spec
  • T3 Stack — community stack combining Next.js, tRPC, Prisma, and Tailwind; Wasp bundles these concerns into one tool
  • Ruby on Rails — server-rendered MVC framework; Wasp targets React SPAs with a similar productivity philosophy

FAQ

Q: Do I need to learn the Wasp DSL to use it? A: The DSL is minimal and readable. Most application logic is written in standard TypeScript/React and Node.js; the .wasp file only declares high-level structure.

Q: Which databases does Wasp support? A: Wasp uses Prisma under the hood and supports PostgreSQL (recommended for production) and SQLite (for local development).

Q: Can I add custom Express middleware or API routes? A: Yes. Wasp supports custom API routes and middleware defined in Node.js alongside the generated server code.

Q: Is Wasp production-ready? A: Wasp is used in production by multiple startups. It supports deployment to Fly.io, Railway, and Docker-based hosting environments.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产