Wasp Framework

repository·main·Indexed 12 days ago

https://github.com/wasp-lang/wasp

A high-level, Rails-like framework for developing full-stack web applications using React, Node.js, and Prisma. Wasp uses a declarative specification file to automate the generation of boilerplate, routing, authentication, and deployment logic.

Tokens
300.4K
Snippets
1K
Records
1.4K
Agent score
91%

What's inside Wasp

  1. Overview of the @wasp.sh/spec package

    main
    The @wasp.sh/spec package provides the formal type definitions and constructor functions that define a Wasp application. It is the programmatic representation of the Wasp DSL (Domain Specific Language), allowing developers to understand the structure of App configurations, including APIs, Actions, Jobs, Pages, and Routes. The package is organized into Constructors (functions to build parts of the app), Specifications (interfaces defining the shape of app components), and Fields (the underlying data structures like Auth, Db, and Server).
  2. What is Wasp?

    main

    Wasp is a declarative domain-specific language (DSL) designed for developing full-stack web applications with minimal boilerplate. It acts as a "glue" between your React (frontend) and Node.js (backend) code, allowing you to specify high-level application requirements while maintaining the flexibility to write custom logic in standard JavaScript/React/Node.js.

    Key features include:

    • Full-stack auth: Out-of-the-box authentication (e.g., username and password).
    • Pages & Routing: Declarative definition of routes and pages.
    • RPC (Remote Procedure Call): Define server actions and queries in Wasp and call them directly from client code, blurring the line between client and server.
    • Smart Caching: Automatic cache invalidation for server actions and queries.
    • Data Modeling: Entity definition using Prisma.io.
    • Frontend ACL: Access Control Lists on the frontend.
    • NPM Integration: Ability to import standard NPM dependencies.
  3. Overview of the GPT Web App Generator

    main

    The GPT Web App Generator is an AI-powered tool that generates full-stack web application codebases based on a natural language description. It is designed to produce working prototypes, specifically optimized for CRUD (Create, Read, Update, Delete) business web applications.

    Input Parameters

    To generate an app, the generator requires:

    • App Name: A unique identifier for the application.
    • App Description: Free-form text describing the desired functionality.
    • Primary App Color: A configuration for the UI theme.
    • Temperature: A parameter for the GPT model's randomness.
    • Auth Method: The authentication strategy to implement.
    • GPT Model: The specific OpenAI model to be used for generation.

    Output Stack

    The generator produces a complete JavaScript codebase consisting of:

    • Frontend: React + Tailwind CSS.
    • Backend: Node.js with Express.
    • Database: Managed via Prisma.
    • Orchestration: All components are connected using the Wasp framework.

    Capabilities and Limitations

    • Simple Apps: (e.g., Todo apps, simple trackers) Often generates error-free code that runs out of the box.
    • Complex Apps: (e.g., Blogs with nested comments) May contain minor mistakes or use TODO placeholders for omitted functionality.
    • Best Use Case: Kick-starting projects with a solid prototype or generating simple, functional CRUD apps quickly.
  4. What is the Tutorial Actions Executor (tacte)?

    main

    The Tutorial Actions Executor (tacte) is a CLI tool designed to automate the execution of Wasp tutorials. It reads MDX tutorial files, extracts <TutorialAction> components, and executes the defined actions (like initializing an app, applying patches, or migrating a database) in sequence to build a fully functional Wasp application.

    This tool is particularly useful for:

    • Automating step-by-step tutorial builds.
    • Testing tutorial accuracy.
    • Providing a machine-executable framework for AI agents to build Wasp apps following documentation.
  5. Key features of Wasp

    main

    Wasp provides a batteries-included experience for the React, Node.js, and Prisma stack through several core features:

    • Declarative Configuration: Use a .wasp or .wasp.ts file to define routes, pages, authentication, database models, server operations, and background jobs.
    • Full-stack Type Safety: Types flow automatically from your database schema to your UI.
    • Type-safe RPC: Call server functions directly from the client with automatic serialization and type checking, eliminating the need to write a manual API layer.
    • Built-in Auth: Configure email/password, Google, GitHub, and other auth methods with minimal setup.
    • Background Jobs: Declare asynchronous jobs in your configuration and implement the logic in Node.js.
    • One-command Deployment: Use wasp deploy to deploy to providers like Railway or Fly.io.
  6. Use Wasp for full-stack SaaS development

    main

    Wasp is designed for developers who want a full-stack, "all-in-one" solution without manually stitching together the frontend, backend, and database. It provides a configuration language that sets up best practices automatically, allowing you to focus on feature development rather than infrastructure boilerplate.

    Key characteristics for SaaS builders:

    • Integrated Stack: Automatically configures React (frontend), Node.js (backend), and PostgreSQL/Prisma (database).
    • Rapid Prototyping: Enables a lean startup approach by allowing weekly feature shipments and quick iterations.
    • Scalability: Since Wasp generates code using mainstream technologies (React, Node.js, Prisma), there are no technical limitations to scaling as your user base grows.
  7. Compare Ruby on Rails for web development

    main

    Ruby on Rails is a "convention over configuration" framework. As of Rails 8.0, it emphasizes simplicity and self-hosting through features like Kamal 2 for Docker deployments and the "Solid trifecta" (Solid Cable, Solid Cache, Solid Queue) which uses the database instead of Redis.

    Key Features:

    • Active Record: The core ORM.
    • Kamal 2: Zero-downtime Docker deployments.
    • Hotwire (Turbo + Stimulus): Provides frontend interactivity without heavy JavaScript.
    • Solid Cable/Cache/Queue: Database-backed infrastructure.
    • Built-in authentication generator: Available in Rails 8.
    • Batteries included: Action Mailer, Active Job, and Active Storage.

    Best For: Startups prioritizing speed-to-market, CRUD-heavy applications, and teams that prefer strong conventions.

  8. Self-host Wasp apps on your own server

    main

    Self-hosting allows you to run Wasp applications on your own hardware or rented servers (e.g., AWS, DigitalOcean, Hetzner), providing full control over data and potentially reducing costs.

    There are several guided deployment methods available:

    • Caprover: Uses Caprover, GitHub Actions, and GitHub Container Registry.
    • Coolify: Uses Coolify, GitHub Actions, and GitHub Container Registry.
    • VPS (Docker): Uses Ubuntu, Git, Caddy, and Docker.

    If your provider is not listed, you can perform a manual deployment.

  9. Compare Django (Python) for web development

    main

    Django is a Python-based full-stack framework, particularly strong for applications requiring integration with AI and Machine Learning ecosystems. Django 5.2 LTS (released April 2025) provides long-term security support through April 2028.

    Key Features:

    • Django ORM: A Pythonic database layer with migrations.
    • Django Admin: Automatically generates an admin interface from models.
    • Django REST Framework (DRF): The standard for building APIs.
    • Security: Built-in authentication, sessions, and CSRF protection.
    • AI/ML Integration: Seamlessly works with NumPy, pandas, scikit-learn, and PyTorch.

    Best For: Data-driven applications, ML-integrated products, and teams already utilizing Python.

  10. Understand the Wasp documentation structure

    main

    Wasp documentation is organized into several distinct sections to help users progress from beginners to advanced developers:

    • Getting Started: Includes an Introduction (overview), Quick Start (installation and demo app), and Editor Setup (IDE configuration).
    • Tutorial: A sequential journey for building a simple application from scratch.
    • Feature pages: Non-sequential deep dives into core features like Data model (Entities, Actions, Queries), Authentication, and Project setup (configuration, testing, environment variables).
    • Advanced Features: Production-ready features like deployment, recurring jobs, and type-safe links.
    • General: Overview of the Wasp language and the CLI Reference.
    • Miscellaneous: Vision, contribution guides, and contact information.
  11. Compare Lucia authentication in Next.js vs. Wasp

    main
    This guide compares the manual implementation of Lucia authentication in a React/Next.js application against the automated implementation provided by Wasp. While Next.js requires manual configuration of database entities, session management, and route protection, Wasp provides a 'batteries-included' approach that uses Lucia under the hood, allowing you to implement authentication with just a few lines of code in your Wasp configuration.
  12. Compare full-stack frameworks for 2026

    main

    This guide compares five major full-stack frameworks based on Developer Experience (DX), Ecosystem, AI-Friendliness, Deployment Ease, and Full-Stack Coverage:

    • Laravel (PHP): A battle-tested, backend-first framework with a massive ecosystem. Best for enterprise apps and teams already using PHP.
    • Ruby on Rails (Ruby): A mature, backend-first framework known for high productivity and strong conventions.
    • Django (Python): A mature, backend-first framework. Excellent for AI/ML-heavy projects due to Python's dominance in that field.
    • Next.js (JavaScript/TypeScript): A frontend-first framework. Provides client and server layers but requires manual assembly of the database, ORM, and auth layers (Bring Your Own Backend).
    • Wasp (JavaScript/TypeScript): An all-in-one, batteries-included framework. It uses a declarative configuration to generate a React + Node.js + Prisma application, eliminating the 'assembly tax' found in other JS stacks.