> 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/archive/features-legacy-databutton-web-app-builder/workspace-features/code-editor.md).

# Code Editor

What it is: The Code Editor provides direct access to your app's source code. While the AI agent typically handles code changes, you can view and manually edit files when needed.

How to access: Click the Code Editor tab in the workspace topbar.

Key features:

* File browser: Navigate all frontend and backend files
* Syntax highlighting: Full code editing with proper highlighting
* Manual editing: Make changes the agent can't or shouldn't make
* Agent restrictions: Control which files the agent can modify
* Auth toggle: Enable/disable authentication for pages and APIs

File structure:

* frontend/src/pages/ - React pages (one file per route)
* frontend/src/components/ - Reusable UI components
* frontend/src/utils/ - Frontend utility functions
* backend/app/apis/ - API endpoints
* backend/app/libs/ - Backend utility modules

How to use:

1. Browse files in the left sidebar
2. Click a file to view or edit it
3. Changes save automatically
4. Hot-reloading updates your preview in real-time

Tips:

* Let the agent handle most code changes - it's faster and safer
* Use the editor to review what the agent built
* Manual edits are useful for fine-tuning or emergency fixes

The three-dot menu next to files lets you toggle authentication


---

# 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/archive/features-legacy-databutton-web-app-builder/workspace-features/code-editor.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.
