agentleFS
MicrosoftKnown publishermicrosoft/rayfin/samples/welcome-app-react-no-auth/AGENTS.md

rayfin / welcome-app-react-no-auth

AGENTS.md646 starsChanged 24 days agoMITView on GitHub

This project ships agent context: skills under .agents/skills/ and MCP servers in .mcp.json. Load them before writing code. This is an introductory React sample demonstrating basic Rayfin data operations without authentication or storage. It serves as a minimal starting point for understanding Rayfin's data layer with React. This sample uses React with Vite. The main application logic lives in src/App.tsx with React hooks for state management. Key components: React hooks used: Features demonstrated: Decorators (@microsoft/rayfin-core): Schema (rayfin/data/schema.ts): Client (@microsoft/rayfin-client): Data…

  • Reads credentials

We split this AGENTS.md into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not edit these paths; treat them as build or local-state outputs:

    line 77

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md

This project ships agent context: skills under .agents/skills/ and MCP servers in .mcp.json. Load them before writing code.

Project

This is an introductory React sample demonstrating basic Rayfin data operations without authentication or storage. It serves as a minimal starting point for understanding Rayfin's data layer with React.

Architecture

This sample uses React with Vite. The main application logic lives in src/App.tsx with React hooks for state management.

Key components:

  • App component – Main React component managing timestamps state and UI
  • RayfinClient<AppSchema> – Type-safe Rayfin client initialized via useMemo

React hooks used:

  • useState – Manages timestamps, loading, error, and status state
  • useCallback – Memoizes refreshTimestamps and sendTimestamp functions
  • useMemo – Creates singleton RayfinClient instance
  • useEffect – Triggers initial data fetch and status auto-dismiss

Features demonstrated:

  • Data creation via rayfinClient.data.Timestamp.create()
  • Data querying via rayfinClient.data.Timestamp.select()
  • Ordering and pagination with orderBy and first

Rayfin Integration Points

Decorators (@microsoft/rayfin-core):

  • rayfin/data/Timestamp.ts – Timestamp entity with @entity(), @uuid(), @date(), and @role() decorators

Schema (rayfin/data/schema.ts):

  • AppSchema type maps entity names to model types for type-safe client usage

Client (@microsoft/rayfin-client):

  • RayfinClient<AppSchema> initialized in src/App.tsx with baseUrl and publishableKey

Data API (@microsoft/rayfin-data):

  • Direct data operations through rayfinClient.data.Timestamp
  • CRUD operations are type-safe and DAB-compliant

Rayfin Configuration

rayfin/rayfin.yml enables:

  • Data: Enabled
  • Auth: Disabled (uses @role('anonymous', '*') for open access)
  • Storage: Disabled

Environment

Source of truth: rayfin/.env (RAYFIN_PUBLIC_* prefix). rayfin dev generates .env.local with Vite-compatible names before frontend startup.

Vite frontend variables (in .env.local):

  • VITE_RAYFIN_API_URL – Rayfin backend URL (default http://localhost:5168); sourced from RAYFIN_PUBLIC_API_URL
  • VITE_RAYFIN_PUBLISHABLE_KEY – Rayfin publishable key; sourced from RAYFIN_PUBLIC_PUBLISHABLE_KEY

Config files:

  • .env – defaults for all environments
  • .env.local – generated by rayfin dev (git-ignored)
  • rayfin/.env – runtime and deployment values (git-ignored, managed by Rayfin CLI)

Generated and Do-Not-Edit Files

Do not edit these paths; treat them as build or local-state outputs:

  • rayfin/.temp/ – Rayfin/DAB config generation output
  • dist/ – Vite build output
  • .env.local – local environment overrides (git-ignored)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

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.