> For the complete documentation index, see [llms.txt](https://docs.riff.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.riff.ai/reference/app-builder/riff-environment.md).

# Riff environment

Every Riff app has two environments that are completely independent.

| Environment     | Purpose                                                              |
| --------------- | -------------------------------------------------------------------- |
| **Development** | Your private build workspace. Changes here do not affect live users. |
| **Production**  | The live environment. Becomes active when you deploy.                |

Development and production have separate databases, separate environment variables, and separate secrets values. You can point a secret (e.g. your ERP API key) to a test endpoint in development and the live endpoint in production.

## How apps are built

Riff apps use the following stack — the Riff agent manages all of this for you:

| Layer    | Technology              |
| -------- | ----------------------- |
| Frontend | React + TypeScript      |
| Backend  | Python + FastAPI        |
| Database | PostgreSQL (serverless) |

You describe what you want to build. The Riff agent writes, tests, and deploys the code. You do not need to know the technology stack.

## File structure

| Location                   | What lives there                      |
| -------------------------- | ------------------------------------- |
| `frontend/src/pages/`      | One file per page (route) in your app |
| `frontend/src/components/` | Reusable UI components                |
| `backend/app/apis/`        | Backend API endpoints                 |
| `backend/app/libs/`        | Shared backend logic                  |

## Notes

* You do not need to manage infrastructure or hosting — the platform handles these.&#x20;
* The Riff agent connects to external systems through [Secrets](/reference/shared/secrets.md) and [Integrations](/reference/shared/integrations.md).
* Runtime output and errors are visible in [Logs](/reference/app-builder/logs.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.riff.ai/reference/app-builder/riff-environment.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
