Skip to content

Commit 1acbb81

Browse files
Add AI scaffolding setup (#195)
* Add AI scaffolding setup * Rename the folder to `prompt-scaffolding`, rename `demo-sketch` to `template` and move it out of `docs` * Add more details to introduction and update README.md * Update tutorials/ai/prompt-scaffolding/README.md Co-authored-by: Vladimir Ikryanov <[email protected]> * Update tutorials/ai/prompt-scaffolding/README.md Co-authored-by: Vladimir Ikryanov <[email protected]> * Update tutorials/ai/prompt-scaffolding/README.md Co-authored-by: Vladimir Ikryanov <[email protected]> --------- Co-authored-by: Vladimir Ikryanov <[email protected]>
1 parent 951988d commit 1acbb81

File tree

8 files changed

+1652
-0
lines changed

8 files changed

+1652
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
This setup allows you to scaffold a Java desktop app with JxBrowser for the
2+
webview, a React UI (with shadcn/ui), and Protobuf/gRPC for communication
3+
between Java and JavaScript.
4+
5+
## Prerequisites
6+
7+
- Java 17 or higher
8+
- [Node.js](https://nodejs.org/en/download) 20.11.0 or higher
9+
- [Cursor](https://cursor.com/)
10+
- Claude 4 Sonnet
11+
12+
## How to use
13+
14+
Download the [`docs`](docs) and [`template`](template)
15+
directories and put them into an empty project.
16+
17+
Add the [`architecture-overview.md`](docs/architecture-overview.md)
18+
document to the context for a new project in Cursor, and ask the LLM to
19+
generate the app using the prompt below:
20+
21+
![Paste the prompt in Cursor](img/paste-prompt-in-cursor.png)
22+
23+
```markdown
24+
Please read and analyse the architecture in architecture-overview.md we've used
25+
in our previous project, and let's create a new demo project from it.
26+
27+
Let's create a simple desktop application with the functionality of a basic
28+
filesystem viewer. The front-end part will be responsible for displaying the
29+
file system structure, like folders and files. The backend part will access the
30+
Java filesystem API and provide the data to the front-end.
31+
```
32+
33+
## How to run
34+
35+
When all the project files are generated, you can start the app by first running
36+
the Vite dev server:
37+
38+
```bash
39+
cd web-app
40+
npm run dev
41+
```
42+
43+
Then, in another terminal, launch the application itself:
44+
45+
```bash
46+
./gradlew run
47+
```
48+
49+
You should see the desktop app window with shadcn/ui (React) that allows viewing
50+
local files/folders and navigating through them:
51+
52+
![FileViewer](img/file-viewer.png)
53+
54+
After the application successfully started, you can remove the [`docs`](docs)
55+
and [`template`](template) directories.

0 commit comments

Comments
 (0)