
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.
strata-compile
Advanced tools
Strata - Static Template Rendering Architecture. Fast, modern framework with static-first approach and zero runtime overhead.
Static Template Rendering Architecture
Strata is a compile-time web framework that resolves templates to pure HTML at build time. Zero runtime framework overhead. Maximum performance.
╔═══════════════════════════════════════════════════════╗
║ ███████╗████████╗██████╗ █████╗ ████████╗ █████╗ ║
║ ██╔════╝╚══██╔══╝██╔══██╗██╔══██╗╚══██╔══╝██╔══██╗ ║
║ ███████╗ ██║ ██████╔╝███████║ ██║ ███████║ ║
║ ╚════██║ ██║ ██╔══██╗██╔══██║ ██║ ██╔══██║ ║
║ ███████║ ██║ ██║ ██║██║ ██║ ██║ ██║ ██║ ║
║ ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ║
╚═══════════════════════════════════════════════════════╝
Strata follows three core principles:
Strata implements the STRC Pattern (Static Template Resolution with Compartmentalized Layers):
┌─────────────────────────────────────────────────────────────┐
│ BUILD TIME │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ .strata │◄───│ .compiler.sts│◄───│ .service.sts │ │
│ │ (Template) │ │ (Variables) │ │ (Logic) │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │ │ │ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ STATIC COMPILER │ │
│ │ Resolves all variables, loops, and conditionals │ │
│ └─────────────────────────────────────────────────────┘ │
│ │ │
└───────────────────────────┼─────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ RUNTIME │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ PURE HTML │ │
│ │ No Strata syntax, no framework code │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
| Layer | File Extension | Purpose | Execution |
|---|---|---|---|
| Template | .strata | HTML structure with directives | Build time |
| Compiler | .compiler.sts | Variable definitions, data | Build time |
| Service | .service.sts | Business logic, API calls | Build time* |
| Runtime | .service.sts | Optional browser interactivity | Runtime |
*Services can define both build-time data fetching and optional runtime interactivity.
# Clone the repository
git clone https://github.com/CarGDev/strata.git
cd strata
# Build the compiler
make build
# Install globally
make install
This installs:
strata - The main CLI compilercreate-strata - Project scaffolding tool# Create a new Strata project
npx create-strata-compile my-app
# Navigate to project
cd my-app
# Install dependencies
npm install
# Start development server
npm run dev
Open http://localhost:3000 to see your app.
npm run build
Output is in the dist/ folder - pure static HTML ready for any hosting.
strata)# Development server with HMR
strata-compile dev [--port 3000] [--open]
# Production build
strata-compile build [--output dist]
# Preview production build
strata-compile preview [--port 4000]
Generate new files with the correct structure:
# Generate a component
strata-compile gcomponent Button
# Creates: src/components/Button/
# ├── Button.strata
# ├── Button.compiler.sts
# ├── Button.service.sts
# └── Button.scss
# Generate a page
strata-compile gpage about
# Creates: src/pages/about/
# ├── about.strata
# ├── about.compiler.sts
# ├── about.service.sts
# └── about.scss
# Generate a service
strata-compile gservice auth
# Creates: src/services/auth.service.sts
# Generate an API contract
strata-compile gapi users
# Creates: src/api/users.api.sts
# Generate a utility
strata-compile gutil format
# Creates: src/utils/format.sts
# Generate a store
strata-compile gstore cart
# Creates: src/stores/cart.store.sts
strata-compile gc Button # component
strata-compile gp about # page
strata-compile gs auth # service
strata-compile ga users # api
strata-compile gu format # util
my-app/
├── src/
│ ├── components/ # Reusable UI components
│ │ └── Button/
│ │ ├── Button.strata
│ │ ├── Button.compiler.sts
│ │ ├── Button.service.sts
│ │ └── Button.scss
│ │
│ ├── pages/ # Route-based pages
│ │ ├── index/
│ │ │ ├── index.strata
│ │ │ ├── index.compiler.sts
│ │ │ ├── index.service.sts
│ │ │ └── index.scss
│ │ └── about/
│ │ └── ...
│ │
│ ├── services/ # Business logic
│ │ └── auth.service.sts
│ │
│ ├── api/ # API contracts
│ │ └── users.api.sts
│ │
│ ├── stores/ # State management
│ │ └── cart.store.sts
│ │
│ ├── utils/ # Pure utilities
│ │ └── format.sts
│ │
│ └── assets/
│ └── styles/
│ ├── _variables.scss
│ └── global.scss
│
├── public/ # Static assets (copied as-is)
├── dist/ # Build output
├── strataconfig.ts # Project configuration
└── package.json
.strata - Template FilesPure HTML structure with Strata directives. No logic, no JavaScript.
<template>
<main class="page">
<h1>{ title }</h1>
<p>{ description }</p>
</main>
</template>
Rules:
<template> root.strata files<script> tags.compiler.sts.compiler.sts - Compiler FilesDefines variables available to the template. Executed at build time.
// page.compiler.sts
export const title = 'My Page';
export const description = 'Welcome to my page';
// Arrays for loops
export const items = [
{ id: 1, name: 'Item 1' },
{ id: 2, name: 'Item 2' },
];
// Booleans for conditionals
export const isProduction = false;
export const showBanner = true;
Rules:
.service.sts, .api.sts, .sts.strata files.service.sts - Service FilesBusiness logic layer. Can define both build-time and runtime behavior.
// auth.service.sts
// Build-time: fetch data during compilation
export async function fetchUserData() {
const response = await fetch('https://api.example.com/user');
return response.json();
}
// Runtime: browser interactivity (optional)
const mount = function() {
document.getElementById('btn').addEventListener('click', () => {
console.log('Clicked!');
});
};
return { mount };
Rules:
.api.sts, .sts.strata, .compiler.sts.api.sts - API Contract FilesDeclarative API endpoint definitions.
// users.api.sts
export const endpoints = {
getUsers: {
method: 'GET',
url: '/api/users',
cache: 3600
},
createUser: {
method: 'POST',
url: '/api/users',
body: { name: 'string', email: 'string' }
}
};
.sts - Utility FilesPure functions with no side effects. Can be imported anywhere.
// format.sts
export function formatDate(date) {
return new Date(date).toLocaleDateString();
}
export function capitalize(str) {
return str.charAt(0).toUpperCase() + str.slice(1);
}
.scss - Style FilesScoped styles for components/pages. Standard SCSS syntax.
// Button.scss
.button {
padding: 0.5rem 1rem;
border-radius: 4px;
&:hover {
opacity: 0.9;
}
}
{ variableName }
Variables are defined in the corresponding .compiler.sts file.
<!-- page.strata -->
<h1>{ title }</h1>
<p>Author: { author.name }</p>
// page.compiler.sts
export const title = 'Hello World';
export const author = { name: 'John Doe' };
Output:
<h1>Hello World</h1>
<p>Author: John Doe</p>
s-for{ s-for item in items }
<!-- content repeated for each item -->
{ /s-for }
With index:
{ s-for item, index in items }
<div>#{ index }: { item.name }</div>
{ /s-for }
Example:
<!-- page.strata -->
<ul>
{ s-for user in users }
<li>{ user.name } - { user.email }</li>
{ /s-for }
</ul>
// page.compiler.sts
export const users = [
{ name: 'Alice', email: 'alice@example.com' },
{ name: 'Bob', email: 'bob@example.com' },
];
Output:
<ul>
<li>Alice - alice@example.com</li>
<li>Bob - bob@example.com</li>
</ul>
s-if / s-elif / s-else{ s-if condition }
<!-- shown if condition is true -->
{ s-elif otherCondition }
<!-- shown if otherCondition is true -->
{ s-else }
<!-- shown if all conditions are false -->
{ /s-if }
Example:
{ s-if isAdmin }
<div class="admin-panel">Admin Controls</div>
{ s-elif isModerator }
<div class="mod-panel">Moderator Controls</div>
{ s-else }
<div class="user-panel">User Dashboard</div>
{ /s-if }
// page.compiler.sts
export const isAdmin = false;
export const isModerator = true;
Output:
<div class="mod-panel">Moderator Controls</div>
{ s-if !isLoggedIn }
<a href="/login">Please log in</a>
{ /s-if }
{ s-if count > 0 }
<p>You have { count } items</p>
{ /s-if }
{ s-if status === 'active' }
<span class="badge">Active</span>
{ /s-if }
Supported operators: ===, ==, !==, !=, >, <, >=, <=
{ s-imp "@components/Button" }
<!-- src/pages/index/index.strata -->
<template>
<main class="home">
<h1>{ title }</h1>
<p>{ subtitle }</p>
<section class="features">
{ s-for feature in features }
<div class="feature-card">
<span>{ feature.icon }</span>
<h3>{ feature.name }</h3>
<p>{ feature.description }</p>
</div>
{ /s-for }
</section>
{ s-if showCTA }
<a href="/signup" class="cta">Get Started</a>
{ /s-if }
</main>
</template>
// src/pages/index/index.compiler.sts
export const title = 'Welcome to My App';
export const subtitle = 'Build faster, deploy smarter';
export const showCTA = true;
export const features = [
{ icon: '⚡', name: 'Fast', description: 'Blazing fast performance' },
{ icon: '🔒', name: 'Secure', description: 'Built-in security' },
{ icon: '📦', name: 'Simple', description: 'Easy to use' },
];
<!-- src/pages/counter/counter.strata -->
<template>
<main class="counter-page">
<h1>Counter Example</h1>
<button id="counterBtn">Click Me</button>
<p>Count: <span id="count">0</span></p>
</main>
</template>
// src/pages/counter/counter.service.sts
const mount = function() {
const btn = document.getElementById('counterBtn');
const countEl = document.getElementById('count');
let count = 0;
btn.addEventListener('click', function() {
count++;
countEl.textContent = count;
});
};
return { mount };
// src/pages/pokemon/pokemon.compiler.sts
export const title = 'Pokemon Gallery';
// This data is fetched at BUILD TIME, not runtime
export const pokemons = [
{ id: 1, name: 'Bulbasaur', type: 'grass' },
{ id: 4, name: 'Charmander', type: 'fire' },
{ id: 7, name: 'Squirtle', type: 'water' },
];
export const totalCount = pokemons.length;
<!-- src/pages/pokemon/pokemon.strata -->
<template>
<main class="pokemon-page">
<h1>{ title }</h1>
<p>Showing { totalCount } Pokemon</p>
<div class="grid">
{ s-for pokemon in pokemons }
<div class="card">
<h3>{ pokemon.name }</h3>
<span class="type">{ pokemon.type }</span>
</div>
{ /s-for }
</div>
</main>
</template>
Strata enforces a strict import hierarchy to maintain separation of concerns:
┌─────────────┐
│ .strata │ Can only import: .strata
└──────┬──────┘
│
▼
┌─────────────────┐
│ .compiler.sts │ Can import: .service.sts, .api.sts, .sts
└──────┬──────────┘
│
▼
┌─────────────────┐
│ .service.sts │ Can import: .api.sts, .sts
└──────┬──────────┘
│
▼
┌─────────────────┐
│ .api.sts │ Can import: .sts
└──────┬──────────┘
│
▼
┌─────────────────┐
│ .sts │ Can import: .sts only
└─────────────────┘
Violations will cause build errors.
make test
# Build compiler
make build
# Build and install
make install
# Clean build artifacts
make clean
// strataconfig.ts
export default {
// Development server port
port: 3000,
// API proxy for development
api: {
baseUrl: 'http://localhost:8080',
proxy: true
},
// Build output directory
output: 'dist',
// Enable source maps in development
sourceMaps: true
};
Proprietary - All Rights Reserved
This software is currently in development and is not available for public use, modification, or distribution. See LICENSE for details.
Strata - Code Faster. Load Quick. Deploy ASAP.
FAQs
Strata - Static Template Rendering Architecture. Fast, modern framework with static-first approach and zero runtime overhead.
The npm package strata-compile receives a total of 0 weekly downloads. As such, strata-compile popularity was classified as not popular.
We found that strata-compile 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.