Skip to content

Commit 10b9535

Browse files
committed
add docs
1 parent 980a97d commit 10b9535

86 files changed

Lines changed: 7885 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/ai_builder/apis.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# API Integration
2+
3+
Not every service has a first-class integration — but your app can connect to **any external API** directly. By using standard HTTP requests, you can integrate with virtually any platform, fetch or send data, and trigger workflows without needing a prebuilt connector.
4+
5+
This gives you full flexibility to work with modern REST, GraphQL, or other web APIs.
6+
7+
## What You Can Do
8+
9+
With custom API calls, your app can:
10+
- Connect to **any REST or GraphQL API** on the web.
11+
- **Send and receive data** from external services.
12+
- Trigger actions like creating records, sending messages, or fetching analytics.
13+
- Build **custom automations** and workflows around APIs.
14+
- Chain API calls with other integrations or AI actions for powerful flows.
15+
16+
## Step 1: Get API Access
17+
18+
1. Identify the service you want to connect to.
19+
2. Check its developer documentation for API access requirements.
20+
3. Obtain the necessary credentials (e.g., **API key**, **token**, or **OAuth**).
21+
4. Store credentials securely using environment variables — **never** hardcode secrets.
22+
23+
*Example:*
24+
- **API Key:** `sk-xxxxxxxxxxxxxxxx`
25+
- **Base URL:** `https://api.example.com/v1/`
26+
27+
## Step 2: Hook up with your App
28+
29+
1. In the AI Builder navigate to the `secrets` tab and add your API credentials as secrets.
30+
2. Then prompt the AI to use these secrets to do what you want and it will install the necessary libraries and set up the API calls for you.
31+
32+
## Step 3: Notes
33+
34+
* **Keep secrets safe:** Use environment variables or secret storage for API keys.
35+
* **Check rate limits:** Many APIs have request limits — build accordingly.
36+
* **Combine with AI or other integrations:** For example, fetch data via API and summarize it using an LLM.
37+
38+
39+
With API integrations, you can connect your app to **almost any modern platform or service**, giving you unlimited extensibility beyond native integrations.
40+
41+
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Copy App
2+
3+
The **Copy** feature lets you duplicate an existing app inside Reflex Build.
4+
This is useful when you want to experiment with changes without affecting the original project, or when you want to use an app as a starting point for a new idea.
5+
6+
7+
```python exec
8+
import reflex as rx
9+
10+
def render_image():
11+
return rx.el.div(
12+
rx.image(
13+
src="https://web.reflex-assets.dev/ai_builder/app_lifecycle/copy_light.avif",
14+
class_name="p-2 rounded-md h-auto",
15+
border=f"0.81px solid {rx.color('slate', 5)}",
16+
),
17+
class_name="w-full flex flex-col rounded-md cursor-pointer",
18+
)
19+
```
20+
21+
```python eval
22+
23+
rx.el.div(render_image())
24+
25+
```
26+
27+
## How to Copy an App
28+
29+
1. In the Reflex Build workspace, click on the arrow down icon next to the deploy button and click on the **Copy** button. You can also do this in the Settings tab.
30+
2. Reflex Build will create a new app in your workspace with the same:
31+
- Code files and components
32+
- State and configuration
33+
- Dependencies
34+
35+
The copied app will appear as a separate project, independent from the original.
36+
37+
38+
## Common Use Cases
39+
40+
- **Experiment Safely**
41+
Try out new components, layouts, or integrations without risking your working app.
42+
43+
- **Create Variations**
44+
Use the original app as a base to quickly spin up a different version (e.g., a light and dark theme version).
45+
46+
- **Template Reuse**
47+
Turn an app into a personal template and copy it each time you start a new project.
48+
49+
## Best Practices
50+
51+
- Rename your copied app immediately so it’s easy to distinguish from the original.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Deploy App
2+
3+
```python exec
4+
import reflex as rx
5+
```
6+
7+
It is easy to deploy your app into production from Reflex Build to Reflex Cloud.
8+
9+
Simply click the `Deploy` button in the top right corner of Reflex Build, as shown below:
10+
11+
12+
13+
```python exec
14+
import reflex as rx
15+
16+
def render_image():
17+
return rx.el.div(
18+
rx.image(
19+
src="https://web.reflex-assets.dev/ai_builder/app_lifecycle/deploy_light.avif",
20+
class_name="p-2 rounded-md h-auto",
21+
border=f"0.81px solid {rx.color('slate', 5)}",
22+
),
23+
class_name="w-full flex flex-col rounded-md cursor-pointer",
24+
)
25+
```
26+
27+
```python eval
28+
29+
rx.el.div(render_image())
30+
31+
```
32+
33+
When deploying you can set the following options:
34+
- **App Name**: The name of your app
35+
- **Hostname**: Set your url by setting your hostname, i.e. if you set `myapp` as your hostname, your app will be available at `myapp.reflex.run`
36+
- **Region**: The regions where your app will be deployed
37+
- **VM Size**: The size of the VM where your app will be deployed
38+
- **Secrets**: The environment variables that will be set for your app, you can load the variables currently being used by your app by clicking the `Load from settings` button
39+
40+
Note: Hostname customization, region selection, and VM sizing are only available on paid plans.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Download App
2+
3+
You can download your Reflex Build project if you want to work on it locally or self-host it outside the AI Builder.
4+
5+
**Tip:** The recommended workflow is to use the GitHub integration, which keeps your code version-controlled and in sync. Downloading is useful if GitHub integration isn’t available or you just want a one-time export.
6+
7+
8+
```python exec
9+
import reflex as rx
10+
11+
def render_image():
12+
return rx.el.div(
13+
rx.image(
14+
src="https://web.reflex-assets.dev/ai_builder/app_lifecycle/download_light.avif",
15+
class_name="p-2 rounded-md h-auto",
16+
border=f"0.81px solid {rx.color('slate', 5)}",
17+
),
18+
class_name="w-full flex flex-col rounded-md cursor-pointer",
19+
)
20+
```
21+
22+
```python eval
23+
24+
rx.el.div(render_image())
25+
26+
```
27+
28+
## How to Download
29+
30+
1. In the AI Builder workspace, click on the arrow down icon next to the deploy button and click on the **Download** button. You can also do this in the Settings tab.
31+
2. A `.zip` file will be generated containing your entire Reflex app, including:
32+
- Source code (`.py` files, components, state, etc.)
33+
- `requirements.txt` with dependencies
34+
- Config files (`rxconfig.py`, `.env`, etc.)
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Fork App
2+
3+
The **Fork App** feature lets you take an existing app and create your own version of it. This is perfect for **experimenting, customizing, or building on top of someone else’s work** without affecting the original app.
4+
5+
```python exec
6+
import reflex as rx
7+
```
8+
9+
```python eval
10+
rx.el.div(
11+
rx.image(
12+
src="https://web.reflex-assets.dev/ai_builder/overview/fork_template_light.avif",
13+
class_name="p-2 rounded-md h-auto",
14+
border=f"0.81px solid {rx.color('slate', 5)}",
15+
),
16+
class_name="w-full flex flex-col rounded-md cursor-pointer",
17+
)
18+
```
19+
20+
21+
## How to Fork an App
22+
23+
1. Browse or open an app you’d like to use as a starting point.
24+
2. Click the **Fork** button in the app’s top right corner.
25+
3. The AI Builder will create a **copy of the app** in your workspace.
26+
4. You can now **edit, customize, and expand** your forked app independently of the original.
27+
28+
## What Happens When You Fork
29+
30+
- You get a **full copy** of the original app, including all pages, components, and configurations.
31+
- The forked app is **completely separate**, so changes you make do not affect the original.
32+
- You can **rename, deploy, or share** your forked app like any other app in your workspace.
33+
34+
## Common Use Cases
35+
36+
- **Start From an Example**
37+
Use a sample or shared app as a foundation to save time and learn best practices.
38+
39+
- **Experiment Safely**
40+
Try new ideas or features without risking changes to the original app.
41+
42+
- **Collaborate and Customize**
43+
Fork a teammate’s app to tailor it to your needs while keeping the original intact.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# General App Settings
2+
3+
The **General App Settings** section lets you manage key aspects of your app, including its name, ID, and deletion. This is your central place to view and update your app’s core information.
4+
5+
6+
```python exec
7+
import reflex as rx
8+
9+
def render_image():
10+
return rx.el.div(
11+
rx.image(
12+
src="https://web.reflex-assets.dev/ai_builder/app_lifecycle/general_light.avif",
13+
class_name="p-2 rounded-md h-auto",
14+
border=f"0.81px solid {rx.color('slate', 5)}",
15+
),
16+
class_name="w-full flex flex-col rounded-md cursor-pointer",
17+
)
18+
```
19+
20+
```python eval
21+
22+
rx.el.div(render_image())
23+
24+
```
25+
26+
27+
## How to Access Settings
28+
29+
1. In the AI Builder workspace, on the top bar click the more 3 dots icon and then click the **Settings** tab.
30+
2. This will open the **Settings** tab to see your app’s main settings.
31+
32+
## What You Can Do
33+
34+
- **Change App Name**
35+
Update the name of your app to reflect its purpose or version.
36+
37+
- **Change App Visibility**
38+
Update the visibility of your app to public or private.
39+
40+
- **View App ID**
41+
Find the unique identifier for your app, which can be used for integrations or support.
42+
43+
- **Fork App**
44+
Fork your app to create a copy of it.
45+
46+
-- **Download App**
47+
Download your app to your local machine.
48+
49+
- **Delete App**
50+
Permanently remove an app you no longer need. **Warning:** This action cannot be undone.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Share App
2+
3+
The **Share** feature makes it easy to show your app to others without deploying it.
4+
When you share, Reflex Build generates a unique link that points to the current version of your project in the builder.
5+
6+
```python exec
7+
import reflex as rx
8+
9+
def render_image():
10+
return rx.el.div(
11+
rx.image(
12+
src="https://web.reflex-assets.dev/ai_builder/app_lifecycle/share_light.avif",
13+
class_name="p-2 rounded-md h-auto",
14+
border=f"0.81px solid {rx.color('slate', 5)}",
15+
),
16+
class_name="w-full flex flex-col rounded-md cursor-pointer",
17+
)
18+
```
19+
20+
```python eval
21+
22+
rx.el.div(render_image())
23+
24+
```
25+
26+
## How to Share
27+
28+
1. In the AI Builder workspace, click on the arrow down icon next to the deploy button and click on the **Share** button.
29+
2. A popup will appear with a **shareable link**.
30+
3. Copy the link and send it to teammates, collaborators, or stakeholders.
31+
32+
33+
## What Others See
34+
35+
- The link opens a **read-only view** of your app generation.
36+
- Recipients can see the app preview but cannot make edits.
37+
- This makes it safe to share work-in-progress versions for quick feedback.
38+
39+
40+
## Common Use Cases
41+
42+
- **Get Feedback Quickly**
43+
Share a work-in-progress version with your team before deploying.
44+
45+
- **Demo Features**
46+
Send a link to showcase a new component, layout, or integration.
47+
48+
- **Collaboration**
49+
Share context with another developer before handing off to GitHub or download.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# AI Testing Feature
2+
3+
## Overview
4+
5+
The Testing feature allows you to automatically test your generated applications for common issues and functionality problems. The AI will analyze your app and identify potential bugs, broken links, navigation issues, and other problems.
6+
7+
8+
```python exec
9+
import reflex as rx
10+
```
11+
12+
```python eval
13+
rx.el.div(
14+
rx.image(
15+
src=rx.color_mode_cond(
16+
"https://web.reflex-assets.dev/ai_builder/features/test_light.webp",
17+
"https://web.reflex-assets.dev/ai_builder/features/test_dark.webp",
18+
),
19+
class_name="p-2 rounded-md h-auto",
20+
border=f"0.81px solid {rx.color('slate', 5)}",
21+
),
22+
class_name="w-full flex flex-col rounded-md cursor-pointer",
23+
)
24+
```
25+
26+
## How to Use
27+
28+
1. **Start Testing**: Type "test this app" or similar command to activate testing mode
29+
2. **AI Analysis**: The AI will automatically switch to testing mode and begin analyzing your application
30+
3. **Review Results**: The preview tab switches to "Testing" mode to show the testing process and results
31+
32+
## What Gets Tested
33+
34+
The AI automatically checks for:
35+
36+
- **Broken Navigation**: Links that don't work or lead to missing pages
37+
- **Non-functional Buttons**: Buttons that don't respond or trigger errors
38+
- **Broken Links**: External or internal links that return errors
39+
- **UI/UX Issues**: Interface elements that don't function as expected
40+
- **Data Flow Problems**: Issues with forms, inputs, and data handling
41+
- **Layout Issues**: Visual or structural problems with the interface
42+
43+
## Testing Interface
44+
45+
When testing is active:
46+
- The preview tab changes to "Testing" mode
47+
- You can see the AI interact with your application in real-time
48+
- Issues and results are reported as they're discovered
49+
- The testing process is visual and interactive
50+
51+
## Benefits
52+
53+
- **Quality Assurance**: Catch issues before deployment
54+
- **Time Saving**: Automated testing is faster than manual checking
55+
- **Comprehensive Coverage**: Tests multiple aspects of your application

0 commit comments

Comments
 (0)