Skip to content

Full-stack modules skateboard - #4440

Draft
infomiho wants to merge 37 commits into
mainfrom
miho/full-stack-modules-skateboard
Draft

Full-stack modules skateboard#4440
infomiho wants to merge 37 commits into
mainfrom
miho/full-stack-modules-skateboard

Conversation

@infomiho

@infomiho infomiho commented Jul 7, 2026

Copy link
Copy Markdown
Member

Description

This is the skateboard for full-stack modules: npm packages that add Wasp declarations (pages, queries, jobs, ...) to an app that installs them.

A module is a package with a module.wasp.ts file. That file default-exports a function that takes options and returns declarations. The host app calls it from its own spec:

import getModuleSpec from "@kitchen-sink/module/spec";
// inside the app spec:
...getModuleSpec({ prefix: "/fsm" })

What this PR adds:

  • New CLI commands: wasp module new, wasp module install, wasp module build. Building compiles the module's spec and source to dist/, so host apps never consume raw Wasp source.
  • A demo module (examples/kitchen-sink-module) that Kitchen Sink installs at /fsm. It uses every declaration kind a module can contribute: route, page, query, action, crud, api, apiNamespace, and job.
  • Modules can ship their own CSS: components import plain CSS files and the module build copies them into dist/ next to the compiled code.
  • The generated server bundles packages that peer-depend on wasp, so the module and the host share one SDK runtime.

Making the demo deployable surfaced a few long-standing issues, fixed here:

  • wasp install on a fresh clone only worked because npm happened to prune the SDK's lockfile entries. A module's wasp peer dependency makes them reachable, so wasp install now copies the Wasp-owned tarballs to disk before npm runs.
  • Local file: package tarballs were invisible to Docker builds. The demo tarball now lives inside the app's src/, which the Dockerfile already ships.
  • ./run test:packages ran packages in alphabetical order, so module-builder typechecked against an unbuilt @wasp.sh/spec.

More detail: waspc/SKATEBOARD.md (how it fits together, dev workflows), waspc/DECISIONS.md (decisions + rejected alternatives), waspc/wireframes/ (diagrams).

CI note: the Fly deploy test flakes on signup tests. This is a pre-existing infra issue (the deployed app's DB path stalls right after deploy), not caused by this branch; Railway runs the same suite green.

Type of change

  • 🔧 Just code/docs improvement
  • 🐞 Bug fix
  • 🚀 New/improved feature
  • 💥 Breaking change

Checklist

  • I tested my change in a Wasp app to verify that it works as intended.

  • 🧪 Tests and apps:

    • I added unit tests for my change.
    • (if you fixed a bug) I added a regression test for the bug I fixed.
    • (if you added/updated a feature) I added/updated e2e tests in examples/kitchen-sink/e2e-tests.
    • (if you added/updated a feature) I updated the starter templates in waspc/data/Cli/templates, as needed.
    • (if you added/updated a feature) I updated the example apps in examples/, as needed.
      • (if you updated examples/tutorials) I updated the tutorial in the docs (and vice versa).
  • 📜 Documentation:

    • (if you added/updated a feature) I added/updated the documentation in web/docs/.
  • 🆕 Changelog: (if change is more than just code/docs improvement)

    • I updated waspc/ChangeLog.md with a user-friendly description of the change.
    • (if you did a breaking change) I added a step to the current migration guide in web/docs/migration-guides/.
    • I bumped the version in waspc/waspc.cabal to reflect the changes I introduced.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 7, 2026

Copy link
Copy Markdown

Deploying wasp-docs-on-main with  Cloudflare Pages  Cloudflare Pages

Latest commit: c83b2ac
Status: ✅  Deploy successful!
Preview URL: https://0cd8ecd6.wasp-docs-on-main.pages.dev
Branch Preview URL: https://miho-full-stack-modules-skat.wasp-docs-on-main.pages.dev

View logs

@infomiho
infomiho had a problem deploying to railway-deploy-test July 7, 2026 10:11 — with GitHub Actions Failure
@pkg-pr-new

pkg-pr-new Bot commented Jul 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

@wasp.sh/wasp-cli

npx https://pkg.pr.new/wasp-lang/wasp/@wasp.sh/wasp-cli@4440

@wasp.sh/wasp-cli-darwin-arm64-unknown

npx https://pkg.pr.new/wasp-lang/wasp/@wasp.sh/wasp-cli-darwin-arm64-unknown@4440

@wasp.sh/wasp-cli-darwin-x64-unknown

npx https://pkg.pr.new/wasp-lang/wasp/@wasp.sh/wasp-cli-darwin-x64-unknown@4440

@wasp.sh/wasp-cli-linux-arm64-glibc

npx https://pkg.pr.new/wasp-lang/wasp/@wasp.sh/wasp-cli-linux-arm64-glibc@4440

@wasp.sh/wasp-cli-linux-x64-glibc

npx https://pkg.pr.new/wasp-lang/wasp/@wasp.sh/wasp-cli-linux-x64-glibc@4440

@wasp.sh/wasp-cli-linux-x64-musl

npx https://pkg.pr.new/wasp-lang/wasp/@wasp.sh/wasp-cli-linux-x64-musl@4440

commit: 3e080ef

@infomiho
infomiho had a problem deploying to railway-deploy-test July 7, 2026 13:46 — with GitHub Actions Failure
@infomiho
infomiho force-pushed the miho/full-stack-modules-skateboard branch from 8d14718 to 7d0d328 Compare July 9, 2026 14:33
@infomiho
infomiho temporarily deployed to railway-deploy-test July 21, 2026 08:03 — with GitHub Actions Inactive
@infomiho
infomiho temporarily deployed to railway-deploy-test July 21, 2026 10:24 — with GitHub Actions Inactive
@infomiho
infomiho temporarily deployed to railway-deploy-test July 21, 2026 10:53 — with GitHub Actions Inactive
@infomiho
infomiho force-pushed the miho/full-stack-modules-skateboard branch from 8bde192 to 3e080ef Compare July 23, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant