> For the complete documentation index, see [llms.txt](https://sonic-ai-works.gitbook.io/sonic-networks-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sonic-ai-works.gitbook.io/sonic-networks-docs/changelog/2026-09-01-monorepo-runtime-and-studio-gateway.md).

# 2026-09-01 — Monorepo runtime & Studio gateway

This release hardens the SONIC application workspace without changing the core product identity.

## Monorepo

* Added Turborepo orchestration for Web, Studio, Docs, Backend and shared packages.
* Added a pnpm workspace version catalog so framework versions stay aligned across applications.
* Centralized app URLs and local ports in `@sonic/shared/apps`.
* Added `pnpm assets:sync` for shared SONIC coins, trophies, icons, illustrations and lockups.
* Updated Next.js applications to stable `16.3.4`; React remains stable `19.2.8`; Web3 Icons remains `4.1.21`.
* Prisma remains on stable `7.10.0` rather than the Prisma 8 release-candidate channel.

## Studio security boundary

The browser no longer sends `x-tenant-id` or `x-user-id` directly to the backend.

Studio now uses:

```
browser /api/sonic/*
  ↓
same-origin Studio gateway
  ↓
verify signed sonic_session
  ↓
resolve tenant/account identity
  ↓
server-to-server /api/v1/*
```

`BACKEND_INTERNAL_URL` and `SONIC_SESSION_HMAC_SECRET` are server-only.

A demo tenant/account fallback is available only when `DEMO_AUTH_ENABLED=true` outside production.

## Billing surface

The Studio Billing page now loads the tenant credit ledger and historical subscription snapshots from the durable backend instead of rendering demo balances and invoices as factual production state.

## PWA

The public service worker now caches only approved public marketing routes and static assets. `/api/*`, `/auth/*` and `/checkout*` are excluded from the public offline cache.

## Validation

Architecture regression tests, TS/TSX syntax validation, package JSON validation and relative-import validation passed for this upgrade. A full dependency-backed build requires a network-enabled package install environment.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sonic-ai-works.gitbook.io/sonic-networks-docs/changelog/2026-09-01-monorepo-runtime-and-studio-gateway.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
