You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move env var JS globals into /client_configuration
Removes the inline <script> block from _head.html.erb that set
window.intercodeAssetsHost, window.sentryFrontendDSN, and
window.rollbarClientAccessToken. All three values now come from the
/client_configuration JSON endpoint, which the SPA already fetches at
boot.
- assets_host: set on window.intercodeAssetsHost after bootstrap
resolves, so lazy route chunks still use the CDN; initial chunks
on cold load fall back to the origin server (which serves /packs)
- sentry_frontend_dsn / rollbar_client_access_token: passed as
constructor args to ErrorReporting rather than read from window;
AppRoot reads them via useRouteLoaderData('root')
This is the first step toward serving a fully static HTML shell for
all SPA routes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,13 @@ Intercode is a convention management system built with:
26
26
-**TypeScript**: Run `yarn run tsc --noEmit` after making changes
27
27
-**Ruby**: Run the relevant test suite before committing
28
28
29
+
## Deployment Model
30
+
31
+
Intercode is shipped as a Docker container with the frontend assets **pre-built at image build time**. Environment variables (including `ASSETS_HOST`, `SENTRY_FRONTEND_DSN`, `ROLLBAR_CLIENT_ACCESS_TOKEN`, etc.) are injected at **container runtime**, not at build time. This means:
32
+
33
+
- Do not use Vite `define`, `import.meta.env`, or any other build-time constant substitution for runtime env vars.
34
+
- Runtime configuration must be delivered to the browser via a server-rendered response (e.g. the `GET /client_configuration` endpoint) or a server-rendered HTML attribute, never baked into the JS bundle.
35
+
29
36
## Testing Requirements
30
37
31
38
Whenever changing signup-related functionality (signup services, ranked choice, waitlists, etc.), always add or update tests in the relevant test file under `test/services/` or `test/models/`.
0 commit comments