developers

District developer platform

Build on District.

Create and host your commerce application on the District platform. Push your code; District builds and runs it.

Read the docsdistrict login
district
$ district login
Open https://…/device and confirm the code XVGT-PBQF.
Logged in as khoi@example.com in District Inc (org_01K2…)
$ district repo create storefront --clone
created storefront (repo_01K5D2…)
cloning into ./storefront
$ git push
 * [new branch]      main -> main
$ district app create
created storefront (happ_01K5D3…)
$ district deploy --yes
build hbld_01K5D4… started
checkout  succeeded    3 s
install   succeeded    9 s
build     succeeded   14 s
bundle    succeeded    2 s
export    succeeded    1 s
deployment hdep_01K5D4… succeeded
https://storefront.ondistrict.net/
   /\  __
  ( o  o )  Sage: woof!
   '-(@)-'

Push, deploy, done

The git credential helper signs each push with a short-lived token. district deploy then builds the commit on District and serves it on your-app.ondistrict.net over HTTPS. No CI to configure, no token to rotate.

Previews, promotions, rollbacks

Every build can serve on a preview target with its own URL. A promotion deploys the preview's build to the primary target with no rebuild. Pointing a target at an earlier deployment rolls it back in seconds.

Your domain, your certificate

district domain add prints the DNS records to publish. District verifies the domain, issues its certificate, and renews it, so shop.example.com serves the same deployment as the target.