# Work with project code

Source: https://layerwise.app/docs/build-your-app/code-and-github

Edit the local workspace, export it, or create a connected GitHub repository.

Layerwise keeps each project's source in a local workspace. Assistant changes and changes you make yourself use those same files.

## Use the built-in editor [#use-the-built-in-editor]

1. Open **Preview actions** in the preview header.
2. Choose **Open in** → **Built-in editor**.
3. Select a file, make the edit, and save it.
4. Open the **Built-in editor** menu at the top of the editor, choose **Preview**, and refresh the app.

![Built-in editor showing the project file tree and source code](/docs/screenshots/editor.webp)

_Select a file in the tree to edit the same source used by the local preview._

The file tree supports creating, renaming, and deleting files or folders. Markdown files can be previewed. Binary files and files larger than 10 MB cannot be edited inline.

## Open the workspace elsewhere [#open-the-workspace-elsewhere]

**Preview actions** → **Open in** also lists supported installed editors, terminals, and file managers. Select one to open the same local workspace in that app.

![Open in menu listing the browser, the built-in editor, and installed editors, terminals, and file manager](/docs/screenshots/open-in.webp)

_Open in lets you choose the built-in editor or an installed app for the project workspace._

If an app is not listed, use a listed file manager to open the workspace folder.

## Export a project [#export-a-project]

Open the project switcher at the top of the project sidebar and choose **Export ZIP** to save a ZIP archive of the current local workspace.

![Project switcher menu with Unstar project, Fork project, Export ZIP, and New project](/docs/screenshots/project-menu.webp)

_The project switcher at the top of the project sidebar also holds Fork project and Export ZIP._

## Connect GitHub [#connect-github]

1. If you have not connected GitHub yet, open **Account** from the user menu and select **Connect GitHub**.
2. Choose **Settings** at the bottom of the project sidebar, then **GitHub**.
3. Choose the owner, repository name, description, homepage, and visibility.
4. Select **Create repository**.

Layerwise creates and connects the repository. The page then shows **Repository**, where you can open the repository, change its settings, or select **Disconnect repository**. Disconnecting removes the project link; it does not delete the GitHub repository.
