# Floor > An open platform for connected products: product backends in Rust (the `floor` crate), devices and MQTT, files, messages, sign-in, deploys. These are its public docs; every page is also Markdown at its URL plus `.md`. - [Introduction](/docs/index.md): Floor runs a product's backend, its devices, files, messages and sign-in, so a product team writes only its own logic. ## Start - [What Floor is](/docs/start/what-floor-is.md): What Floor gives a product, what you write, and what Floor runs for you. - [Install](/docs/start/install.md): Install the floor CLI, sign in, and set up Cargo and Postgres to build backends. - [Build your first backend](/docs/start/first-backend.md): Make a small gate backend with a table, two routes and a test, run it against Floor, and deploy it. ## Build - [Routes](/docs/build/routes.md): How files in api/ become HTTP routes, who may call them, what handlers take and return, and their limits. - [Triggers](/docs/build/triggers.md): Handle MQTT messages, device events, ticks, cron schedules, queue jobs and long-running tasks. - [The database](/docs/build/database.md): Use the project's Postgres from handlers, write SQL and Rust migrations, and check queries at build time. - [Floor from Cx](/docs/build/floor-from-cx.md): A tour of what a handler reaches through Cx: the caller, realtime, MQTT, devices, KV, queues, secrets, messages, files and AI. - [Realtime and permissions](/docs/build/realtime-and-permissions.md): Declare who may do what once in permissions.rs, check it on routes and in code, and publish typed realtime channels. - [WebSockets](/docs/build/websockets.md): Serve a WebSocket from a file in api/ with #[ws], checked like a route, and test it. - [The dashboard client](/docs/build/dashboard-client.md): Generate a typed TypeScript client, zod schemas and an OpenAPI document from the backend, so the dashboard and backend can't drift. - [The dev loop](/docs/build/dev-loop.md): Make a backend and its handlers with floor new, and run it against Floor with floor dev while you edit. - [Testing](/docs/build/testing.md): Test a backend's routes, triggers and sockets against a real Postgres and a fake Floor with floor test and TestApp. ## Ship - [Deploy a backend](/docs/ship/deploy.md): Ship a backend (and its dashboard) to Floor from your machine, then from GitHub on every push. - [Environments, rollback and promote](/docs/ship/environments.md): Run a staging copy of a product from its own branch, serve an earlier release again, and move a release to production. - [Sandbox and limits](/docs/ship/sandbox-and-limits.md): How Floor runs a deployed backend: its systemd sandbox, memory and CPU caps, outbound allow list, idle stop and wake, migrations and logs. ## Floor's services - [Devices and MQTT](/docs/services/devices-and-mqtt.md): Enrol a device with a claim code, connect it to Floor's MQTT broker, and hear it, command it and configure it from a backend. - [Files](/docs/services/files.md): Store photos, clips and firmware in Floor's blob storage, with signed URLs that browsers and devices use directly. - [Email, WhatsApp and push](/docs/services/messages.md): Send email, WhatsApp messages and push notifications from a backend with one call, using templates in English and Urdu. - [Sign-in](/docs/services/sign-in.md): Give a product its own users and its own sign-in pages on Floor Auth, and check who's calling in the backend. - [AI: models and OCR](/docs/services/ai.md): Ask a hosted language model and read text in images from a backend, with the project's key, limits and usage handled by Floor. ## Reference - [The floor crate](/docs/reference/crate.md): One crate for the framework, its build step, Floor's API client and the floor CLI: its features, prelude, macros and the files a backend needs. - [Cx](/docs/reference/cx.md): Every method of Cx, the handle a handler reaches its caller, its database and Floor's services through, and the types those methods take and return. - [App](/docs/reference/app.md): floor::App, what the build step generates from a backend's files, its methods, Auth, Limits, Permissions, and floor::run with its flags and environment variables. - [Handlers](/docs/reference/handlers.md): What a handler takes and returns: the extractors, the trigger inputs, the outputs, and #[derive(floor::Type)] with its options. - [Attributes](/docs/reference/attributes.md): Every handler attribute and what it takes, where each may live, how file paths become routes and trigger names, and the errors mistakes give. - [Errors](/docs/reference/errors.md): floor::Error and floor::Result: each variant and its HTTP status, OrNotFound, how sqlx and serde errors convert, and what an error does in a trigger. - [Testing](/docs/reference/testing.md): floor::testing::TestApp: a backend's handlers against a real Postgres and a fake Floor, with TestResponse and TestSocket. - [floor.toml](/docs/reference/floor-toml.md): Every key of floor.toml: the project, the [backend], [[sites]] and [[apps]], their defaults and limits, and how environments use the file. - [The floor CLI](/docs/reference/cli.md): Installing the floor command, signing in, and every command it has, grouped by what it's for.