You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/README.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -329,11 +329,11 @@ pnpm test
329
329
330
330
# Generating example apps using cursor
331
331
332
-
1) Open the product folder under /examples/{product}
332
+
1) Open the product folder under /examples/{product}/_prompts
333
333
334
-
2) Under the {product} directory, open the prompt-part2.txt file.
334
+
2) Under the {product}/_prompts directory, open the example-app-2-add-feature.txt file.
335
335
336
-
3) Copy all of the content in the prompt-part2.txt file.
336
+
3) Copy all of the content in the example-app-2-add-feature.txt file.
337
337
338
338
4) Paste it on to Cursor. Make sure that you're using Agent mode and the model to be used is Claude 3.7 (Thinking)
339
339
@@ -347,15 +347,15 @@ the <feature name> has the manually-edited field value as true in the feature.js
347
347
348
348
7) If the flag above exists, it will ask for a confirmation, otherwise, it will use best practices to update the existing feature page.
349
349
350
-
8) Once the feature page is completed, under the same directory as prompt-part2.txt, open prompt-part3.txt and copy all of its contents.
350
+
8) Once the feature page is completed, under the same directory as example-app-2-add-feature.txt, open example-app-3-fix-ui.txt and copy all of its contents.
351
351
352
352
9) Paste it on to a new Cursor window and in the chat window you can type:
353
353
354
354
feature name: <nameofthefeature>
355
355
356
356
Here, cursor will check and fix pages with styling issues to ensure that it looks consistent with other example apps.
357
357
358
-
10) Once the styling changes have been made, under the same directory as prompt-part2.txt, open prompt-part4.txt and copy all of its contents.
358
+
10) Once the styling changes have been made, under the same directory as example-app-2-add-feature.txt, open example-app-4-testing.txt and copy all of its contents.
359
359
360
360
11) Paste it on to a new Cursor window and in the chat window you can type:
361
361
app name: <app name(if exists)>
@@ -369,7 +369,7 @@ feature name: <name of the feature>
369
369
370
370
## If an App Doesn't Exist Yet
371
371
372
-
You must create the app first by going to the prompt-part1.txt file and paste it on to Cursor's chat window and use Agent Mode + Claude 3.7 Sonnet Thinking.
372
+
You must create the app first by going to the example-app-1-create-app-template.txt file and paste it on to Cursor's chat window and use Agent Mode + Claude 3.7 Sonnet Thinking.
373
373
374
374
In the chat window, type in:
375
375
feature name: <name>
@@ -383,35 +383,35 @@ IMPORTANT: For any prompts, if cursor is not done with its operations but it has
383
383
384
384
The example generation process uses three different prompt files, each with a specific purpose:
385
385
386
-
### prompt-part1.txt
386
+
### example-app-1-create-app-template.txt
387
387
-**Purpose**: Creates the initial app structure and boilerplate
388
388
-**When to use**: Only when you need to create a completely new example app
389
389
-**What it does**: Sets up the project structure, configuration files, basic components, and placeholder pages
390
390
-**Output**: A functioning but minimal app with no implemented features
391
391
392
-
### prompt-part2.txt
392
+
### example-app-2-add-feature.txt
393
393
-**Purpose**: Implements or updates a specific feature within an existing app
394
-
-**When to use**: After creating an app with prompt-part1.txt, or when adding/updating features
394
+
-**When to use**: After creating an app with example-app-1-create-app-template.txt, or when adding/updating features
395
395
-**What it does**: Creates or modifies the feature implementation with proper error handling, UI states, and best practices
396
396
-**Output**: A fully implemented feature page within the app structure
397
397
398
-
### prompt-part3.txt
398
+
### example-app-3-fix-ui.txt
399
399
-**Purpose**: Apply styling changes to the given example app if possible to ensure styling consistency with other example apps
400
-
-**When to use**: After running prompt-part2.txt to implement a feature
400
+
-**When to use**: After running example-app-2-add-feature.txt to implement a feature
401
401
-**What it does**: Modifies the example app's UI/UX to ensure that the app looks consistent with other example apps
402
402
-**Output**: A fully implemented feature page within the app structure with consistent UI/UX looks.
403
403
404
-
### prompt-part4.txt
404
+
### example-app-4-testing.txt
405
405
-**Purpose**: Tests, validates, and fixes issues in the implementation
406
-
-**When to use**: After running prompt-part2.txt to implement a feature
406
+
-**When to use**: After running example-app-2-add-feature.txt to implement a feature
407
407
-**What it does**: Runs tests, checks coverage, builds the app, and fixes any detected issues
408
408
-**Output**: A tested, validated feature ready for use
409
409
410
410
**Typical Workflow:**
411
-
1. Use prompt-part1.txt to create a new app (only once per app)
412
-
1. Use prompt-part2.txt to implement each feature in the app
413
-
1. Use prompt-part3.txt to fix the app's UI/UX styling and make it look consistent to other example apps.
414
-
1. Use prompt-part4.txt after each feature implementation to test and validate
411
+
1. Use example-app-1-create-app-template.txt to create a new app (only once per app)
412
+
1. Use example-app-2-add-feature.txt to implement each feature in the app
413
+
1. Use example-app-3-fix-ui.txt to fix the app's UI/UX styling and make it look consistent to other example apps.
414
+
1. Use example-app-4-testing.txt after each feature implementation to test and validate
415
415
1. Once you've generated the example app or feature, you should manually review the implementation and the UI. It's likely you will need to make some manual adjustments to get the app to function and look like our other example apps because the cursor can not reliably get it 100% correct.
416
416
1. Once you're happy with your example app or feature, you need to [re-run the tutorial generation prompt](#generating-tutorials-and-metadata-with-cursor) for your example app before creating your PR so the new example app or feature is piped into the docs site with it's corresponding tutorial.
417
417
@@ -507,7 +507,7 @@ If this happens you will need to log into the Netlify site, check the error and
507
507
508
508
# Generating tutorials and metadata with cursor
509
509
510
-
Whenever you add a new example app, or update an existing example app, you can use the prompts in the `prompt.txt` files in each `examples/product` folder to generate the tutorials and metadata for the example apps using Cursor AI.
510
+
Whenever you add a new example app, or update an existing example app, you can use the prompts in the `tutorial-generation-prompt.txt` files in each `examples/product/_prompts` folder to generate the tutorials and metadata for the example apps using Cursor AI.
511
511
512
512
These AI generated tutorials and metadata files are then piped through to the docs site in the CI/CD pipeline, where they are used to display the example apps and their code walkthroughs. If you don't follow these steps, your example app will not be displayed on the docs site.
513
513
@@ -520,7 +520,7 @@ Follow these steps to generate the tutorials and metadata for the example apps:
520
520
1. Delete the existing tutorial.md and metadata.json files in the example app you are wanting to generate the tutorials and metadata for.
521
521
2. Open the Composer window in Cursor IDE (Claude 3.7-sonnet-thinking).
522
522
3. Press the `+` button clear the context of the composer window.
523
-
4. Open the `prompt.txt` file in the examples/product folder you are wanting to generate the tutorials and metadata for e.g. `examples/passport/prompt.txt`.
523
+
4. Open the `tutorial-generation-prompt.txt` file in the examples/product/_prompts folder you are wanting to generate the tutorials and metadata for e.g. `examples/passport/_prompts/tutorial-generation-prompt.txt`.
524
524
5. Copy and pate the prompt into the composer window, or attach it as a file.
525
525
6. After adding the prompt, in the composer window, type `app name: <name of the example app>` e.g. `app name: login-with-nextjs` where the app name is the folder name of the example app in the examples/product folder you are wanting to generate the tutorials and metadata for.
526
526
7. Press enter and let the AI generate the tutorials and metadata.
0 commit comments