
Summary
Key points of this document
- Where are the design challenges?
- How to define boundaries
- Details that matter in implementation
Overview
Remix strongly gives the impression of leveraging server-side features, but with SPA Mode, it can be operated as a static app. While it's a valid option for small-scale apps, it's necessary to clearly define the premise of having no server-side processing. The decision for SPA Mode is not about abandoning SSR, but rather about organizing which processes to place at build time, in the browser, or in an API.
Where are the design challenges?
For small information apps or administrative support tools, you might not need a server, but still want to use React's routing and state management. Remix SPA Mode falls in between, but designing it with the same mindset as regular Remix will lead to constraints.
In SPA Mode, you cannot rely on server-side processing for each request. SEO, initial rendering, authentication, form submissions, and handling environment variables must be designed to fit the constraints of static delivery.
While Remix's SPA Mode facilitates static delivery, the execution location of loaders and the amount of information in the initial HTML differ from a typical SSR configuration. Designing with an existing Remix mindset will lead to unexpected differences in SEO, authentication, and error handling.
How to define boundaries
We separate functions that are self-contained statically from those that offload to external APIs. Screen transitions and client-side state are handled by Remix, while processes requiring persistence or authentication are delegated to a separate API. Environment-specific differences are explicitly defined as build-time settings.
In design, we separate public information, post-login information, and frequently changing information. Public information is handled at build time or with static JSON, post-login information is fetched from an API, and loading/failure states during screen transitions are carefully designed.
Details that matter in implementation
We create artifacts with Vite build, and on the delivery side, all in-app paths fallback to index.html. Only publicly safe external API URLs are embedded, and no sensitive information is placed on the client.
We check Vite settings, routing, fallback HTML, and the scope of environment variable exposure. The API client assumes browser execution, and CORS, Cookies, and authentication headers are designed in relation to the static delivery domain.
- Check if sensitive information is being handled by loaders that assume SSR.
- Separate pages where meta tags necessary for initial display appear in static HTML from those where they do not.
- Do not rely solely on route errors for API failure screens; treat them as data fetching states.
Observe how it breaks
During verification, we check direct URL access, browser reloads, back/forward navigation, 404-equivalent screens, and display upon API failure. We observe if the behavior is the same on the static delivery destination, not just in local preview, but also in containers or production-like environments.
In verification,vite previewIn addition to vite preview, we check reloads, deep URLs, 404s, and expired authentication with the same fallback settings as static delivery. The title and description in the initial HTML are also important points to check for pages that require search traffic.
Discarded options and trade-offs
While SPA Mode is lightweight to operate, it cannot perform server-side authentication or data formatting. If business functions are likely to increase later, establishing API boundaries from the start will make migration easier.
SPA Mode can lighten delivery, but some pages may be at a disadvantage compared to SSR in terms of initial display and SEO. Instead of making everything a SPA, it may be more rational to separate delivery methods for public content and business applications.
Decision criteria to leave for the team
Remix SPA Mode is a configuration that actively chooses not to have a server. By deciding what to place on the client and what to delegate to external APIs, you can keep small apps lightweight.
SPA Mode is not an easy escape route, but a design decision that changes the execution location. By clarifying which data to fetch and when, you can achieve both the lightness of static delivery and the maintainability of the app.


