a13n
AI 에이전트를 만들고 클라우드에서 실행합니다
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗SmartGov Citizen Portal — the workshop demo for apidays Australia 2026's session on securing AI agents and MCP tool calls with Auth0 and OpenFGA. A citizen signs up, talks to an AI assistant about their own tax record, and can grant (and revoke) the assistant delegated access via Auth0 FGA. See the write-up for the reasoning behind the authorisation model.
@auth0/nextjs-auth0)fga-model.fgasrc/app/api/mcp)Nothing in this repo is tied to a specific Auth0 tenant, FGA store, or Firebase project — every deployment creates its own. Rough order:
Auth0 tenant — create a free tenant if you don't have one.
APP_BASE_URL to wherever you're running it (e.g. http://localhost:3000 locally, your Vercel URL in production), then add that as an Allowed Callback/Logout URL.APP_API_AUDIENCE.resource_server-type client for the OBO token exchange (OBO_BACKEND_CLIENT_ID/SECRET), with token_exchange.allow_any_profile_of_type enabled — this is deliberately not the same client as the citizen portal.citizen and caseworker Roles under User Management → Roles, and note both role IDs.auth0-actions/assign-persona-role.js and auth0-actions/provision-citizen-record.js as post-login Actions, both gated to run once on first login only. assign-persona-role.js needs Action Secrets DOMAIN/CLIENT_ID/CLIENT_SECRET (a Management API client with update:users access) plus CITIZEN_ROLE_ID/CASEWORKER_ROLE_ID. provision-citizen-record.js needs PROVISIONING_SYNC_URL (your deployed app's /api/provisioning/sync URL) and PROVISIONING_SYNC_SECRET (matching the app's own env var of the same name). Both Actions read the persona the visitor chose on the landing page (?persona=citizen/?persona=caseworker on /auth/login, forwarded to /authorize and read from event.request.query.persona) — deliberately on post-login, not post-user-registration, since only post-login is synchronous/blocking with a full api object; post-user-registration is documented as asynchronous and can't reliably finish before the signup redirect completes.auth0 roles create --name citizen, auth0 roles create --name caseworker, then auth0 actions create --name "Assign Persona Role" --trigger post-login --code "$(cat auth0-actions/assign-persona-role.js)" --dependency "auth0=4.37.1" --secret "CITIZEN_ROLE_ID=<id>" --secret "CASEWORKER_ROLE_ID=<id>" --secret "DOMAIN=<your-domain>" --secret "CLIENT_ID=<mgmt-client-id>" --secret "CLIENT_SECRET=<mgmt-client-secret>" (repeat similarly for provision-citizen-record.js), then deploy and bind each via and attaching them to the Login flow.Auth0 FGA — create a store at dashboard.fga.dev, write the model from fga-model.fga, and create an API client for it. Note the store ID, model ID, and client credentials.
Firebase — create a project at console.firebase.google.com, enable Firestore, and deploy firestore.rules (firebase deploy --only firestore:rules, once you've run firebase init and linked the project). Generate a service account key (Project Settings → Service Accounts → Generate new private key) for the FIREBASE_* env vars — this is the Admin SDK, server-side only; the app has no client-side Firebase Auth/Firestore code yet, so there's no separate client-side Firebase config to set up.
Vercel AI Gateway — get an API key from your Vercel account. No AWS credentials needed in this app; the Gateway calls Bedrock's Nova Pro model (amazon/nova-pro) using Vercel's own Bedrock access, not yours. To use a different model, change AI_GATEWAY_MODEL to any model ID the Gateway supports — that's the only thing you need to change, in code or in your Vercel project's environment variables. All model selection is centralised in src/lib/ai.ts.
Environment variables — copy ENV_TEMPLATE.md into .env.local and fill in every value from steps 1-4. Nothing in this repo has default values for these; the app won't start without them.
Run it:
npm install
npm run dev
Or deploy to Vercel and set the same variables in the project's Environment Variables settings.
src/app/ — routes: citizen chat (chat), case view (case), delegation controls (api/delegation), the MCP server (api/mcp), the synchronous first-login provisioning endpoint (api/provisioning/sync), and an access log (access-log)fga-model.fga — the Auth0 FGA authorisation modelauth0-actions/ — Auth0 Action source (deployable via the auth0 CLI — see setup step 1 — or pasted into the dashboard)firestore.rules — Firestore security rules for cases, agents, auditEventssrc/lib/provisioning.ts, src/lib/firebase-admin.ts — Firestore data accesssrc/lib/roles.ts — reads the citizen/caseworker persona claim the Actions set on the ID token; this is the app's only RBAC mechanismauth0 actions deploy <id>