This is a Next.js project bootstrapped with create-next-app.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
To automatically isolate local test environments per branch and worktree:
scripts/devbox init
# Bootstrap shared root values and service env values into Vault, then install deps
scripts/devbox bootstrap
# Reboot recovery: start local Vault and seed the main root/service env values
scripts/devbox vault-up --seed
# Optional: override the shared Vault path used by bootstrap
# scripts/devbox bootstrap --vault-path secret/mingle/dev
scripts/devbox up --profile local
scripts/devbox up --profile device
scripts/devbox up --profile device --tunnel-provider cloudflare
# cloudflare named tunnel (fixed hostname) - reads shared values from the
# main worktree root .env.local or Vault
# scripts/devbox up --profile device --tunnel-provider cloudflare
scripts/devbox up --profile device --device-app-env dev
scripts/devbox up --profile device --device-app-env prod --with-ios-install --with-ios-clean-install --ios-configuration Release
# Build and install mobile apps too when a connected test phone is available
# scripts/devbox up --profile device --with-mobile-install
# Install only iOS
# scripts/devbox up --profile device --with-ios-install
# Archive/export an RN iOS IPA for App Store or TestFlight
# scripts/devbox ios-rn-ipa --device-app-env prod
# scripts/devbox ios-rn-ipa-prod
# Write full logs to a file
# scripts/devbox --log-file auto up --profile device --with-ios-install
# Tests
scripts/devbox test --target app
# Live STT integration tests require an explicit flag
# scripts/devbox test --target app --with-live
scripts/devbox status- Detailed guide:
docs/worktree-devbox.md - Railway single-service deployment guide:
docs/railway-single-service.md scripts/devbox bootstrapdoes not modify.env.local, but it uploads shared values from the MAIN worktree root.env.local(required) and, when they still exist, legacy service-specific values frommingle-app/.env.local/mingle-stt/.env.local/mingle-messaging/.env.localto the shared Vault record before installing dependencies. The MAIN worktree is the one withmainchecked out, or the primary checkout when no worktree is onmain. The--vault-pushoption is retained as a backward-compatible no-op.scripts/devbox vault-up --seedstarts the local Homebrew Vault service and safely seeds/patches the same MAIN root/service env values intosecret/mingle/dev.- The three local services share one development Vault record:
secret/mingle/dev. Production mobile URL overrides remain separate insecret/mingle/prod. - If a target path does not exist yet, devbox creates it once with
kv put. If the path already exists, devbox keeps usingkv patchand refuses destructive overwrite fallback. - If Vault CLI environment variables (
VAULT_ADDR,VAULT_NAMESPACE) exist in the MAIN worktree root.env.local(or the service env files), devbox automatically picks them up. scripts/devbox gateway --mode dev|runintegrates gateway execution from/Users/nam/openclawinto devbox commands.- Devbox keeps only worktree-local runtime settings in
.devbox.env; persistent shared settings (Cloudflare token/hostnames, optional fallback URL overrides, AdMob IDs, the shared Vault path, Team ID, and machine-wide paths) belong in the MAIN worktree root.env.localand Vault. Service.env.localfiles remain for service-specific values and are only legacy fallbacks for shared keys. - Frontend and app build entrypoints read the main root
.env.localfor shared values and.devbox.envfor worktree URLs/ports, sopnpm dev,pnpm build,pnpm start, React Native Android builds, and RN iOS flows resolve the current worktree runtime without duplicating shared settings. scripts/devbox up,init, andmobiledo not upload or synchronize.env.local;bootstrapis the explicit main-root/service-env-to-Vault synchronization step.- If a saved Vault path exists,
scripts/devbox upinjects unmanaged keys (such as API keys) into the server process environment at runtime without writing them to files. --profile deviceautomatically applies real-device test URLs, including ngrok (devbox_web/devbox_stt/devbox_messaging).--tunnel-provider cloudflareconfigures HTTPS/WSS through a Cloudflare tunnel instead of ngrok.- If
DEVBOX_CLOUDFLARE_TUNNEL_TOKEN,DEVBOX_CLOUDFLARE_WEB_HOSTNAME,DEVBOX_CLOUDFLARE_STT_HOSTNAME, andDEVBOX_CLOUDFLARE_MESSAGING_HOSTNAMEare present in the main root.env.localor Vault, it runs in named tunnel (fixed host) mode. - Without those settings, it falls back to the existing Quick Tunnel (
*.trycloudflare.com) mode.
- If
- With
--profile device,--device-app-env dev|prodreads mobile app build URLs fromsecret/mingle/devorsecret/mingle/prodand injects them. This supports the current RN mobile URL keys.--device-app-env prodskips ngrok and local server startup duringup. - Each worktree uses a separate ngrok inspector port (
DEVBOX_NGROK_API_PORT) to reduce collisions during concurrent runs. --profile deviceonly allowshttps/wsstunnels that match the current worktree ports.scripts/devbox upautomatically runsinitif.devbox.envdoes not exist.scripts/devbox up --profile deviceruns ngrok in a separate terminal tab or panel when possible, and automatically falls back to inline execution when that is not possible.scripts/devbox --log-file PATH up ...writes full devbox stdout/stderr to a file. IfPATHis relative, it is resolved from the repository root. If you passauto, it creates a timestamped file under.devbox-logs/. When ngrok runs in a separate terminal, check ngrok logs there. The.devbox-logs/directory is gitignored so logs are not committed.scripts/devbox mobile --platform ios|android|allautomates RN app build and installation when a device is connected.scripts/devbox ios-rn-ipa --device-app-env prodorscripts/devbox ios-rn-ipa-prodcreates RN iOS.xcarchive/.ipaartifacts for App Store upload. These commands also work without.devbox.env(recommended:--device-app-env,--site-url,--ws-url), and URLs can be read from Vault,.env.local, or shell environment variables. The iOS Team ID defaults to theDEVELOPMENT_TEAMvalue inmingle.xcodeproj. Use--team-idor the optionalDEVBOX_IOS_TEAM_IDoverride only when exporting with a different team.scripts/devbox up --profile device --with-mobile-installprepares the server and installs the mobile app in one run.- For
scripts/devbox test --target app, theapptarget runs unit tests only by default. Live tests run only when--with-liveis provided.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
This repository is licensed under the GNU General Public License v3.0 (GPL-3.0-only). See LICENSE.