drift Docs
Pages
drift Docs
Start
What is Drift?
The tour, if you are new here.
Use cases
Whether Drift does your thing.
Getting started
Nothing to deployed, in one command.
Architecture
How a slice is put together.
What it costs
The free grant, four unit prices, two rules.
Moving off Azure
Estimate, snapshot and transform a resource group.
Build
Canvas
Static sites, same origin as your API.
Tools
Operate
Auth
Route gates, API keys and your account.
Teams
More than one person on one account.
Security
Boundaries, sandboxing and hardening.
Troubleshooting
Error codes
What went wrong, and what to do about it.
Legal
Acceptable use
What a slice may not be used for.
Data processing
The DPA, and every sub-processor.

Use cases

Five questions people tend to arrive with, and the path each one takes. Every path below ends in something running on a real slice, so you can follow one to a URL rather than to a diagram.

Put an API, a database and a site online without running a server

The problem. You have a small application: a page, an API behind it, and somewhere to keep the data. Getting that online usually means a web server, a database to provision, a reverse proxy in front, a certificate to renew, and CORS rules between the frontend and the API.

On Drift. All three live in one slice and share one origin. Your page fetches /api/messages with no cross-origin request, because there is no second origin. Nothing is provisioned and nothing is renewed.

The piece What runs it
The APIAtomic, one flat source file per function
The dataBackbone, SQL or NoSQL, already there
The pageCanvas, same origin as the API

The path. Getting started builds exactly this, a guestbook with a form, an API and a database, from an empty folder to a public URL. It is the shortest complete path on Drift and the one to walk first.

From there, Write a function covers the handler shape, SQL and NoSQL cover the two data models, and Canvas covers serving the page.

Move a workload off Azure, and see the bill first

The problem. You are running Function Apps with a Cosmos or Storage account behind them, the monthly cost is hard to attribute, and any migration proposal starts with a rewrite you cannot justify.

On Drift. drift migrate azure reads your resource group without changing anything, prices the same workload on Drift, and can then produce a deployable project from it. The read-only stages are safe to run against production on the first day, because nothing in the pipeline writes to Azure.

CommandWhat it does
  • 1
    Command
    drift migrate azure estimate -g <group>
    What it does
    Prices the group as it stands, against what it would cost here
  • 2
    Command
    drift migrate azure snapshot -g <group>
    What it does
    Exports the group to a portable azure_export/ folder, read-only
  • 3
    Command
    drift migrate azure transform
    What it does
    Turns that export into a deployable drift_workspace/ with a Driftfile in it, fully offline
  • 4
    Command
    drift migrate azure apply
    What it does
    Runs drift apply from the workspace: it creates the slice the Driftfile names and deploys into it, asking before the price and anything it removes

The path. Start at step 1 on a group you already own. It answers the cost question on its own, and it commits you to nothing: steps 1 and 2 only read, and step 3 does not need a network at all. After step 3, review REPORT.md and run drift plan in the workspace to see the platform's quote for the generated Driftfile before step 4 agrees to it. The full command surface is in the CLI reference.

The estimate is a comparison, not a quote

It prices your Azure group against Drift's four unit prices. What you actually pay is the shape the Driftfile declares, quoted by drift plan and agreed to by drift apply, and What it costs is the authority on how that number is built.

Ship a verifiable identity app that outlives its vendor

The problem. You are building something where identity is the product rather than a login screen: a credential wallet, a device-bound account, an app that must keep working if you stop paying whoever hosts it. An identity provider you rent is the one dependency you cannot afford.

On Drift. Deed is a peer of the other three services, not a bolt-on. Every primitive is called from your own functions through the SDK, against your own slice. There is no identity provider to register with and no account anywhere but yours.

Primitive What it covers
KeyAuthPasswordless login with a device key pair
LinkEnrolling a second device by signed attestation
PocketEnd-to-end encrypted data that follows an identity between devices
VaultA recovery blob the slice itself cannot read
JWTTokens signed and verified with your slice's own key

The path. Read Deed for how the five fit together, then build the login with KeyAuth and add a second device with Link. The client half of the encryption is e2ee.js, a zero-dependency ES module you copy into your own JavaScript, described on the Deed page.

Encrypt before you call

