ignite26-LAB690 / field-services-app
AGENTS.md1 starsChanged 20 days agoMITView on GitHub
Use ^2.0.0 for Rayfin package additions and @^2.0.0 in every npm create command. The local rayfin binary comes from @microsoft/rayfin-cli@^2.0.0; update participating Rayfin packages together and commit the root lockfile. React + TypeScript (Vite) work-order app backed by Project Rayfin with Radix-based UI components styled with Tailwind CSS. Demonstrates Service Pro profile and work-order management with Fabric Entra authentication enabled for deployed Fabric environments. The primary development path uses a Fabric backend and integrated Microsoft authentication through the Rayfin Vite…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,196 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository19 other files it gives its agents.
- template/field-services-app/AGENTS.mdAGENTS.md
- lab-instructionsSkill
- lab-vm-updateSkill
- app-deploymentSkill
- app-validationSkill
- dax-authoringSkill
- query-designSkill
- rayfin-connectorsSkill
- rayfin-functionsSkill
- rayfinSkill
- rayfin-storageSkill
- app-deploymentSkill
- app-validationSkill
- dax-authoringSkill
- query-designSkill
- rayfin-connectorsSkill
- rayfin-functionsSkill
- rayfinSkill
- rayfin-storageSkill
The file
We split this AGENTS.md into the rules it gives an agent
11 rules. About 0 are common, 3 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 5
Use ^2.0.0 for Rayfin package additions and @^2.0.0 in every npm create command.
- Distinctive: line 17
Do not install dependencies separately inside workspace packages.
- Very specific: line 21
Read Rayfin guidance before changing Rayfin code.
- Distinctive: line 22
Verify the intended source, workspace/item identity, schema, query shape, and real results before consuming source-backed data.
- Distinctive: line 25
Use app-validation for targeted checks and applicable final checks.
- Very specific: line 26
Read app-deployment before remote writes.
- Very specific: line 58
Add a component: npx shadcn@latest add <component>
- Very specific: line 70
Keep browser-safe record contracts and FieldServiceSchema in packages/shared/src/index.ts aligned with entities.
- Very specific: line 71
After entity/relationship changes, deploy with npm run rayfin:up using the intended workspace/item.
- Very specific: line 123
Keep UI logic in packages/frontend/src/, data model code in packages/data/src/, and browser-safe contracts in packages/shared/src/.
- Very specific: line 127
Add connectors through services.connectors: connectorsService(...) on the existing client, preserving its auth and data services.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Project
Use ^2.0.0 for Rayfin package additions and @^2.0.0 in every npm create command. The local rayfin binary comes from @microsoft/rayfin-cli@^2.0.0; update participating Rayfin packages together and commit the root lockfile.
React + TypeScript (Vite) work-order app backed by Project Rayfin with Radix-based UI components styled with Tailwind CSS. Demonstrates Service Pro profile and work-order management with Fabric Entra authentication enabled for deployed Fabric environments. The primary development path uses a Fabric backend and integrated Microsoft authentication through the Rayfin Vite local-dev plugin. Production uses Fabric Entra SSO.
Quickstart
- Install at the app root:
npm install - Sign in:
npx rayfin login - Deploy to Fabric:
npm run rayfin:up -- --workspace <name> --item-name <name> - Development session:
npm run dev -- --workspace "<name>" - Do not install dependencies separately inside workspace packages.
Agent workflow
- Read Rayfin guidance before changing Rayfin code. Installed package documentation is authoritative: inspect the owning package's
package.json, followrayfinDocs.dir, readindex.md, then the relevant page. CLI documentation comes from the directly installed@microsoft/rayfin-guide. - Verify the intended source, workspace/item identity, schema, query shape, and real results before consuming source-backed data. Never invent identifiers or silently substitute sample data; the existing labelled demo seed is not a fallback for a missing source.
- Surface actionable configuration, sign-in, permission, and query errors rather than permanent loading states. Bound transient retries for new source integrations; preserve the explicitly documented seed/reset retry behavior below.
- Install from this app's npm workspace root, declare dependencies in the owning package, and maintain one root lockfile. Do not race installers or builds that share TypeScript outputs.
- Use app-validation for targeted checks and applicable final checks. Build/CLI success does not prove browser behavior or persisted writes.
- Read app-deployment before remote writes. Confirm the workspace/item and preview with the installed CLI;
npm run devalso applies remote backend state. - For existing Fabric sources use rayfin-connectors; for semantic queries also use dax-authoring and query-design.
- Functions and Storage remain disabled. Only when explicitly requested, follow rayfin-functions or rayfin-storage for opt-in setup, permissions, integration, and validation. Guidance presence does not authorize service enablement or deployment.
Common commands
| Command | Description |
npx rayfin up | Deploy to Microsoft Fabric |
npm run dev:fabric | Start Vite frontend against Fabric backend |
npm run rayfin:dev | Compatibility alias for dev |
npm run rayfin:db | Generate and apply database schema |
npm run dev | Start a CLI-managed Fabric development session, applying backend state and starting the local frontend; does not publish static content |
npm run build | Build for production |
npm run seed:generate | Generate large demo seed JSON |
npm run seed:validate | Validate demo seed JSON |
npm run typecheck | Check TypeScript project references |
Repo map
packages/frontend/src/– React UI, components, hooks, pages, and servicespackages/data/src/– Decorated entities, schema registration, and package entry pointpackages/shared/src/index.ts– Browser-safe record contracts and typed client schemarayfin/rayfin.yml– Rayfin configuration (auth and data enabled)- Root
package.jsonand lockfile – npm workspace orchestration and dependency installation
UI (Radix-based shadcn/ui)
This project uses Radix-based UI components styled with Tailwind CSS v4.
- UI components live in
packages/frontend/src/components/ui/ - Utility helper lives in
packages/frontend/src/lib/utils.ts(cn) - Add a component:
npx shadcn@latest add <component>
Key config/files:
- Global styles + Tailwind import:
packages/frontend/src/styles/theme.css - Path alias
@/*→ frontendsrc/*:packages/frontend/tsconfig.json - Vite plugins + alias:
packages/frontend/vite.config.ts - shadcn registry/config:
packages/frontend/components.json
Data model changes
- Edit/add entities in
packages/data/src/, register them inschema.ts, and export them fromindex.ts. - Keep browser-safe record contracts and
FieldServiceSchemainpackages/shared/src/index.tsaligned with entities. Frontend code imports types from@field-services/shared, not backend entity source. - After entity/relationship changes, deploy with
npm run rayfin:upusing the intended workspace/item. Never force destructive changes without review.
Architecture
Service Layer
- ServiceContainer: Asynchronous bootstrap resolves runtime configuration before React mounts and then provides synchronous service access
- RayfinClientService: Composes the singleton with
RayfinClient.create,browserSession({ storage: true }), anddataService<FieldServiceSchema>(); infer its type from the factory and dispose it only when resetting the owning service container - RayfinFieldService: Service Pro and work-order CRUD via DataApi fluent interface
Auth Service Layer
- RayfinAuthService: Fabric Entra authentication operations (production)
- RayfinFabricAuthService: Delegates to
@microsoft/rayfin-auth-provider-fabricSDK for Entra flows - Local development:
rayfinLocalDev({ autoLogin: true })proxies backend requests and brokers the CLI's signed-in identity. Browser helpers must remain dynamically imported behindimport.meta.env.DEV. KeepexternalEntraExchange: truedeployed and Vite bound to loopback. - RayfinPasswordAuthService: Legacy local-backend email/password authentication, not required by the guided lab
- AuthContext: React context for auth state management
Routing
/auth– Public auth page (Fabric sign-in or email/password sign-in; redirects to/if authenticated)/auth/callback– Fabric Entra OAuth callback/– Protected service pro dashboard (redirects to/authif not authenticated)/manager/– Authenticated manager demonstration view; not a separately authorized role/_admin/– Hidden protected DB data tools page for seed/reset operations
Sample data and reset
- The seed generator defaults to
2026-04-30, not the current date. Its baseline is 12 synthetic profiles and 1,040 work orders; keep expected results in the README aligned. restoreSeedDatainserts missing deterministic UUIDs only. Never turn restore into a delete/overwrite operation; preserve attendee profiles, edits, and comments.- Bulk operations use
BulkOperationanduseBulkOperationfor browser-side checkpoints and a 20-second batch-start budget, not a hard request timeout. Retry timeout-only/throttling failures automatically with backoff and Retry-After support; retain original batch errors, stop on mixed/permanent failures, and allow pause during backoff. Keep checkpoints scoped to app/account, reconcile uncertain writes, preserve dependency phases, and require fresh reset confirmation on manual resume. Functions remain disabled. resetDemoDatarequiresRESET <current-app-item-id>, deletes comments before orders and profiles, and recreates one initial job. No Fabric infrastructure is deleted. Obtain explicit owner approval before rehearsing reset against existing data.- Authenticated comment deletion exists for demo reset, not role separation. The navigation switch and typed reset confirmation are UX safeguards, not authorization boundaries.
Key files
packages/data/src/ServicePro.ts– Service Pro profile entitypackages/data/src/WorkOrder.ts– Work-order entity with optional service pro relationshippackages/frontend/src/services/ServiceContainer.ts– Service bootstrappackages/frontend/src/hooks/useFieldService.ts– Service Pro/profile/work-order operations hookpackages/frontend/src/pages/Dashboard.tsx– Service Pro and manager dashboardspackages/frontend/src/pages/AdminPage.tsx– Hidden seed/reset admin data page
Environment
packages/frontend/.env.local– Frontend configuration (git-ignored, generated byrayfin devorrayfin env --framework vite)rayfin/.env– runtime + deployment env (written byrayfin dev/rayfin up)rayfin/.deployments.json– registry of all Fabric workspace deployments (written byrayfin dev/rayfin up)
Code conventions
- TypeScript strict mode; prefer small functional React components.
- Keep UI logic in
packages/frontend/src/, data model code inpackages/data/src/, and browser-safe contracts inpackages/shared/src/. - Services follow the singleton pattern via
ServiceContainer. - A localhost proxy URL does not mean the backend is Docker. Fabric metadata takes precedence when selecting the auth service.
- Data reads must select the fields consumers use. Convert
Date | stringwire dates at the service boundary and re-read required fields after partial mutations; never cast a partial result to a full record. - Add connectors through
services.connectors: connectorsService(...)on the existing client, preserving its auth and data services. Do not use the removedConnectorsRayfinClient.
Generated files (do not edit)
rayfin/.temp/– Rayfin/DAB config generation outputpackages/*/dist/– Package build outputpackages/frontend/.env.local– Local environment configuration (git-ignored, script-managed)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

