Dynamic Snapshots · Overview
SSG or SSR?
-
If you choose SSG, you get brutal performance… but every content change means rebuilds, pipelines and waiting.
-
If you choose SSR, you gain flexibility… but you pay the price on every request: API calls, latency and network dependency.
What if you could have the best of both worlds by changing a single line of code?
Your website running at full speed (performance close to SSG), with the flexibility of SSR.
Develop against the API. Deploy on memory.
In development you want convenience: you point at the Content Island API and always see fresh content, with no extra steps.
In production you want speed and resilience: every read should resolve from memory, without a network call per operation.
And best of all, you can configure it by changing just one line of code (you can even control it with an environment variable).
Dynamic Snapshots gives you exactly that, without changing the way you work.
How does it work?
You export all your project’s content to a single JSON: the snapshot.
The API client can read from that snapshot with full parity with the live API:
- Same methods
- Same responses
- Same behavior
But pulling from the in-memory snapshot, without making API calls.
What does a Dynamic Snapshot add?
A traditional snapshot is generated at build time and stays frozen.
A Dynamic Snapshot goes further:
- It lives in server memory
- It updates automatically when you publish content
- No restart required
- No rebuild required
- No burst of API calls
The content is swapped atomically, without affecting in-flight requests.
Result
- Performance close to SSG
- SSR flexibility
- No API calls at runtime
- No rebuilds
- No extra complexity
The key
Your implementation doesn’t change, only the data source does.
This abstraction lets you develop with fresh content from the API without changing your code, and deploy with in-memory content without network calls.
During development:
import { createClient } from '@content-island/api-client';
export const client = createClient({ ... mode: "api",});In production:
import { createClient } from '@content-island/api-client';
export const client = createClient({ ... mode: "snapshot",});The rest of your code stays the same.
The best of both worlds
In development pull from the API, in production straight from local memory.
Keep reading the implementation guides to see how to integrate it into your application.