Skip to content

Commit 4ba0bf4

Browse files
docs(ui): update README (#5473)
## What type of PR is this? (check all applicable) - [ ] Refactor - [ ] Feature - [ ] Bug Fix - [ ] Optimization - [x] Documentation Update - [ ] Community Node Submission ## Description Update UI README ## Merge Plan This PR can be merged when approved <!-- A merge plan describes how this PR should be handled after it is approved. Example merge plans: - "This PR can be merged when approved" - "This must be squash-merged when approved" - "DO NOT MERGE - I will rebase and tidy commits before merging" - "#dev-chat on discord needs to be advised of this change when it is merged" A merge plan is particularly important for large PRs or PRs that touch the database in any way. -->
2 parents 6a2856e + 5e4daf4 commit 4ba0bf4

File tree

4 files changed

+45
-164
lines changed

4 files changed

+45
-164
lines changed

docs/contributing/contribution_guides/contributingToFrontend.md

Lines changed: 0 additions & 76 deletions
This file was deleted.

docs/contributing/contribution_guides/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To get started, take a look at our [new contributors checklist](newContributorCh
1212
Once you're setup, for more information, you can review the documentation specific to your area of interest:
1313

1414
* #### [InvokeAI Architecure](../ARCHITECTURE.md)
15-
* #### [Frontend Documentation](./contributingToFrontend.md)
15+
* #### [Frontend Documentation](https://github.com/invoke-ai/InvokeAI/tree/main/invokeai/frontend/web)
1616
* #### [Node Documentation](../INVOCATIONS.md)
1717
* #### [Local Development](../LOCAL_DEVELOPMENT.md)
1818

Lines changed: 43 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,51 @@
1-
# InvokeAI Web UI
1+
# Invoke UI
22

33
<!-- @import "[TOC]" {cmd="toc" depthFrom=1 depthTo=6 orderedList=false} -->
44

55
<!-- code_chunk_output -->
66

7-
- [InvokeAI Web UI](#invokeai-web-ui)
7+
- [Invoke UI](#invoke-ui)
88
- [Core Libraries](#core-libraries)
9-
- [Redux Toolkit](#redux-toolkit)
10-
- [Socket\.IO](#socketio)
11-
- [Chakra UI](#chakra-ui)
12-
- [KonvaJS](#konvajs)
13-
- [Vite](#vite)
14-
- [i18next & Weblate](#i18next--weblate)
15-
- [openapi-typescript](#openapi-typescript)
16-
- [reactflow](#reactflow)
17-
- [zod](#zod)
18-
- [Client Types Generation](#client-types-generation)
199
- [Package Scripts](#package-scripts)
10+
- [Client Types Generation](#client-types-generation)
2011
- [Contributing](#contributing)
12+
- [Localization](#localization)
2113
- [Dev Environment](#dev-environment)
22-
- [VSCode Remote Dev](#vscode-remote-dev)
23-
- [Production builds](#production-builds)
14+
- [VSCode Remote Dev](#vscode-remote-dev)
2415

2516
<!-- /code_chunk_output -->
2617

27-
The UI is a fairly straightforward Typescript React app.
28-
2918
## Core Libraries
3019

31-
InvokeAI's UI is made possible by a number of excellent open-source libraries. The most heavily-used are listed below, but there are many others.
32-
33-
### Redux Toolkit
34-
35-
[Redux Toolkit] is used for state management and fetching/caching:
36-
37-
- `RTK-Query` for data fetching and caching
38-
- `createAsyncThunk` for a couple other HTTP requests
39-
- `createEntityAdapter` to normalize things like images and models
40-
- `createListenerMiddleware` for async workflows
41-
42-
We use [redux-remember] for persistence.
43-
44-
### Socket\.IO
45-
46-
[Socket.IO] is used for server-to-client events, like generation process and queue state changes.
47-
48-
### Chakra UI
49-
50-
[Chakra UI] is our primary UI library, but we also use a few components from [Mantine v6].
51-
52-
### KonvaJS
53-
54-
[KonvaJS] powers the canvas. In the future, we'd like to explore [PixiJS] or WebGPU.
55-
56-
### Vite
20+
Invoke's UI is made possible by a number of excellent open-source libraries. The most heavily-used are listed below, but there are many others.
5721

58-
[Vite] is our bundler.
22+
- [Redux Toolkit]
23+
- [redux-remember]
24+
- [Socket.IO]
25+
- [Chakra UI]
26+
- [KonvaJS]
27+
- [Vite]
28+
- [openapi-typescript]
29+
- [reactflow]
30+
- [zod]
5931

60-
### i18next & Weblate
61-
62-
We use [i18next] for localization, but translation to languages other than English happens on our [Weblate] project. **Only the English source strings should be changed on this repo.**
63-
64-
### openapi-typescript
65-
66-
[openapi-typescript] is used to generate types from the server's OpenAPI schema. See TYPES_CODEGEN.md.
67-
68-
### reactflow
32+
## Package Scripts
6933

70-
[reactflow] powers the Workflow Editor.
34+
See `package.json` for all scripts.
7135

72-
### zod
36+
Run with `pnpm <script name>`.
7337

74-
[zod] schemas are used to model data structures and provide runtime validation.
38+
- `dev`: run the frontend in dev mode, enabling hot reloading
39+
- `build`: run all checks (madge, eslint, prettier, tsc) and then build the frontend
40+
- `typegen`: generate types from the OpenAPI schema (see [Client Types Generation])
41+
- `lint:madge`: check frontend for circular dependencies
42+
- `lint:eslint`: check frontend for code quality
43+
- `lint:prettier`: check frontend for code formatting
44+
- `lint:tsc`: check frontend for type issues
45+
- `lint`: run all checks concurrently
46+
- `fix`: run `eslint` and `prettier`, fixing fixable issues
7547

76-
## Client Types Generation
48+
### Client Types Generation
7749

7850
We use [openapi-typescript] to generate types from the app's OpenAPI schema.
7951

@@ -88,27 +60,17 @@ python scripts/invokeai-web.py
8860
pnpm typegen
8961
```
9062

91-
## Package Scripts
92-
93-
See `package.json` for all scripts.
63+
## Contributing
9464

95-
Run with `pnpm <script name>`.
65+
Thanks for your interest in contributing to the Invoke Web UI!
9666

97-
- `dev`: run the frontend in dev mode, enabling hot reloading
98-
- `build`: run all checks (madge, eslint, prettier, tsc) and then build the frontend
99-
- `typegen`: generate types from the OpenAPI schema (see [Client Types Generation](#client-types-generation))
100-
- `lint:madge`: check frontend for circular dependencies
101-
- `lint:eslint`: check frontend for code quality
102-
- `lint:prettier`: check frontend for code formatting
103-
- `lint:tsc`: check frontend for type issues
104-
- `lint`: run all checks concurrently
105-
- `fix`: run `eslint` and `prettier`, fixing fixable issues
67+
We encourage you to ping @psychedelicious and @blessedcoolant on [discord] if you want to contribute, just to touch base and ensure your work doesn't conflict with anything else going on. The project is very active.
10668

107-
## Contributing
69+
### Localization
10870

109-
Thanks for your interest in contributing to the InvokeAI Web UI!
71+
We use [i18next] for localization, but translation to languages other than English happens on our [Weblate] project.
11072

111-
We encourage you to ping @psychedelicious and @blessedcoolant on [discord] if you want to contribute, just to touch base and ensure your work doesn't conflict with anything else going on. The project is very active.
73+
**Only the English source strings should be changed on this repo.**
11274

11375
### Dev Environment
11476

@@ -118,23 +80,19 @@ From `invokeai/frontend/web/` run `pnpm i` to get everything set up.
11880

11981
Start everything in dev mode:
12082

121-
1. Start the dev server: `pnpm dev`
122-
2. Start the InvokeAI Nodes backend: `python scripts/invokeai-web.py # run from the repo root`
83+
1. From `invokeai/frontend/web/`: `pnpm dev`
84+
2. From repo root: `python scripts/invokeai-web.py`
12385
3. Point your browser to the dev server address e.g. <http://localhost:5173/>
12486

125-
#### VSCode Remote Dev
126-
127-
We've noticed an intermittent issue with the VSCode Remote Dev port forwarding. If you use this feature of VSCode, you may intermittently click the Invoke button and then get nothing until the request times out. Suggest disabling the IDE's port forwarding feature and doing it manually via SSH:
128-
129-
`ssh -L 9090:localhost:9090 -L 5173:localhost:5173 user@host`
87+
### VSCode Remote Dev
13088

131-
### Production builds
89+
We've noticed an intermittent issue with the VSCode Remote Dev port forwarding. If you use this feature of VSCode, you may intermittently click the Invoke button and then get nothing until the request times out.
13290

133-
For a number of technical and logistical reasons, we need to commit UI build artefacts to the repo.
91+
We suggest disabling the IDE's port forwarding feature and doing it manually via SSH:
13492

135-
If you submit a PR, there is a good chance we will ask you to include a separate commit with a build of the app.
136-
137-
To build for production, run `pnpm build`.
93+
```sh
94+
ssh -L 9090:localhost:9090 -L 5173:localhost:5173 user@host
95+
```
13896

13997
[node]: https://nodejs.org/en/download/
14098
[pnpm]: https://github.com/pnpm/pnpm
@@ -143,12 +101,11 @@ To build for production, run `pnpm build`.
143101
[redux-remember]: https://github.com/zewish/redux-remember
144102
[Socket.IO]: https://github.com/socketio/socket.io
145103
[Chakra UI]: https://github.com/chakra-ui/chakra-ui
146-
[Mantine v6]: https://v6.mantine.dev/
147104
[KonvaJS]: https://github.com/konvajs/react-konva
148-
[PixiJS]: https://github.com/pixijs/pixijs
149105
[Vite]: https://github.com/vitejs/vite
150106
[i18next]: https://github.com/i18next/react-i18next
151107
[Weblate]: https://hosted.weblate.org/engage/invokeai/
152108
[openapi-typescript]: https://github.com/drwpow/openapi-typescript
153109
[reactflow]: https://github.com/xyflow/xyflow
154110
[zod]: https://github.com/colinhacks/zod
111+
[Client Types Generation]: #client-types-generation

invokeai/frontend/web/docs/WORKFLOWS_DESIGN_IMPLEMENTATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
- [Primitive Types](#primitive-types)
2424
- [Complex Types](#complex-types)
2525
- [Collection Types](#collection-types)
26-
- [Polymorphic Types](#polymorphic-types)
26+
- [Collection or Scalar Types](#collection-or-scalar-types)
2727
- [Optional Fields](#optional-fields)
2828
- [Building Field Input Templates](#building-field-input-templates)
2929
- [Building Field Output Templates](#building-field-output-templates)

0 commit comments

Comments
 (0)