
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Host your SPAs with SSR experience, no extra work, gain SEO and Fast Content delivery benefits..
Sterad - "Host your SPAs with SSR experience, no extra work, gain SEO and Fast Content delivery."
Sterad is an innovative server solution that brings SEO-friendly server-side rendering capabilities to single-page applications without requiring complex SSR infrastructure. By implementing a unique client-server caching mechanism, Sterad captures rendered SPA content and serves it as static HTML to search engines and subsequent visitors.
Traditional SPAs face critical SEO challenges due to their client-rendered nature. While solutions exist, they come with tradeoffs:
| Solution | Pros | Cons |
|---|---|---|
| Static Site Generation | Fast, SEO-friendly | Requires rebuilds for content changes |
| Server-Side Rendering | Dynamic, SEO-friendly | Complex setup, high server load |
| Client-Side Rendering | Simple, dynamic | Poor SEO, slow initial load |
| Sterad | Dynamic, SEO-friendly, simple | Requires user traffic to build cache |
Sterad bridges the gap by providing near-SSR quality for search engines while maintaining the development simplicity of pure client-side SPAs.
sequenceDiagram
participant Client as User/Bot Browser
participant Sterad as Sterad Server
participant Cache as Sterad Cache (Memory & Disk)
participant SPA as SPA Dist Files
Client->>Sterad: 1. Requests Resource (GET /path)
Sterad->>Cache: 2. Check Memory Cache
alt Cache Hit
Cache-->>Sterad: 3a. Return Cached Content
Sterad-->>Client: 4a. Serve Cached Content
else Cache Miss
Sterad->>Sterad: 3b. Is it a Static Asset?
alt Yes, Static Asset
Sterad->>SPA: 4b. Read Static File
alt File Exists
SPA-->>Sterad: 5b. Static Content
Sterad->>Cache: 6b. Add to Memory Cache
Sterad-->>Client: 7b. Serve Static Content
else File Not Found
Sterad-->>Client: 5c. 404 Not Found
end
else No, Not Static Asset
Sterad->>Sterad: 4c. Should Path Be Cached?
alt Yes, Cacheable
Sterad->>Cache: 5c. Check Disk Cache
alt Disk Cache Hit
Cache-->>Sterad: 6c. Return Cached HTML
Sterad->>Cache: 7c. Add to Memory Cache
Sterad-->>Client: 8c. Serve Cached HTML
else Disk Cache Miss
Sterad-->>Client: 6d. Serve SPA Shell + Inject Script
Client->>Sterad: 7d. POST Rendered HTML to /__sterad_capture
Sterad->>Sterad: 8d. Sanitize HTML
Sterad->>Cache: 9d. Write to Disk Cache
Sterad-->>Client: 10d. Confirmation
end
else No, Not Cacheable
Sterad-->>Client: 5d. Serve SPA Shell (No Inject)
end
end
end
Client->>Sterad: Hard Reload (DELETE /__sterad_capture)
Sterad->>Cache: Clear Cache for Path
Sterad-->>Client: Confirmation
Client-Side Script:
Sterad Server:
Configuration:
Install Sterad globally:
bun add sterad
Create configuration file (sterad.toml):
# Required configuration
spa_dist = "./dist"
port = 9081
cache_routes = ["/*"]
memory_cache_limit = 100
# Optional configuration
not_cache_routes = ["/admin/*", "/api/*"]
Add build script to your package.json:
"scripts": {
"build": "vite build",
"start": "sterad"
}
Start the server:
bun run start
Sterad uses a TOML configuration file with the following options:
| Key | Required | Default | Description |
|---|---|---|---|
| spa_dist | Yes | - | Path to SPA build directory |
| port | Yes | - | Server port |
| cache_routes | Yes | - | Route patterns to cache (supports wildcards) |
| memory_cache_limit | Yes | - | Maximum in-memory cache entries |
| not_cache_routes | No | [] | Routes to exclude from caching |
| cache_dir | No | spa_dist/.sterad_cache | Custom cache directory |
| sanitization_level | No | "strict" | HTML sanitization level |
# Cache all routes
cache_routes = ["/*"]
# Cache only product pages
cache_routes = ["/products/*", "/categories/*"]
# Exclude admin routes
not_cache_routes = ["/admin/*", "/dashboard"]
Sterad implements multiple security layers to prevent XSS and malicious content injection:
<script> tagsonclick, onload, etc.)javascript: URIs<script> and <style> tagsonclick, onload, etc.)javascript: URIsWithout these fixes, Sterad should not be deployed in any public-facing environment due to high risk of XSS compromises and cache poisoning attacks.
Sterad is optimized for high performance with:
Hybrid Caching:
FROM oven/bun:1.0
WORKDIR /app
COPY . .
RUN bun install
CMD ["bun", "run", "start"]
Build and run:
docker build -t sterad-app .
docker run -p 9081:9081 sterad-app
Initial Cache Population:
Dynamic Content:
Framework Constraints:
Security Model:
Cache not updating:
Content not captured:
const selectors = [
'[data-wrapper="app"]',
"#root",
"#app",
"#__next",
'[role="main"]',
];
Performance options:
memory_cache_limit = 200
not_cache_routes = ["/static/*"]
We welcome contributions! Please follow these steps:
git checkout -b feat/awesome-feature
git commit -m "feat: implement awesome feature"
git push origin feat/awesome-feature
# Clone repository
git clone https://github.com/your/sterad.git
# Install dependencies
bun install
# Run in development mode
bun run dev
# Run tests
bun run test
For support, contact hello@codedynasty.dev.
For information, visit Codedynasty or email hello@codedynasty.dev.
Codedynasty © 2022-present, Codedynasty Contributors.
FAQs
Host your SPAs with SSR experience, no extra work, gain SEO and Fast Content delivery benefits..
We found that sterad demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.