Quickstart
Scaffold a Rayfin project, deploy it to Microsoft Fabric, and run the frontend locally — from nothing to a running app in four commands.
From nothing to a running app in four commands. You need Node.js 20 or later and the GitHub CLI first.
Rayfin deploys your backend to Microsoft Fabric and you run your frontend locally against it. There is no backend to run yourself.
Set up a new Rayfin app for me, end to end.
Rayfin is a backend platform for TypeScript developers on Microsoft Fabric. Before writing
any code, read https://rayfin.ai/docs/reference/agent-rules.md — every page on that site is available as
raw Markdown by appending .md to its URL.
Then do the work yourself rather than printing steps for me:
1. Scaffold a project with `npm create @microsoft/rayfin@latest my-app` and install dependencies.
2. Sign in with `npx rayfin login`.
3. Deploy with `npx rayfin up` and confirm it with `npx rayfin up status`.
4. Start the frontend with `npm run dev` and tell me the URL to open.1. Scaffold a project
npm create @microsoft/rayfin@latest my-app
cd my-appPick a template when prompted. You should see ✔ Project created.
2. Sign in
npx rayfin loginOpens a browser for Entra ID sign-in. You need an account with access to a Fabric workspace.
3. Deploy
npx rayfin upThis creates the Fabric item, applies the database schema generated from your entities, and deploys your frontend. Confirm it worked:
npx rayfin up statusTip
While iterating on frontend code, add --exclude-services staticHosting to skip
rebuilding and uploading the bundle — the local dev server serves it instead.
4. Run the frontend
npm run devThe scaffolded predev script runs rayfin env --framework vite, which writes a
.env.local pointing at the backend you just deployed. Open the URL it prints and you have
a working app reading and writing real data.
Make your first change
Entities live in rayfin/data/. Add a field:
import { entity, anonymous, uuid, text, date } from '@microsoft/rayfin-core';
@entity()
@anonymous()
export class Timestamp {
@uuid() id!: string;
@date() timestamp!: Date;
@text({ max: 500 }) message!: string;
}Then redeploy with the same command:
npx rayfin uprayfin up applies pending schema changes as part of a normal deploy. Two rules worth
knowing now: every @text() field needs a max, and every entity needs an explicit
permission decorator.
Next
- Project structure — what got generated and why.
- Modeling entities — how classes become tables and APIs.
- Schema migrations — how changes reach the database.
- Known limitations — read before modeling seriously.