Vault's and Pocket's guarantees hold only if the data is encrypted on the device first. Both store what you hand them, and neither can read it, which is the point and also the responsibility.

Why it survives you leaving. Everything above runs inside your slice, and drift slice snapshot download gives you the whole thing back: the source with every Drift-generated wrapper stripped out, the data, the identities and the site. That is the same property the migration path above relies on, pointed the other way.

Build it, ship it, hand it over

The problem. You build applications for other people. Every client is a small app that has to live somewhere for years, and each one quietly makes you their infrastructure department: their hosting bill, their certificate renewal, their 2am page, long after the invoice was paid. Handing the work over properly usually means either running it forever or writing a migration document nobody reads.

On Drift. One slice per client. The slice is the unit of isolation, the unit of billing and the unit of handover, so a client's application never shares a database, a domain or a bill with another client's.

The question The answer
Where does each client's app live?Its own slice, its own data, its own domain
What does one cost?The shape you declared, no metering. Billing starts later. What it costs
What do you actually hand over?The running slice, with drift slice transfer offer, or a folder of their code and data with drift slice snapshot download
What if they leave you?They already have everything. Nothing to extract, nothing to negotiate

The path. Build the first one on Getting started, then give each client their own slice: drift apply creates it from that client's Driftfile, with the price shown first (drift file new writes it). When the engagement ends, hand it over one of two ways.

drift slice transfer offer <slice> --to <their-account> hands over the slice itself. Once they accept, the slice, its data, its custom domains and its bill are theirs. Nothing is copied and nothing goes down: it keeps running where it is, and it stops being yours. They see the tier, the price, and the address before and after, before they accept, and an offer they never answer expires after seven days.

drift slice snapshot download produces the handover artifact instead: their source with every Drift-generated wrapper stripped out, their database contents, their secrets and their site, in a plain tar.gz. It is a deliverable rather than an export, and it is the same command whether you are handing over, backing up or leaving.

A transferred slice takes the client's name, and a few things stay yours

Its default address moves to the client's name, and the address you used before redirects there for 30 days, then stops answering; custom domains don't change. You still know its secrets, its function API keys and its site password, and the client should rotate the ones they rely on. A slice linked to another slice, or with alerts set, cannot be transferred until those are removed. An account that already holds all three of its free slices cannot accept another.

Why the GDPR question gets easier. Your client's DPO will ask where the data sits and who can reach it. The answers are on one page you can send them rather than a conversation you have to have: Data processing has the agreement and the full sub-processor list, and it is short because the stack is genuinely European.

Give a coaching practice a website that turns visits into conversations

The problem. A coach, a consultant or a small practice sells a service built on trust. The site has to explain how the work goes, show who is behind it and turn a visit into a first conversation. What it usually becomes is a template site with a form plugin, a mailbox nobody checks and a cookie banner, hosted by a company you did not choose.

On Drift. The whole site is one slice. The pages are static, the contact form is one function, and the enquiries sit in your own data, so there is no plugin and no third-party form service in between.

The piece What runs it
The pages: home, programmes, about, testimonials, FAQ, contact and privacy, in two languagesCanvas, one site per language
The contact form, which doubles as the booking request, and the email to you for each enquiryAtomic, a handful of functions and a queue
The enquiries, and a private inbox where you answer, archive or erase themBackbone, one NoSQL collection
A weekly email listing enquiries still unanswered after five daysAtomic, one scheduled function

The path. Start from the coaching site starting point in the templates repository: a complete project with its pages, its functions and their tests. Run it on your own machine with drift file run, replace the placeholder words with yours, then drift plan and drift apply. The plan quotes the figure first, and for a site of this shape the pricing page shows €3.22 a month. To show it to someone before anything is real, drift apply demo makes a second slice from made-up values.

No cookies, no consent banner

The site sets no cookies and runs no analytics, so there is nothing to ask a visitor to agree to. The form records when the visitor agreed to their message being kept, and the inbox can erase it for the visitor who asks to be forgotten.

Why the data stays yours. Enquiries are personal data about the people who wrote to you. They sit in your slice, in Europe, and drift slice snapshot download gives you all of it back whenever you want it. Data processing has the agreement and the sub-processor list.