# Architecture

<img src="https://1279989839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpaZ1oz0AW4dW6jE63vDO%2Fuploads%2Fn8hkGHnkVsiWtnzJALdZ%2Ffile.drawing.svg?alt=media&#x26;token=33fe79e1-192d-4ef2-889f-3c03bbe90e00" alt="" class="gitbook-drawing">

## Frontend

The frontend uses [Floem](https://github.com/lapce/floem) for the GUI of Lapce.

## Proxy

The `lapce-proxy` sub crate provides the interface between the frontend, and the file system, plugins and [LSP](https://microsoft.github.io/language-server-protocol/) servers, so Lapce talks to files, plugins, LSP servers through the proxy. The reason for that is to provide the ability for remote development. In remote development mode, the `lapce-proxy` binary runs on the remote host, to provide seamless code editing, project management and language interaction .

## File Editing

Here is the flow of a typical file editing process. When you open a file in the GUI, `lapce-app` talks to `lapce-proxy` which reads the file from local disk and responds with the content of the file. `lapce-app` stores the file content locally. `lapce-proxy` receives the change, and applies the change locally which make the file content in sync. When you save the file in the GUI, `lapce-app` sends the file save request to `lapce-proxy`, and `lapce-proxy` saves the file to the local disk.


---

# Agent Instructions: 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:

```
GET https://docs.lapce.dev/development/architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
