docs(local-setup): add backend, admin app, and client SDK dev guide - #1814
docs(local-setup): add backend, admin app, and client SDK dev guide#1814Shreyag02 wants to merge 6 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughChangesLocal development workflows
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 92712be4-c807-4c90-b859-34928513334a
📒 Files selected for processing (1)
docs/content/docs/local-setup.mdx
| - `docker ps` — `frontier-pg-1`, `frontier-pg2-1`, `frontier-spicedb-1` all `(healthy)`. | ||
| - `lsof -nP -iTCP:8002 -sTCP:LISTEN` — backend listening. | ||
| - `docker exec frontier-pg-1 psql -U frontier -d frontier -c '\dt' | head` — app tables exist. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Avoid hard-coded Compose container names.
The guide permits a different clone location, but frontier-pg-1 is derived from the Compose project name and can differ by checkout directory or Compose version. Query services through the same Compose project instead.
Proposed fix
- `docker ps` — `frontier-pg-1`, `frontier-pg2-1`, `frontier-spicedb-1` all `(healthy)`.
+ `cd frontier && docker-compose -f docker-compose.yml ps` — `pg`, `pg2`, and `spicedb` should be healthy.
- `lsof -nP -iTCP:8002 -sTCP:LISTEN` — backend listening.
- `docker exec frontier-pg-1 psql -U frontier -d frontier -c '\dt' | head` — app tables exist.
+ `cd frontier && docker-compose -f docker-compose.yml exec -T pg psql -U frontier -d frontier -c '\dt' | head` — app tables exist.
Coverage Report for CI Build 30536687008Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage increased (+0.2%) to 47.138%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions183 previously-covered lines in 6 files lost coverage.
Coverage Stats
💛 - Coveralls |
MDX parses `<` as JSX, so `<http://localhost:5173>` reads as an element named `http` and fails on `//`. Use explicit Markdown links instead.
|
|
||
| ```bash | ||
| FRONTIER_API_URL=http://localhost:8002/frontier | ||
| FRONTIER_CONNECTRPC_URL=http://localhost:8002/ |
There was a problem hiding this comment.
Do we need both of them, or does just CONNECTRPC suffice?
There was a problem hiding this comment.
FRONTIER_CONNECTRPC_URL alone is enough — FRONTIER_API_URL is unused, so I'll remove it.
Nothing in the repo reads it: the admin bundle only gets NEXT_PUBLIC_FRONTIER_CONNECT_URL and FRONTIER_CONNECTRPC_URL, the only proxy is /frontier-connect, and axios isn't imported anywhere — there's no REST client left to point it at. The app runs fine with just that one var in .env.
It's a leftover from before the Connect migration, still lingering in .env.example, the old admin README, and turbo.json. I'll drop it from §2 and §5 here and clear out those three separately.
The admin app talks to the backend over Connect-RPC only: the bundle gets just NEXT_PUBLIC_FRONTIER_CONNECT_URL and FRONTIER_CONNECTRPC_URL, the sole Vite proxy is /frontier-connect, and axios is imported nowhere — so there is no REST client for FRONTIER_API_URL to point at. Documenting it only invited confusion about which vars are required. Keep FRONTIER_CONNECTRPC_URL as the single admin env var in §2 and §5, and note that the commented-out FRONTIER_API_URL in .env.example is unread so it does not get added back.
… env client-demo reaches the backend over Connect-RPC only. FrontierProvider sets its single base URL from `config.connectEndpoint || '/frontier-connect'`, and the built client SDK contains just two URL literals, "/" and "/frontier-connect" — no /api request exists. The `/api` proxy and `endpoint: '/api'` in src/config/frontier.ts are both inert: `endpoint` is not a field on FrontierClientOptions, and it survives only because client-demo builds with vite and no tsc step. Document that so neither gets treated as required, and leave the code cleanup separate.
Document local dev setup for the IAM Admin console frontend: running the backend and deps, the admin app, and the client SDK demo.