From 1bd1632eaf26e8eab6824e0f649b8326bef628cb Mon Sep 17 00:00:00 2001 From: Nicholas Charriere Date: Wed, 23 Oct 2024 14:44:23 -0700 Subject: [PATCH 1/2] Add default icons, preinstall them --- packages/api/apps/templates/README.md | 1 - packages/api/apps/templates/react-typescript/package.json | 1 + packages/api/prompts/app-builder.txt | 6 ++++-- packages/api/prompts/app-editor.txt | 6 ++++-- 4 files changed, 9 insertions(+), 5 deletions(-) delete mode 100644 packages/api/apps/templates/README.md diff --git a/packages/api/apps/templates/README.md b/packages/api/apps/templates/README.md deleted file mode 100644 index bc7db2c6..00000000 --- a/packages/api/apps/templates/README.md +++ /dev/null @@ -1 +0,0 @@ -These templates were copied from https://github.com/vitejs/vite/tree/main/packages/create-vite diff --git a/packages/api/apps/templates/react-typescript/package.json b/packages/api/apps/templates/react-typescript/package.json index 81c2e69b..888ca13c 100644 --- a/packages/api/apps/templates/react-typescript/package.json +++ b/packages/api/apps/templates/react-typescript/package.json @@ -10,6 +10,7 @@ "preview": "vite preview" }, "dependencies": { + "lucide-react": "^0.453.0", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/packages/api/prompts/app-builder.txt b/packages/api/prompts/app-builder.txt index 152fd505..2a88185f 100644 --- a/packages/api/prompts/app-builder.txt +++ b/packages/api/prompts/app-builder.txt @@ -1,6 +1,6 @@ ## Context -- You are helping a user build a front-end website application. You should behave like an extremely competent senior engineer. +- You are helping a user build a front-end website application. You should behave like an extremely competent senior engineer and designer. - The user is asking you to create the app from scratch through a and you will be given the skeleton of the app that already exists as a . - You will be given an app skeleton in the following format: @@ -24,7 +24,7 @@ ## Instructions -- Your job is to come up with the relevant changes, you do so by suggesting a with one or more and a +- Your job is to come up with the relevant changes, you do so by suggesting a with one or more and a . - There can be one or more in a . - A is a brief description of your plan in plain english. It will be shown to the user as context. - An is one of: @@ -40,6 +40,8 @@ - Do not talk or worry about testing. The user wants to _use_ the app: the core goal is for it to _work_. - For react: modularize components into their own files, even small ones. We don't want one large App.tsx with everything inline, but different components in their respective src/components/{Component}.tsx files - For styles: apply modern, minimalistic styles. Things shoud look modern, clean and slick. +- Use lucide-react for icons. It is pre-installed +- If the user asks for features that require routing, favor using react-router ## Example response diff --git a/packages/api/prompts/app-editor.txt b/packages/api/prompts/app-editor.txt index ded006b9..b75174da 100644 --- a/packages/api/prompts/app-editor.txt +++ b/packages/api/prompts/app-editor.txt @@ -1,6 +1,6 @@ ## Context -- You are helping a user build a front-end website application. You should behave like an extremely competent senior engineer. +- You are helping a user build a front-end website application. You should behave like an extremely competent senior engineer and designer. - The user wants to make a change to update or fix the app. Your goal is to help him with that request by suggesting updates for files. - The structure we use to describe the app is the following: @@ -23,7 +23,7 @@ ## Instructions -- Your job is to come up with the relevant changes, you do so by suggesting a with one or more and a +- Your job is to come up with the relevant changes, you do so by suggesting a with one or more and a . - There can be one or more in a . - A is a brief description of your plan in plain english. It will be shown to the user as context. - An is one of: @@ -38,6 +38,8 @@ - Do not talk or worry about testing. The user wants to _use_ the app: the core goal is for it to _work_. - For react: modularize components into their own files, even small ones. We don't want one large App.tsx with everything inline, but different components in their respective src/components/{Component}.tsx files - For styles: apply modern, minimalistic styles. Things shoud look modern, clean and slick. +- Use lucide-react for icons. It is pre-installed +- If the user asks for features that require routing, favor using react-router ## Example response From 6a9fa7bf8b9f3985c114aa99787258d8c50d534c Mon Sep 17 00:00:00 2001 From: Nicholas Charriere Date: Wed, 23 Oct 2024 15:52:25 -0700 Subject: [PATCH 2/2] Add changeset --- .changeset/few-hounds-train.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/few-hounds-train.md diff --git a/.changeset/few-hounds-train.md b/.changeset/few-hounds-train.md new file mode 100644 index 00000000..f946b2e3 --- /dev/null +++ b/.changeset/few-hounds-train.md @@ -0,0 +1,6 @@ +--- +'@srcbook/api': patch +'srcbook': patch +--- + +Improve prompts. Guide to use lucide. Guide to use react-router. Clean unused files