The test profile pointed at ./test.db in the app directory, so a run inherited whatever schema an earlier run left behind. On a machine with a stale file, 0003_add_password re-applied ALTER TABLE ADD COLUMN over a column that already existed; fail-on-test-warnings turned the warning into a failure, and check:production failed for environment reasons rather than code. Each run now uses a fresh database under the OS temp directory. Verified by restoring the stale dev.db and test.db that reproduced the failure: the suite passes with them present. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Inter-app API showcase
Generated with wrnexus workspace inter-app-api-showcase.
webexposesGET /api/productand calls admin through private RPC.adminprovides thecatalogservice.packages/sharedowns the typed contract imported by both apps.
Run the verification from the repository root:
bun test examples/inter-app-api-showcase/apps/web/test/inter-app.test.ts
A WrNexus workspace — multiple apps, one gateway, interconnected.
inter-app-api-showcase/
wrnexus.workspace.ts # apps ↔ domains map (used by `wrnexus gateway`)
apps/
web/ # a WrNexus app → localhost, web.localhost
admin/ # a WrNexus app → admin.localhost
packages/
shared/ # @app/shared — shared code + cross-app pubsub bus
Run everything (one port, routed by domain)
bun install
bun run dev # = wrnexus gateway → http://127.0.0.1:3000
Add the hosts to your machine (e.g. /etc/hosts):
127.0.0.1 web.localhost admin.localhost
Open http://localhost:3000 for the web app or
http://admin.localhost:3000 for the admin app. The ports printed for individual
apps are internal gateway targets, not public workspace URLs.
Interconnect
- Shared code: import
@app/sharedin any app. - Runtime messaging:
import { bus } from "@app/shared"thenbus.publish("tenant:created", {...})in one app andbus.subscribe("tenant:*", fn)in another (needs Redis). - Databases: point apps at the same
db/databasesin their config.
Add another app
wrnexus workspace add reports --domain=reports.localhost