-
Notifications
You must be signed in to change notification settings - Fork 0
Main review #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: empty-branch
Are you sure you want to change the base?
Main review #7
Changes from all commits
ab97ac1
be039ec
d0f7e9b
ca7c5be
a81e40b
c312bc2
da23f03
e294f71
1086939
3d32c48
d2ce063
a7ea88d
2bc3fdb
1c702d8
e0c587f
7b4d061
a5b9b2f
0a4e5b8
a593501
1d282bf
43d791d
c406f20
463be55
7499245
c2f2727
53370e6
053f887
77cdab3
2431ac0
6a96057
a8d949b
a9afe92
4bf4193
b28e2db
00473f7
59fdab3
50c3baf
7d5c1e4
1fc376d
7c33395
014256b
5842386
2b53067
3eccc0f
f71950b
90384ad
50a5ee1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "name": "wasp-plugins", | ||
| "owner": { | ||
| "name": "Wasp", | ||
| "email": "[email protected]", | ||
| "url": "https://wasp.sh" | ||
| }, | ||
| "metadata": { | ||
| "description": "Official Wasp framework plugins for Claude Code", | ||
| "version": "1.0.0" | ||
| }, | ||
| "plugins": [ | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aha so we directly deifne plugins here. Beacuse I saw also that you can define plugin manifesto in Hm actually it is weird, I see now in their repo that they do it in both places, basically duplicating the information. How does that make any sense, why would they do that? |
||
| { | ||
| "name": "wasp", | ||
| "source": "./plugins/wasp", | ||
| "description": "Give Claude optimized access to Wasp's documentation, features, workflows, and best practices to help you build full-stack React, NodeJS, and Prisma apps even faster.\n\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n⚡️ QUICK START\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n🧠 /wasp:init - initial setup (run this first!)\n📖 /wasp:help - view all plugin features", | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Enhances Claude to give you the optimal experience while developing full-stack web apps with Wasp (React, NodeJS, Prisma, ...). Ok I tried sometihng different here because I thought "Give Claude optimized access" is a bit weird, but I am not sure if this is better, do with it as you like, which can also be nothing. |
||
| "version": "1.0.0", | ||
| "author": { | ||
| "name": "Wasp" | ||
| }, | ||
| "homepage": "https://wasp.sh", | ||
| "repository": "https://github.com/wasp-lang/claude-plugins", | ||
| "license": "MIT", | ||
| "category": "framework", | ||
| "keywords": ["wasp", "full-stack", "react", "nodejs", "deployment", "authentication", "web-development"] | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # OS files | ||
| .DS_Store | ||
| Thumbs.db | ||
|
|
||
|
Comment on lines
+1
to
+4
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would kick these out, these should really go into your global user gitignore on your machine, not in the repo here, since they are OS specific. |
||
| # Local development | ||
| .env | ||
| .env.local | ||
|
Comment on lines
+5
to
+7
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What are we using these for? Are we using any .env or .env.local files in this repo? If not maybe remove then for now. |
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,49 @@ | ||||||
| # Wasp Claude Code Plugins | ||||||
|
|
||||||
| Official [Claude Code](https://claude.ai/code) plugins for the [Wasp](https://wasp.sh) full-stack web framework. | ||||||
|
|
||||||
| ## Available Plugins | ||||||
|
|
||||||
| ### Wasp | ||||||
|
|
||||||
| A Claude Code plugin for developing web apps with the Wasp full-stack framework (React, Node.js, and Prisma), providing access to: | ||||||
| - optimized raw text Wasp documentation for LLMs | ||||||
| - integrations guidance | ||||||
| - best practices | ||||||
| - expert advice on app improvements | ||||||
|
Comment on lines
+7
to
+13
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would maybe make a relative markdown link here to the wasp plugin dir, and also maybe simplify the description so there is less chance of it becoming incorrect because we will forget to update this 100% :D. So it can be shorter, like "The main plugin, that enhances Claude Code for optimal experience when developing Wasp apps with it. It does so by enhancing it with curated documentation, workflows and best practices." |
||||||
|
|
||||||
| ## Adding to Your Project | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| To automatically install this marketplace for all team members, add to your project's `.claude/settings.json`: | ||||||
|
|
||||||
| ```json | ||||||
| { | ||||||
| "extraKnownMarketplaces": { | ||||||
| "wasp-plugins": { | ||||||
| "source": { | ||||||
| "source": "github", | ||||||
| "repo": "wasp-lang/claude-plugins" | ||||||
| } | ||||||
| } | ||||||
| } | ||||||
| } | ||||||
|
Comment on lines
+17
to
+29
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh ok! That is a bit wild one could say hm, not sure if we should recommend this. I imagine they can figure that out on their own if they want, I woul dinstead offer whatever makes most sense for someobdy new, which is to keep it more local and to try out stuff, so probably local per project. But that is for plugin and this is marketplace hm. I don't know, I am not sure I would add this. |
||||||
| ``` | ||||||
|
|
||||||
| ## Contributing | ||||||
|
|
||||||
| To add a new plugin: | ||||||
|
|
||||||
| 1. Create your plugin in the `plugins/` directory | ||||||
| 2. Add an entry to `.claude-plugin/marketplace.json` | ||||||
| 3. Submit a pull request | ||||||
|
|
||||||
| ## License | ||||||
|
|
||||||
| MIT - See individual plugin directories for specific licenses. | ||||||
|
|
||||||
| ## Links | ||||||
|
|
||||||
| - [Wasp Framework](https://wasp.sh) | ||||||
| - [Wasp Documentation](https://wasp.sh/docs) | ||||||
| - [Claude Code](https://claude.ai/code) | ||||||
| - [Claude Code Plugin Documentation](https://docs.anthropic.com/en/docs/claude-code/plugins) | ||||||
|
Comment on lines
+44
to
+49
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Redundant? |
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm this looks wrong, is this working? Because I read this in the docs https://code.claude.com/docs/en/mcp that either you do
But here it seems we have the second thing, but in |
||
| "mcpServers": { | ||
| "chrome-devtools": { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What if they don't want to use it, but want instead to use Playwright? I guess this will still get run and used by our plugin? Maybe that is fine for now, just wondering. Because maybe it also means we should not have this here in |
||
| "command": "npx", | ||
| "args": ["-y", "chrome-devtools-mcp@latest"] | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2025 Wasp.sh | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file in general needs some updating with the latest changes, you probably mostly already know about that but just mentioning. Btw if you feel like something is likely to get outdated with time and we will forget to udpate it, I suggest removing it from README and just referencing it, unless it is realy useful to have duplication here, in that case ok we will do our best to keep it up to date. |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,98 @@ | ||||||||
| # Wasp Claude Code Plugin | ||||||||
|
|
||||||||
| A Claude Code plugin for Wasp framework development, providing optimized raw text Wasp documentation for LLMs, best practices, and tested workflows. | ||||||||
|
|
||||||||
|
Comment on lines
+3
to
+4
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's amke this one match whatever we decide to go with in the other places? Some things I don't like in this one specifically:
|
||||||||
| ## Features | ||||||||
|
|
||||||||
| - **Optimized Documentation Access**: Claude grounds its knowledge via up-to-date raw text, versioned Wasp documentation | ||||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I am not sure about the rest because I think it changed somewhat, so it will need deleting / updating probably (configuring and deployment). |
||||||||
| - **Adds Wasp Knowledge**: Import Wasp best practices and conventions to your project's CLAUDE.md | ||||||||
| - **Configures Wasp**: Easily add Wasp framework features like authentication, database, email, styling (tailwind, shadcn), and other integrations | ||||||||
| - **Deployment Guidance**: Claude Code will guide you through deploying your Wasp app to Railway or Fly.io via the Wasp CLI | ||||||||
|
|
||||||||
| ## Installation | ||||||||
|
|
||||||||
| ### Add the Wasp marketplace | ||||||||
|
|
||||||||
| ```bash | ||||||||
| claude plugin marketplace add wasp-lang/claude-plugins | ||||||||
| ``` | ||||||||
|
|
||||||||
| ### Install the Wasp plugin | ||||||||
|
|
||||||||
| ```bash | ||||||||
| claude plugin install wasp@wasp-plugins --scope project | ||||||||
| ``` | ||||||||
|
|
||||||||
| > [!NOTE] | ||||||||
| > We suggest installing the plugin at the `project` scope (`settings.json` are commited to git). | ||||||||
| > Or by using the `local` scope (`settings.local.json` are not commited to git). | ||||||||
|
|
||||||||
| Or install the plugin interactively in a running Claude Code session: | ||||||||
|
|
||||||||
| ```bash | ||||||||
| /plugin | ||||||||
| ``` | ||||||||
|
|
||||||||
| ### Configure and Initialize the plugin | ||||||||
|
|
||||||||
| After installing, in an active session, run: | ||||||||
| ```bash | ||||||||
| /plugin | ||||||||
| ``` | ||||||||
| - select `wasp-plugins` under the `marketplaces` tab | ||||||||
| - select the `auto-update` option to enable automatic updates of the plugin | ||||||||
|
Comment on lines
+38
to
+43
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is about auto-updating the marketplace, not the plugin, and option is called "Enable auto-update". Let's move this from here to above, under "Install the Wasp marketplace", as a "tip"? ANd let's keep focus here on initializing the plugin. |
||||||||
|
|
||||||||
| Then run the initialize command to import curated Wasp resources into your project's CLAUDE.md file. | ||||||||
|
|
||||||||
| ```bash | ||||||||
| /wasp:init | ||||||||
| ``` | ||||||||
|
|
||||||||
| ## Commands | ||||||||
|
|
||||||||
| - `/wasp:init` - Initialize the plugin | ||||||||
| - `/wasp:help` - Show the plugin's features, commands, and skills | ||||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok we have one more now! |
||||||||
|
|
||||||||
| ## Skills | ||||||||
|
|
||||||||
| This plugin provides skills that Claude will automatically invoke when appropriate: | ||||||||
|
|
||||||||
| ### 1. Configure Wasp (`configure-wasp`) | ||||||||
| Configure Wasp framework features like authentication, database, email providers, CSS and UI styling libraries, and other Wasp integrations. | ||||||||
|
|
||||||||
| ### 2. Start Dev Server (`start-dev-server`) | ||||||||
| Start the Wasp development environment with proper database setup and migrations. Detects your database type (PostgreSQL vs SQLite), handles database migrations, and starts the dev server as a background task. | ||||||||
|
|
||||||||
| ### 3. Deployment Guide (`deploying-app`) | ||||||||
| Let Claude Code guide you through using Wasp's CLI for easy deployment of your Wasp app to Railway or Fly.io. | ||||||||
|
|
||||||||
| ## Background Hooks | ||||||||
|
|
||||||||
| The plugin includes background hooks that: | ||||||||
| - Automatically redirect to LLM-friendly Wasp docs (`llms.txt`) instead of HTML pages | ||||||||
| - Detect your project's Wasp version for versioned documentation | ||||||||
| - Check plugin initialization status on session start | ||||||||
|
|
||||||||
| ## Recommended Permissions | ||||||||
|
|
||||||||
| For the best experience, add these permissions to your project or user settings: | ||||||||
|
|
||||||||
| ```json | ||||||||
| { | ||||||||
| "permissions": { | ||||||||
| "allow": [ | ||||||||
| "Bash(wasp start)", | ||||||||
| "Bash(wasp db:*)", | ||||||||
| "Bash(wasp deploy:*)", | ||||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hah I wonder if deployment should indeed be allowed, I tihnk I would prefer to be asked each time :D. |
||||||||
| "WebFetch(domain:wasp.sh)", | ||||||||
| "WebFetch(domain:raw.githubusercontent.com)" | ||||||||
| "Skill(wasp:wasp-plugin-help)", | ||||||||
| "Skill(wasp:start-dev-server)", | ||||||||
| ] | ||||||||
| } | ||||||||
| } | ||||||||
| ``` | ||||||||
|
|
||||||||
| ## License | ||||||||
|
|
||||||||
| MIT | ||||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ha this whole command seems so simple! It is basically just reminding/grounding the LLM to make sure it pulls in all the relevant data and do think through improvements. To me, it looks on the border of "user can just type this on their own if they need it". What was your decision process, how did you decide to go with it? Motivation, thinking? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| argument-hint: [advice request] | ||
| description: Get advice on app improvements and functionality from a Wasp expert. Takes optional arguments for more specific requests e.g. `/wasp:expert-advice how can I improve account management?`. | ||
| --- | ||
|
|
||
| 1. Explore the current codebase | ||
| 2. Check the wasp docs https://wasp.sh/llms.txt | ||
| 3. Explore this plugin's skills and commands | ||
| 4. Decide on a few improvements (if the user supplies arguments in the command, use them as a starting point, if not, your ideas can be app features, code improvements, enhancements, etc.) | ||
| 5. Present the improvements to the user with their names, descriptions, and pros and cons | ||
|
|
||
| **User's assist request:** $ARGUMENTS |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| description: Shows the Wasp plugin's available features, commands, and skills. | ||
| --- | ||
|
|
||
| Explicitly invoke the `wasp-plugin-help` skill in the Claude Code session for the user. | ||
|
|
||
| Example: | ||
| ``` | ||
| Run the `wasp-plugin-help` skill. | ||
| ``` | ||
|
Comment on lines
+7
to
+10
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am curious, what if we didn't have this part, would it still work ok? Why do we need both this "Run ..." line and also instructions above. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| description: Add Wasp knowledge to your project's CLAUDE.md | ||
| --- | ||
|
|
||
| 0. inform the user that this process will give Claude access to info on Wasp's features, commands, workflows, and best practices by copying the `general-wasp-knowledge.md` file into the project directory and importing it into the user's CLAUDE.md file. Use the AskUserQuestion tool to ask the user if they want to continue. | ||
| 1. copy the file `${CLAUDE_PLUGIN_ROOT}/general-wasp-knowledge.md` from within the plugin's installation directory to the user's project `.claude/wasp/knowledge` directory using the Bash tool with `cp` command. | ||
| 2. append it to the user's CLAUDE.md file as an import: | ||
| ```markdown | ||
| # Wasp Knowledge | ||
|
|
||
| Wasp knowledge can be found at @.claude/wasp/knowledge/general-wasp-knowledge.md | ||
| ``` | ||
| 3. inform the user that process is complete and they SHOULD NOT amend the `general-wasp-knowledge.md` file, but should ammend their CLAUDE.md file with their own custom Wasp rules, if desired. | ||
| 4. also inform the user they can run `/wasp:help` to see the plugin's available commands and skills. |
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Main thoughts for this file are: what can be moved to docs and referenced from there? But on the other hand, yeah, I get it, this needs to be here and not in docs, so it is more on top of mind of LLM. Ok yeah. Still, I would maybe like this to be also captured somewhere in the docs, kind of like "Wasp overview" or "Wasp AI overview" or something, so we remember to maintain it, and then just copied over here when we are publising the plugin, otehrwise I think we will forget to maintain this properly. We dont' have to figur ethat out right now, but let's create a GH issue in this repo that is focused exactly on that -> how do we ensure maintainability of this plugin. I tihnk likely solution will be:
|
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,126 @@ | ||||||
| # Wasp App | ||||||
|
|
||||||
| This project uses TypeScript and Wasp, a batteries-included framework for building full-stack web apps with React, Node.js, and Prisma. | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. THeir project could be in Javascript, and not in Typescript though, so can we drop the Typescript from here? Why is it important that we mention Typescript here? |
||||||
|
|
||||||
| ## Documentation | ||||||
|
|
||||||
| Your training data about Wasp may be outdated. You MUST fetch and verify against the current documentation before implementing Wasp features or answering Wasp questions: | ||||||
| - https://wasp.sh/llms.txt (latest) | ||||||
| - https://wasp.sh/llms-{version}.txt (versioned) | ||||||
|
Comment on lines
+8
to
+9
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What sounds tricky to me here is, how will it know if it should use the latest one, or the one with specific version? Let's say it detects Wasp has version 0.20, how will it know if it needs to use llms-0.20.txt, or llms-0.19.txt? Ok this is probably sometihng we should figure outside of the scope of this PR. I think you have another PR where you do the llms.txt versioning, we should probably figure that out there. We could on that side handle things. What are we going to do in the meantime though -> give up on versioning here for now? Tell it to just use the latest? Actually, for now here, we could do something like this: It still doesn't know the latest version of Wasp which sucks, but well this at lest solves it to a degree. Oh one solution could also be to not have multiple llms-{version}.txt files, but instead, we have just one "llms.txt" file, but inside that one, we have files for all the different wasp versions! So it would be like all those llms-{version}.txt concatentaed in one file. So it doesn't have to try to guess the URL, instead it fetches llms.txt, figures out based on it which docs for which versions are available, and then fetches those. If we feel that makes llms.txt too big, which could be the case, then we could maybe add one extra level of indirection, and have llms.txt contain nothing but links to versioned llms.txt -> llms-0.20.0.txt, llms-0.19.0.txt, ..., and then when it has that info, it can obtain the correct versioned llms.txt and go from there. Yeah I think that is the best solution. But let's do that in that other PR. |
||||||
|
|
||||||
| ## Workflows | ||||||
|
|
||||||
| ### Development Server | ||||||
|
|
||||||
| Before starting any development task on this Wasp project (coding, debugging, adding features), you MUST check if the dev server is running: | ||||||
| - Check for active background tasks (use `/tasks` command) | ||||||
| - Or check if ports 3000 (client) and 3001 (server) are in use | ||||||
|
|
||||||
| If not running, invoke the `start-dev-server` skill to start the server as a background task or externally. | ||||||
|
|
||||||
| ### Implementation Checklist | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It wasn't clear to me what this is, maybe it is to LLM though. But these are recommendations how to approach imelmenting whatever, right? Any way we can make that cleaner from the title? "Implementing a new feature/change"? |
||||||
|
|
||||||
| 1. Fetch https://wasp.sh/llms.txt to verify current syntax (see "Documentation" above) | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if it is better to drop the link from here so it needs to refer to the Documentation above, and has to focus on the concept there are versioned llms.txt files, instead of just being like "oh yeah I will just follow this link regardless of version.". |
||||||
| 2. Check if the feature exists in the current codebase or starter template for reference patterns | ||||||
| 3. Identify which files need changes: wasp config file (`main.wasp` or `main.wasp.ts`), `schema.prisma`, `src/` | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How did you decide to put this stuff in, what is the impact? |
||||||
| 4. Plan the order: schema → migrate → wasp config file → TypeScript | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What if there are no schema changes, will this still push it to force them a bit, I hope not? Btw could be Javascrit potentially and not Typescript. I woudlnt' recommend it, especially with AI, but it is possible. |
||||||
|
|
||||||
| ### Schema Changes | ||||||
|
|
||||||
| After ANY change to `schema.prisma`: | ||||||
| 1. Stop the dev server if running | ||||||
| 2. Run `wasp db migrate-dev --name <descriptive-name>` | ||||||
| 3. Restart the dev server | ||||||
|
Comment on lines
+30
to
+33
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok ok, but we don't always want it to happen immediately, right? Sometimes you want to update the schema.prisma, and then continue coding, be it in schema or in typescript or whatever, and at one point, you will want to run migrate-dev, but not immediately, only once you are ready. I am not sure how we should instruct that though. Maybe explain that when changes are done to schema.prisma, they are not actually applied to the database until the Oh and what AI should do, except for being aware of this, is to make sure user is aware of this and knows when migrate-dev hasn't been run, as this is common source of confusion. Wasp dev server will be returning a warning about it, but user might not see it sicne it is background task, so AI should communicate that warning at the appropriate moment. |
||||||
|
|
||||||
| ## Project Reference | ||||||
|
|
||||||
| ### Structure | ||||||
|
|
||||||
| ``` | ||||||
| . | ||||||
| ├── .wasp/ # Wasp output (auto-generated, do not edit) | ||||||
| ├── public/ # Static assets | ||||||
| ├── src/ # Feature code: server `operations.ts` and client `pages.tsx` files | ||||||
| ├── main.wasp or main.wasp.ts # Wasp config file: routes, pages, auth, operations, jobs, etc. | ||||||
| ├── schema.prisma # Database schema (Prisma) | ||||||
| ``` | ||||||
|
Comment on lines
+37
to
+46
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder how important is this. What if it differs for whatever wasp version it is using? I don't know, maybe drop this. |
||||||
|
|
||||||
| ### Code Organization | ||||||
|
|
||||||
| Organize by **feature** (vertical), not by type (client/server): | ||||||
|
|
||||||
| ``` | ||||||
| src/ | ||||||
| ├── tasks/ | ||||||
| │ ├── TasksPage.tsx # Page component | ||||||
| │ ├── TaskList.tsx # Component | ||||||
| │ └── operations.ts # Queries & actions | ||||||
| ├── auth/ | ||||||
| │ ├── LoginPage.tsx | ||||||
| │ └── google.ts | ||||||
| ``` | ||||||
|
Comment on lines
+48
to
+61
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would name this "Recommended code organization" and then go like "Unless user specifies otherwise, we recommend using vertical, per-feature code organization (not per-type), where each feature is organized in one directory, including its client and server code, and possible sub-features. And then the example(s). |
||||||
|
|
||||||
| ### Starter Templates | ||||||
|
|
||||||
| Highly recommend that the user chose one of the following templates when scaffolding a new Wasp app (this helps Claude understand Wasp's features and patterns): | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we can drop this part of "helps Claude understand Wasp's features and patterns", that sounds a bit confusing / redundant. |
||||||
| ```bash | ||||||
| wasp new my-basic-app -t basic # creates a basic starter app with core Wasp features like auth, operations, pages, etc. | ||||||
| wasp new my-saas-app -t saas # creates a full-featured SaaS starter app with auth, payments, demo app, AWS S3, and more (OpenSaaS.sh) | ||||||
| ``` | ||||||
|
|
||||||
| See the **Starter Templates** section in https://wasp.sh/llms.txt for more templates. | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| ### Customization | ||||||
|
|
||||||
| Wasp provides layers of customization on top of the tools it uses (vite, expressjs, react-query, client and server setup, etc.): see the **Project Setup & Customization** section in https://wasp.sh/llms.txt. | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the point here was to let it know that some stuff is not configured as usual, but via Wasp ways. Maybe say that more bluntly / explicitly? Because to me it doesn't seem super straightfowrad, the way it is written right now. |
||||||
|
|
||||||
| ### Advanced Features | ||||||
|
|
||||||
| Wasp provides **advanced features**: | ||||||
| - custom HTTP API endpoints | ||||||
| - background (cron) jobs | ||||||
| - type-safe links | ||||||
| - websockets | ||||||
| - middleware | ||||||
| - email sending | ||||||
|
|
||||||
| See the **Advanced Features** section in https://wasp.sh/llms.txt for more details. | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| ### Import Conventions | ||||||
|
|
||||||
| **In TypeScript files:** | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How did we pick these, why are they so important to be mentioned here? |
||||||
| - ✅ `import type { User } from 'wasp/entities'` | ||||||
| - ✅ `import type { GetTasks } from 'wasp/server/operations'` | ||||||
| - ✅ `import { getTasks, createTask, useQuery } from 'wasp/client/operations'` | ||||||
| - ✅ `import { SubscriptionStatus } from '@prisma/client'` (for Prisma enums) | ||||||
| - ✅ Local code: relative paths `import { X } from './X'` | ||||||
| - ⚠️ Call actions directly using `async/await`. DO NOT use Wasp's `useAction` hook unless optimistic updates are needed. | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not import convention, this tip about how to call actions. |
||||||
|
|
||||||
| **In main.wasp:** | ||||||
| - ✅ `fn: import { getTasks } from "@src/tasks/operations.ts"` | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we also recommend maybe not using .ts extensions? Or do we? I can't remember, but I would confirm it by checking the example apps and following what they do. |
||||||
| - ❌ Never relative paths | ||||||
|
|
||||||
| **In main.wasp.ts:** | ||||||
| See the **TypeScript Config** section in https://wasp.sh/llms.txt for more details. | ||||||
|
|
||||||
| ## Troubleshooting | ||||||
|
|
||||||
| ### Debugging | ||||||
|
|
||||||
| When errors occur: | ||||||
| 1. Check server terminal for backend errors (localhost:3001) | ||||||
| 2. Check client terminal for frontend build errors (localhost:3000) | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm client terminal, what is that :D. Aha ok, for frontend build errors. But localhost:3000 is the app, not client terminal. So this is wrong. I would say: check the |
||||||
| 3. Confirm there are no client app issues in the browser console. Ask the user to choose which tool they'd prefer via the AskUserQuestion tool and run it for the user: | ||||||
| - the `mcp__plugin_wasp_chrome-devtools` | ||||||
| - Claude Code's built-in Chrome browser function | ||||||
|
|
||||||
| ### Common Mistakes | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice |
||||||
|
|
||||||
| | Symptom | Fix | | ||||||
| |---------|-----| | ||||||
| | `context.entities.X undefined` | Add entity to `entities: [...]` in main.wasp | | ||||||
| | Schema changes not applying | Run `wasp db migrate-dev --name <descriptive-name>` | | ||||||
| | Can't login after email signup with `Dummy` email provider | Check the server logs for the verification link or set SKIP_EMAIL_VERIFICATION_IN_DEV=true in .env.server | | ||||||
| | Types stale after changes | Restart TS server | | ||||||
| | Wasp not recognizing changes | **WAIT PATIENTLY** as Wasp recompiles the project. Re-run `wasp start` if necessary.| | ||||||
| | Persistent weirdness after waiting patiently and restarting. | Run `wasp clean` && `wasp start` | | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be more correct to say "Official Claude Code plugins for Wasp framework"?
Because they are Claude Code plugins, not Wasp framework plugins, right?