Sample application for AI learning purposes.
Install the following tools
Make sure you have an API key for the following MCP tools:
Configure the following environment variables:
REF_API_KEYEXA_API_KEY
Copy .env.example to .env and fill in the Microsoft app registration values (AUTH_CLIENT_ID, AUTH_CLIENT_SECRET, AUTH_TENANT_ID) plus a 32-byte hex AUTH_COOKIE_SECRET. Then:
bun run devThe API validates Microsoft Entra-issued JWTs on /api/animals. Configuration is loaded from packages/api/.env (via DotNetEnv). Copy .env.example to .env and fill in:
cd packages/api && cp .env.example .env
# then edit .env with the tenant/client IDs (same client ID as the web app)Then run it from the repo root:
bun run dev:apiThe __ in env-var names is the ASP.NET section separator: Auth__TenantId maps to the Auth:TenantId configuration key. Use the same convention for any nested settings.
To run the API without token validation (e.g. to hit endpoints directly with curl), add this line to packages/api/.env:
Auth__Disabled=true
A warning is logged at startup when auth is disabled. Default is false — production stays secure unless the flag is explicitly set.