Skip to content

Commit

Permalink
feat: pick up the URL variables at the start of the app
Browse files Browse the repository at this point in the history
* chore: remove reference to ui.json in documentation
  • Loading branch information
FabienArcellier committed Sep 14, 2024
1 parent a4cc175 commit 59eb132
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docs/framework/backend-driven-ui.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ title: "Backend-driven UI"

Framework facilitates backend-initiated user interface modifications. These changes are made possible through **Code-Managed Components** (CMCs), distinct from the *Builder-Managed Components* (BMCs).

CMCs, unlike BMCs, are dynamically created and modified via back-end code, and cannot be edited (but still can be viewed) within the application builder. It's important to also note that CMCs do not persist in your application's `ui.json` file and exist only during the application runtime, supporting dynamic UI adjustments.
CMCs, unlike BMCs, are dynamically created and modified via back-end code, and cannot be edited (but still can be viewed) within the application builder. It's important to also note that CMCs do not persist in your application's files and exist only during the application runtime, supporting dynamic UI adjustments.

<Note>
To summarise:

**CMC** – Code-Managed Component
- created via **application back-end**;
- **cannot be edited** in builder;
- is **not saved** to `ui.json`.
- is **not saved** to `.wf/components-*.jsonl`.

**BMC** – Builder-Managed Component
- created via **builder**;
- **can be edited** in builder;
- is **saved** to `ui.json`.
- is **saved** to `.wf/components-*.jsonl`.
</Note>

## UI manager
Expand Down
2 changes: 1 addition & 1 deletion docs/framework/builder-basics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Builder basics"
---

Framework Builder works as an overlay of the running app; you edit your app while it's running. It gives you an accurate representation of what the app will look like and how it'll behave, without the need to constantly preview it. Changes to the user interface are automatically saved to `ui.json`.
Framework Builder works as an overlay of the running app; you edit your app while it's running. It gives you an accurate representation of what the app will look like and how it'll behave, without the need to constantly preview it. Changes to the user interface are automatically saved into `.wf/` folders.

## Modes

Expand Down
2 changes: 1 addition & 1 deletion docs/framework/custom-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Framework uses Uvicorn and serves the app in the root path i.e. `/`. If you need
## Configure webserver

You can tune your server by adding a `server_setup.py` file to the root
of your application, next to the `main.py` and `ui.json` files.
of your application, next to the `main.py` files.

This file is executed before starting writer. It allows you to configure [authentication](./authentication.md),
add your own routes and middlewares on FastAPI.
Expand Down
2 changes: 1 addition & 1 deletion docs/framework/deploy-with-docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You can use Docker to deploy Framework anywhere. If you're an experienced Docker
</Step>
</Steps>

A Dockerfile is a file with instructions that tell Docker how to build your image. It must be named `Dockerfile`. You can use the following as-is, or as a starting point. It should be saved in your app's folder, together with `main.py` and `ui.json`.
A Dockerfile is a file with instructions that tell Docker how to build your image. It must be named `Dockerfile`. You can use the following as-is, or as a starting point. It should be saved in your app's folder, together with `main.py` and `.wf/`.

```docker
FROM python:3.10-bullseye
Expand Down
4 changes: 2 additions & 2 deletions docs/framework/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ writer create testapp
A Framework app is a folder with the following items.

1. `main.py` - The entry point for the app. You can import anything you need from here.
2. `ui.json` - Contains the UI component declarations. Maintained by the Writer Framework's visual editor.
2. `.wf/` - This folder contains the UI component declarations. Maintained by the Writer Framework's visual editor.
3. `static/` - This folder contains front-end static files which you might want to distribute with your app. For example, images and stylesheets.

## Start the editor
Expand Down Expand Up @@ -90,4 +90,4 @@ Writer provides a quick and fast way to deploy your apps via the [Writer cloud](
writer deploy <my_app_name>
```

You’ll be asked to enter your API key. To find your key, log in to your [AI Studio account](https://app.writer.com/aistudio) and either create a new framework app by going through the create app workflow or choose an existing framework app from your home screen. For other deployment options, see [Deploy with Docker](/framework/deploy-with-docker).
You’ll be asked to enter your API key. To find your key, log in to your [AI Studio account](https://app.writer.com/aistudio) and either create a new framework app by going through the create app workflow or choose an existing framework app from your home screen. For other deployment options, see [Deploy with Docker](/framework/deploy-with-docker).

0 comments on commit 59eb132

Please sign in to comment.