How wasp-lang/wasp works
The project is Wasp – a full‐stack web application specification framework built to “generate” a full React, Node.js (Express), and Prisma app from a concise declarative file (the “.wasp” file). The open‐source repository is the heart of the Wasp universe. Its purpose is to dramatically simplify full-stack web development, making it as rapid as writing just a few lines in a configuration file. It uses a compiler (mostly in Haskell) to translate a high-level declarative specification into boilerplate for the front-end, back-end, and database parts of the application. There are additional packages for deployment, Prisma management, Studio, and tooling, as well as a website with documentation and examples.
Primary components based on the file structure and README
• The core compiler (in the “waspc” directory), which is written in Haskell. This component is central; it parses the .wasp file and produces the generated application.
• The CLI and code generation layer (organized under folders like “waspc/cli” and “waspc/data/Generator”) which implements file copying, template rendering, and generation of the front-end, back-end, and deployment assets.
• The supporting packages (in “waspc/packages”) for deployment (deploy), Prisma (for database code), Studio (for UI of data), and TypeScript inspection.
• The examples folder (found also as “examples/…” in the repository) demonstrates concrete full-stack applications built with Wasp.
• The web folder which is the website with documentation, blog posts, and landing pages; though it is not part of the application runtime, it represents documentation and developer marketing.
• Ancillary tools (in “waspc/tools”) to help install or package code.
Relationships and data flows
• The Wasp developer writes a “main.wasp” configuration file that describes the app’s high-level aspects, such as app metadata, routes, pages, queries, and even Prisma models.
• The compiler (waspc) reads this high‐level specification, then uses the generators to produce a full boilerplate application. This includes:
– A client (React with react-query, etc.) for the front-end.
– A server (Node.js/Express) for back-end logic including RPC calls and authentication.
– A Prisma schema for database management.
• Deployment packages also exist so that the generated code can be deployed on various platforms without lock-in.
• In addition, the system supports generating configuration for jobs, email sending, and integration with third party auth providers (handled by configurable modules).
Incorporate technologies and sustainability details
• Mention that the front-end is built using React (with potential additional libraries like react-query) and uses TailwindCSS (evident from several tailwind.config files).
• The back-end is built with Node.js (Express is likely used given the “server” folder and common web practices).
• The Prisma ORM (support files like “schema.prisma”) facilitates database interactions.
• Deployment is abstract and can be done with different providers using configuration files present in “packages/deploy”.
• The repository uses modern Haskell tooling (cabal), TypeScript’s tooling (tsconfig.json), and various GitHub workflows for CI.