This guide covers the local tooling, IDE configuration, environment variables, and editor extensions needed to work on the apps/web Next.js frontend inside OpenFrame OSS Frontend. It assumes you have already cloned the repository:
git clone https://github.com/flamingo-stack/openframe-oss-frontend.git
cd openframe-oss-frontendFor the first commands to run after cloning, see Local Development. This page focuses on preparing the machine and editor before you run anything.
This is a monorepo with three application surfaces, each with its own toolchain:
| App | Path | Stack |
|---|---|---|
| Web (primary) | apps/web |
Next.js 16, React 19, TypeScript, Relay, Tailwind CSS |
| Desktop shell | apps/desktop |
Tauri 2 (Rust) wrapping the web export |
| Mobile shell | apps/mobile |
Capacitor wrapping the web export |
The web app consumes @flamingo-stack/openframe-frontend-core (published by the OpenFrame OSS Library repository) as its component, hook, and ESLint-config library, and the desktop shell links async_nats from the NATS Rust Client repository for its background notification plane. Most day-to-day frontend development happens in apps/web; the desktop and mobile shells mainly package its static export, so this document emphasizes the web app's requirements while noting the native shells where relevant.
The repository pins its Node.js version in .nvmrc at the repository root:
26
If you use nvm, run nvm use from the repository root to pick up this version automatically.
Every package.json in the monorepo (apps/web/package.json, apps/mobile/package.json, apps/desktop/package.json) declares a devEngines.packageManager constraint:
"devEngines": {
"packageManager": { "name": "npm", "version": ">=11.11.0", "onFail": "error" }
}Running with an older npm fails fast (onFail: "error") rather than producing a confusing installation error later. Check your version with:
npm --versionand upgrade npm itself if it is older than 11.11.0.
apps/web/package.json runs husky from its prepare script:
"prepare": "cd ../.. && husky || true"This installs the repository's pre-commit hook at .husky/pre-commit, which runs automatically once you npm install inside apps/web. The hook:
- Scopes itself to staged
*.ts,*.tsx,*.js,*.jsx,*.mjs,*.cjsfiles only. - Refuses to run against a file that is staged and has further unstaged edits, to avoid checking content that would not actually be committed.
- Runs ESLint with
eslint.ci.mjs(the same configuration CI enforces) and Prettier's--checkagainst the staged files. - Runs
tsc --noEmitand filters its output down to diagnostics that belong to the staged files.
Because this hook enforces the same checks as CI, keeping it enabled saves round-trips through a failed pull request.
These are installed as devDependencies of apps/web/package.json rather than global tools, so no separate install step is required beyond npm install:
typescript5.9.3eslint9.39.5(flat config)prettier3.9.6vitest5.0.5for unit tests
The ESLint and Prettier rule sets themselves are largely supplied by @flamingo-stack/openframe-frontend-core/eslint-config, re-exported and locally extended from apps/web/eslint.config.mjs and apps/web/prettier.config.mjs. You do not need to install these configs separately — they arrive with the pinned @flamingo-stack/openframe-frontend-core dependency.
Desktop shell (Tauri / Rust)
apps/desktop/src-tauri/Cargo.toml requires Rust 1.90 or newer (rust-version = "1.90"), driven by tauri-plugin-updater 2.14. The desktop app is built with apps/desktop/package.json's dev (tauri dev --no-dev-server) and build (tauri build) scripts, both of which shell out to the @tauri-apps/cli devDependency. Before dev, predev calls node scripts/make-placeholder-web.mjs --if-missing so Tauri has a web bundle to point at even before you have run a real web build.
Mobile shell (Capacitor)
apps/mobile wraps the openframe-frontend static export with no UI code of its own (see apps/mobile/package.json's description). Its Android project under apps/mobile/android is a standard Gradle project (apps/mobile/android/build.gradle, apps/mobile/android/app/build.gradle) that expects Android Studio's SDK/JDK toolchain; no additional repository-specific Android tooling is declared beyond the Gradle wrapper. An .editorconfig at apps/mobile/.editorconfig documents the expected indentation per language for this app (two-space TypeScript/JSON/YAML, four-space Java/Kotlin/Swift, LF line endings, trimmed trailing whitespace).
From the web app directory:
cd apps/web
npm installnpm install triggers the prepare script, which installs the Husky git hook described above. The web app's package.json also pins a dependency override so next-runtime-env resolves next and react to the versions this repository uses, rather than its own peer range:
"overrides": {
"next-runtime-env": { "next": "$next", "react": "$react" }
}You do not need to do anything about this override — it is resolved automatically by npm install — but it explains why npm ls next-runtime-env may show a version that looks unusual compared to its own published peer dependencies.
The repository ships a committed VS Code workspace configuration under .vscode/, which is the strongest signal for the supported editor. Opening the repository root in VS Code picks these settings up automatically.
.vscode/settings.json pins the editor to the workspace's own TypeScript install rather than VS Code's bundled version:
"typescript.tsdk": "apps/web/node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": trueThis matters because apps/web/tsconfig.json sets strict TypeScript options (strict: true, isolatedModules: true, moduleResolution: bundler) and the Next.js TypeScript plugin, so using a mismatched bundled TypeScript version can produce diagnostics that do not match what npm run type-check reports. After opening the workspace, VS Code will usually prompt you to confirm using the workspace TypeScript version — accept it.
.vscode/settings.json wires formatting and linting together deliberately:
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" }The settings file documents the reasoning inline: a formatter alone (formatOnSave) does not apply ESLint's autofixes, so both are wired as one combined save action. The source.fixAll.eslint action is written in the modern object form (not the deprecated array form VS Code has warned about since 1.85).
Import ordering is intentionally not handled by VS Code's built-in source.organizeImports action. It is an ESLint rule (perfectionist/sort-imports) applied by source.fixAll.eslint, and the comments in .vscode/settings.json explicitly warn against adding an organize-imports action, since the TypeScript server's own ordering would conflict with the rule and the two would fight on every save.
Because the web app's ESLint config and node_modules live under apps/web rather than at the workspace root, .vscode/settings.json scopes the ESLint extension accordingly:
"eslint.useFlatConfig": true,
"eslint.workingDirectories": [{ "directory": "apps/web", "changeProcessCWD": true }],
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"]The editor loads apps/web/eslint.config.mjs — the fast pass of rules. Type-aware rules (in eslint.types.mjs) are deliberately not run by the editor, because they require a full TypeScript program and a configured heap. Run npm run lint:types from apps/web before pushing to catch those.
Important: keep
eslint.format.enableoff. The settings file documents a real failure mode: with that setting on, the ESLint extension registers itself as a document formatter and "Format Document" silently runseslint --fixinstead of Prettier — producing no visible formatting change at all, because the shared config spreadseslint-config-prettierlast, turning off every stylistic rule by design. This looks exactly like a broken format-on-save..vscode/settings.jsonsetseslint.format.enable: falseto prevent it.
.vscode/settings.json explicitly disables Biome ("biome.enabled": false) and .vscode/extensions.json lists biomejs.biome under unwantedRecommendations. The project migrated off Biome on 2026-09-01; if you have a globally installed Biome VS Code extension, it is explicitly turned off for this workspace so it cannot format files against a configuration file that no longer exists.
.vscode/settings.json additionally binds Prettier as the default formatter for TypeScript, TSX, JavaScript, JSX, JSON, JSONC, and CSS individually ("[typescript]", "[typescriptreact]", etc.), so a global default formatter set elsewhere on your machine cannot override it for these languages inside this workspace.
.vscode/settings.json excludes **/dist and **/.next from workspace search, keeping build output out of your search results.
The repository's .vscode/extensions.json declares the recommended and unwanted extensions for this workspace:
{
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"],
"unwantedRecommendations": ["biomejs.biome"]
}| Extension ID | Purpose | Status |
|---|---|---|
esbenp.prettier-vscode |
Prettier formatting, wired as the default formatter for TS/TSX/JS/JSX/JSON/CSS | Recommended |
dbaeumer.vscode-eslint |
ESLint diagnostics and the source.fixAll.eslint save action |
Recommended |
biomejs.biome |
Former formatter/linter, retired 2026-09-01 | Explicitly unwanted |
When you open the repository in VS Code, it will prompt you to install the two recommended extensions if they are missing. Install both before you start editing — without dbaeumer.vscode-eslint, source.fixAll.eslint has nothing to run, and without esbenp.prettier-vscode, format-on-save has no effect.
No other editor-specific configuration (e.g. for JetBrains IDEs or Vim/Neovim) is published in this repository; VS Code with the two extensions above is the supported baseline.
The web app documents its runtime environment variables in apps/web/.env.example. Copy it to a local .env (or .env.local) inside apps/web and adjust as needed:
cd apps/web
cp .env.example .env.localAll variables are read via next-runtime-env, so they are safe to change without rebuilding in most cases, but they are still public (NEXT_PUBLIC_*) and must never carry secrets.
| Variable | Purpose | Local Dev Default / Notes |
|---|---|---|
NEXT_PUBLIC_ENABLE_DEV_TICKET_OBSERVER |
Enables automatic devTicket detection and exchange for SSO authentication | false; enable only when testing that SSO flow |
NEXT_PUBLIC_AUTH_CHECK_INTERVAL |
How often (in milliseconds) authentication status is polled | 60000 (1 minute) |
NEXT_PUBLIC_APP_MODE |
Selects oss-tenant, saas-tenant, or saas-shared behavior |
oss-tenant for this repository |
NEXT_PUBLIC_GTM_CONTAINER_ID |
Google Tag Manager container ID | Unset for local dev |
NEXT_PUBLIC_RECAPTCHA_SITE_KEY |
reCAPTCHA Enterprise public site key used by the edge firewall to score password signup/reset | Unset is fine for OSS and local dev; a SaaS edge that enforces the check will refuse requests with no token |
NEXT_PUBLIC_BREW_CASK |
Homebrew cask name used by the Add Device "Brew" install command (flamingo-stack/openframe tap) |
Unset defaults to openframe-client (production); use openframe-client@stage or openframe-client@dev on those environments |
NEXT_PUBLIC_SUPABASE_HOST |
The hub's Supabase project host, used so its images load directly rather than through the image proxy | Unset uses the build-time default in apps/web/next.config.mjs; set it only when pointing at a different Supabase project |
NEXT_PUBLIC_FEATURE_SCRIPT_SCHEDULE |
Enables the script scheduling feature | false |
NEXT_PUBLIC_PR_NUMBER_ENABLED |
Shows a PR-number field on the signup form, linking registrations to a PR for testing | false; enable only on dev environments, keep disabled on stage/prod |
Two additional variables appear in apps/web/next.config.mjs and are relevant to local development, even though they are not listed in .env.example:
NEXT_PUBLIC_TENANT_HOST_URL— when set,next.config.mjs'srewrites()proxies/content/:path*calls to this tenant gateway at build time, so embedded chat works without a cross-origin workaround duringnext dev/next build. It is intentionally absent from the deployed Docker image build (its.env*is dockerignored), where the platform's reverse proxy answers/content/*directly instead.OPENFRAME_BUILD_TARGET=export— not a runtime variable but a build-time selector; setting it (asnpm run build:exportdoes) switches the Next.jsoutputmode fromstandalonetoexportfor the native shells.
resolve_code_importsand the import-resolution review rule (IMPORT-001) both treatapps/web/.env.exampleas part of the dependency surface this repository is checked against — keep any newNEXT_PUBLIC_*variable you add there in sync with where it is actually read in code, and do not duplicate a variable's default in more than one place (per the repository's single-source-of-truth convention).
If you also build the native shells locally:
apps/mobile/scripts/inject-env.mjsrequiresNEXT_PUBLIC_SHARED_HOST_URLto be set — the script aborts the build if it is missing, because without it every auth/discovery call would resolve againstcapacitor://localhostinstead of the shared auth host. Optional companions areNEXT_PUBLIC_TENANT_HOST_URL(pins a single tenant),NEXT_PUBLIC_MOBILE_APP_SCHEME(must match the native OAuth callback scheme compiled into the build you are testing against), andNEXT_PUBLIC_MOBILE_AUTH_UI(login-onlyorlegacy).apps/desktop/src-tauri/Cargo.toml'sasync-natsdependency is used by the desktop shell's background notification plane; no separate environment variable is required for local development beyond what the web export itself needs.
Once dependencies are installed and your editor is configured, confirm everything is wired correctly from apps/web:
npm run type-check
npm run lint
npm run testtype-checkrunstsc --noEmitagainst the stricttsconfig.json.lintruns the fast ESLint pass with--max-warnings 0.testrunsvitest runplus the Node-based tests undersrc/lib/*.test.mjs(test:node).
If any of these fail immediately after a clean clone, revisit the Node.js and npm versions above before assuming the code itself is broken — version mismatches are the most common cause of environment-only failures in this repository.
For the commands used to actually run the app day to day (npm run dev, the GraphQL schema fetch, Relay compilation, and so on), continue to Local Development.