# Workspace and storage

> The one directory where Stuarty keeps your projects, media and exports, and how it is protected.

Source: https://stuarty.com/docs/workspace/

## You will learn

- what the workspace is and where it lives;
- what is inside it;
- why only one process writes to it at a time.

## The idea

Everything the program stores is in one directory, the workspace. It is `~/.stuarty` unless `STUARTY_HOME` says otherwise. Your original media is copied into it once and kept by content, so importing the same file twice adds nothing, and deleting a project never deletes your only copy of a file by surprise.

```text
<workspace>/
├── db.sqlite     projects, history, jobs, the calendar
├── vault.json    the encrypted credentials of your connections
├── library/      memory notes, prompts and skills
├── store/        the imported originals, by content hash
├── artifacts/    files derived from them: proxies, thumbnails, audio peaks
├── exports/      exported videos and images
├── recordings/   screen recordings waiting for you to add them
├── tools/        helpers you installed, such as transcription
├── frames/       cache of rendered frames (also bitmaps/ and audio-previews/)
├── backups/      copies of the database made before a migration
└── logs/
```

The full layout is in SDD-000 section 9 of the repository.

## One owner at a time

Exactly one process owns the workspace and writes to it: `stuarty serve`, or a `stuarty mcp` session when no server is running. Every other command, the editor and the agents talk to that owner over HTTP on your machine. A second process that cannot reach the owner fails with `E_WORKSPACE_LOCKED`, which is safe to retry.

## Common mistakes

- Copying the workspace while a server runs. Stop the server first, or copy only `exports/`.
- Expecting the trash to be a folder. Trash is a state in the database; the files stay where they are.

## Next steps

- [Projects](/docs/projects)
- [Configuration variables](/docs/reference/configuration)
