Deploy your first app
Complete installation and platform login first. This guide uses a test user with an owner verification attestation. It sends no email.
1. Download the source
Section titled “1. Download the source”mkdir -p my-countercurl -fsS https://docs.backend.fast/examples/simple-counter/backend.fast \ -o my-counter/backend.fastThis is the complete checked Counter example. It defines a model, protected create/list/increment routes, caching and an event. Read the source.
2. Deploy
Section titled “2. Deploy”Choose a fresh display name. Deleted names cannot be reused.
BF_APP="counter-$(date +%s)"bfast deploy --name "$BF_APP" --tier small ./my-counterbfast apps listbfast inspect --json "$BF_APP"Creation waits for public HTTPS health. The CLI prints an operation ID. The
same owned app appears in the dashboard.
Its hostname uses two random words and six hex characters. Read its URL from
inspect; the display name does not determine the URL.
3. Create an app user
Section titled “3. Create an app user”bfast users create --app "$BF_APP" \ --email tester@example.invalid --name "Test User" --verifiedbfast users list --app "$BF_APP"Enter a new app password at the hidden prompt. Remember it for the next step.
--verified records an owner attestation. Public signup instead requires email
verification and app SMTP. Your platform login does not create an app user.
4. Call protected routes
Section titled “4. Call protected routes”bfast request --app "$BF_APP" --email tester@example.invalid \ --method POST --path /counters --data '{"name":"visits"}'bfast request --app "$BF_APP" --email tester@example.invalid --path /countersEach command prompts for the app password. It logs in, sends an app bearer token, performs the request and attempts logout. It keeps the session in memory. Copy the counter record ID from the response:
BF_COUNTER_ID='<counter record ID>'bfast request --app "$BF_APP" --email tester@example.invalid \ --method POST --path "/counters/$BF_COUNTER_ID/increment"The value becomes 1. An app ID, a user ID and a counter ID identify different things.
5. Update and check data
Section titled “5. Update and check data”Keep the DSL app "simple-counter" declaration unchanged. You can add a comment
to exercise update without changing the model schema:
printf '\n// Updated through the public CLI.\n' >> my-counter/backend.fastbfast update --app "$BF_APP" ./my-counterbfast request --app "$BF_APP" --email tester@example.invalid --path /countersThe app retains its ID, URL, user and counter value. Schema-changing migrations are not implied by normal update. Read app lifecycle.
6. Download the client contract
Section titled “6. Download the client contract”bfast sdk --app "$BF_APP" --out client.tsbfast openapi --app "$BF_APP" --out openapi.jsonbfast storage --jsonThe generated SDK uses app tokens. The account storage command uses the platform key. See clients and files.
7. Delete the test app
Section titled “7. Delete the test app”bfast delete "$BF_APP"bfast apps listDeletion removes the app from the active catalog. The result reports
retained_data: true. Its volume and saved objects remain retained. This is not
a permanent purge or a storage refund. See retention.