Skip to content

docs(local-setup): add backend, admin app, and client SDK dev guide - #1814

Open
Shreyag02 wants to merge 6 commits into
mainfrom
docs/iam-frontend-client-sdk-local-setup
Open

docs(local-setup): add backend, admin app, and client SDK dev guide#1814
Shreyag02 wants to merge 6 commits into
mainfrom
docs/iam-frontend-client-sdk-local-setup

Conversation

@Shreyag02

Copy link
Copy Markdown
Contributor

Document local dev setup for the IAM Admin console frontend: running the backend and deps, the admin app, and the client SDK demo.

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview Jul 30, 2026 11:01am

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a148fca7-fbdc-4fc4-9cb6-6a83fd7d2d13

📥 Commits

Reviewing files that changed from the base of the PR and between b816635 and 16b4d5e.

📒 Files selected for processing (1)
  • docs/content/docs/local-setup.mdx

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Expanded the macOS local setup guide with clearer environment-variable guidance for switching backends using Connect-RPC, plus demo proxy behavior, gotchas, and ports/config reference details.
  • Developer Experience
    • Updated “Getting started” instructions to distinguish start (builds SDK, then serves apps) vs dev (skips SDK build).
    • Added start scripts for the admin and client-demo apps.
    • Introduced Turbo start task support to simplify multi-app bootstrapping.

Walkthrough

Changes

Local development workflows

Layer / File(s) Summary
Backend setup workflow
docs/content/docs/local-setup.mdx
Documents prerequisites, Docker dependency startup, database migration, backend launch, and health checks.
Frontend and SDK start workflows
docs/content/docs/local-setup.mdx, web/README.md, web/apps/admin/package.json, web/apps/client-demo/package.json, web/package.json, web/turbo.json
Documents SDK execution modes, clarifies start versus dev, adds Vite start scripts, and configures Turbo to build SDK packages before starting applications.
Configuration and troubleshooting reference
docs/content/docs/local-setup.mdx
Clarifies admin and client-demo environment variables and proxy behavior, and adds gotchas plus ports, CORS, database, and SpiceDB references.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: whoabhisheksah

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between ab8b990 and fce62d3.

📒 Files selected for processing (1)
  • docs/content/docs/local-setup.mdx

Comment on lines +47 to +49
- `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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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.

@coveralls

coveralls commented Jul 29, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 30536687008

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage increased (+0.2%) to 47.138%

Details

  • Coverage increased (+0.2%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 183 coverage regressions across 6 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

183 previously-covered lines in 6 files lost coverage.

File Lines Losing Coverage Coverage
billing/product/service.go 78 67.03%
core/serviceuser/service.go 36 46.31%
pkg/server/server.go 25 63.83%
core/membership/service.go 19 83.76%
core/project/service.go 19 78.35%
cmd/serve.go 6 0.0%

Coverage Stats

Coverage Status
Relevant Lines: 38983
Covered Lines: 18376
Line Coverage: 47.14%
Coverage Strength: 14.49 hits per line

💛 - 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/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need both of them, or does just CONNECTRPC suffice?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants