> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ploterr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How Floorkit works

> One building document goes in. A 3D model, drawings and export files come out.

Floorkit keeps your building as one document. All other things are made from that document: the 3D model, the plan, the sheets and the export files. Thus you save one thing, and all views agree.

## The data flow

```mermaid theme={null}
flowchart LR
  A[Building model] --> B[Session]
  B --> C[3D model in your scene]
  B --> D[Views: plan, section, elevation]
  D --> E[Sheets]
  E --> F[PDF]
  C --> G[GLB]
  A --> H[Project file]
```

## The four parts

| Part | What it does | Main API |
| - | - | - |
| Building model | Holds the building as typed JSON data | [`validateBuildingModel`](/floorkit/api/architecture/validate-building-model) |
| Session | Builds the geometry, applies edits, keeps undo and redo | [`BuildingSession`](/floorkit/api/editor/building-session) |
| Views and sheets | Make drawings from the model and place them on paper | [`drawProjectView`](/floorkit/api/drawings/draw-project-view) |
| Exports | Give you a PDF, a GLB or a project file | [`exportProjectPdf`](/floorkit/api/exports/export-project-pdf) |

## The document is the source

The building model stores the design. A project file also keeps your named views and sheets. Floorkit makes the geometry again when you open that file.

* A change to the document changes the 3D model and each drawing.
* A change to a mesh in your scene changes nothing in the document. Do not edit meshes.
* You choose the id of each wall, door and room. Floorkit keeps these ids, so your app can find an element again.

## Two ways to make geometry

**With a document.** You write a [building model](/floorkit/concepts/building-model). Use `ProjectManager` for a product with editors, views, sheets, saving, and one history. It owns the `BuildingSession` that checks commands and builds geometry. Use a session directly when your app manages the other project data separately. See [Save and reopen](/floorkit/guides/save-and-reopen).

**With element classes.** You create objects such as `new Wall(...)` or `new Slab(...)` and add them to your scene. Use this way for one object or a small test. Your app must keep these objects, and Floorkit does not save them.

## What your app does

Floorkit does not make a page, a toolbar or a file dialog. Your app does these things:

* It makes the Three.js scene, the camera and the renderer.
* It starts the geometry kernel one time. See [Installation](/floorkit/installation).
* It stores project text from `manager.save()` or, for the direct-session route, `saveProject`.
* It connects its AI provider to validation and supported commands. See [Build with agents](/floorkit/agents/index).

## Next

<CardGroup cols={2}>
  <Card title="Building model" icon="building" href="/floorkit/concepts/building-model">
    Learn the structure of the document.
  </Card>

  <Card title="Editing and history" icon="clock-rotate-left" href="/floorkit/concepts/editing-and-history">
    Learn how a session applies an edit.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.