Nexa
v0.1.0 · MIT
HTML real para los buscadores. JavaScript solo donde hace falta. Y el backend que tú quieras.Real HTML for search engines. JavaScript only where you need it. And any backend you like.
Por qué NexaWhy Nexa
Casi todos los frameworks parten de «toda la página es una app de JavaScript» y luego recuperan el SEO. Nexa parte al revés: toda página es HTML real desde el primer byte, y el JavaScript es un añadido explícito.Most frameworks start from “the whole page is a JavaScript app” and then recover SEO. Nexa starts the other way: every page is real HTML from the first byte, and JavaScript is an explicit add-on.
HTML real, SEO de serieReal HTML, SEO built in
Cada página se compila a HTML completo, con title, meta, Open Graph, JSON-LD y hreflang. Google ve el contenido sin ejecutar nada.Every page compiles to complete HTML with title, meta, Open Graph, JSON-LD and hreflang. Search engines see your content without running anything.
JavaScript mínimoMinimal JavaScript
Una página sin interacción no manda ni un byte de JavaScript. Lo interactivo se activa por nodo: al hacer clic, al verse o cuando el navegador está libre.A page with no interaction ships zero bytes of JavaScript. Interactivity activates per node: on click, when visible, or when the browser is idle.
Cualquier backendAny backend
Lee tus datos con un GET HTTP: PHP, Go, Node, Python… Sin ORM ni servidor propio. [proxy] elimina CORS y deja funcionar las cookies.Reads your data with a plain HTTP GET: PHP, Go, Node, Python… No ORM, no bundled server. [proxy] removes CORS and keeps cookies working.
IslasIslands
Un pedazo interactivo dentro de HTML estático, en TypeScript puro, React, Vue o lo que prefieras. Si el JavaScript falla, la página sigue funcionando.An interactive piece inside static HTML, in plain TypeScript, React, Vue or whatever you prefer. If the JavaScript fails, the page still works.
Modo App (SPA)App Mode (SPA)
Una SPA en TSX con señales, router, guard y cliente de API, en el mismo proyecto. Para tu panel de administración o tu dashboard.A TSX SPA with signals, router, guard and API client, in the same project. For your admin panel or dashboard.
Componentes sin runtimeComponents with no runtime
<Card title={data.x}> se expande al compilar: reutilizas HTML sin ningún coste en el navegador. También <For>, <Show>, <Markdown>.<Card title={data.x}> expands at build time: reuse HTML at zero browser cost. Plus <For>, <Show>, <Markdown>.
Idiomas que crecen contigoLanguages that grow with you
Empieza con es.json; añade en.json y de.json cuando quieras: aparecen /en y /de, con hreflang, fallback y puerta de idioma.Start with es.json; add en.json and de.json later: /en and /de appear, with hreflang, fallback and a language gate.
Un solo ejecutableA single executable
nexa bundle empaqueta el sitio con su servidor: gzip, caché, SPA y proxy. Y renderiza bajo demanda lo que publicas después de compilar.nexa bundle packs the site with its server: gzip, cache, SPA and proxy. And it renders on demand whatever you publish after building.
Seguridad probadaTested security
Todo lo que viene de tu API se escapa; javascript: y onclick desde datos se omiten; el HTML y Markdown se sanean. Probado con ataques reales en Chrome.Everything from your API is escaped; javascript: and onclick from data are dropped; HTML and Markdown are sanitized. Tested with real attacks in Chrome.
Sin backend, sin pasos manualesNo backend, no manual steps
Blog y documentación en archivos Markdown (content:/posts), islas y CSS empaquetados solos con esbuild, ruta comodín, 404.tsx, redirecciones, feed RSS y una CSP sin unsafe-inline.Blog and docs from Markdown files (content:/posts), islands and CSS bundled automatically with esbuild, catch-all routes, 404.tsx, redirects, an RSS feed and a CSP without unsafe-inline.
Escritorio con TauriDesktop with Tauri
El mismo proyecto, convertido en una app nativa de unos 11 MB con nexa build --target desktop, con un puente a funciones de Rust.The same project, turned into a ~11 MB native app with nexa build --target desktop, with a bridge to Rust functions.
Tres piezas, un proyectoThree pieces, one project
Una web real tiene contenido que debe indexarse, partes interactivas y un panel privado. Nexa te da una herramienta para cada una, y las combinas en el mismo proyecto y dominio.A real site has content that must be indexed, interactive parts and a private panel. Nexa gives you one tool for each, combined in the same project and domain.
Nexa Core
HTML real para lo que debe indexarse: blog, tienda, catálogo, landing.Real HTML for whatever must be indexed: blog, shop, catalog, landing.
export const load = {
url: "/api/posts/:slug",
};
export default function Post() {
return (
<article>
<h1>{data.title}</h1>
<Markdown text={data.body} />
</article>
);
}IslaIsland
Un pedazo interactivo dentro de una página estática. Se carga solo cuando hace falta.An interactive piece inside a static page. Loads only when needed.
<div
data-nexa-island="search"
data-nexa-strategy="visible"
/>
// search.island.ts
export default function mount(el) {
/* tu código */
}Modo AppApp Mode
Una SPA para lo privado: panel, dashboard, apps con login.An SPA for the private side: panel, dashboard, apps with login.
import { state } from "@nexa/app";
export default function C() {
const n = state(0);
return (
<button onClick={() => n.value++}>
Clics: {n}
</button>
);
}Un vistazo al códigoA look at the code
Una ruta dinámica de blog, con idiomas, SEO, datos estructurados y Markdown, en una sola página.A dynamic blog route, with languages, SEO, structured data and Markdown, in a single page.
// src/pages/[locale]/blog/[slug].tsx → /es/blog/hola-nexa · /en/blog/hola-nexa
export const load = { url: "/api/posts/:slug?lang=:locale" }; // los datos de ESTA página
export const paths = { url: "/api/posts" }; // qué páginas pre-renderizar
export const seo = { title: `${data.title} — ${t("site.name")}`, description: data.excerpt };
export default function Post() {
return (
<article>
<h1>{data.title}</h1>
<Markdown text={data.body} /> {/* Markdown de tu API, saneado */}
</article>
);
}Empieza en tres pasosStart in three steps
Necesitas Rust (por ahora Nexa se compila desde el código fuente) y Node.You need Rust (for now Nexa is built from source) and Node.
Instala NexaInstall Nexa
git clone https://github.com/oweeme/oweenexa.git cd oweenexa cargo install --path crates/nexa-cli --root ~/.localCrea un proyectoCreate a project
nexa create mi-sitio --template app cd mi-sitioÁbreloRun it
nexa dev # http://127.0.0.1:4321Sigue el tutorial paso a paso: construyes un blog bilingüe con un buscador y un panel, y lo despliegas como un solo ejecutable.Follow the step-by-step tutorial: you build a bilingual blog with a search box and a panel, and ship it as a single executable.
Cuándo usarlo, y cuándo noWhen to use it, and when not
Ideal paraGreat for
Blogs, tiendas y catálogos con SEO · sitios multi-idioma · landings y documentación · paneles de administración · apps medianas con un backend propio · apps de escritorio ligeras.Blogs, shops and catalogs with SEO · multilingual sites · landings and docs · admin panels · mid-size apps with your own backend · lightweight desktop apps.
No es paraNot for
Redes sociales enormes, editores gráficos tipo Figma o juegos 3D pesados. Si dependes del ecosistema de React, úsalo dentro de una isla, pero no esperes que Nexa lo reemplace.Huge social networks, Figma-like graphic editors or heavy 3D games. If you rely on React’s ecosystem, use it inside an island, but don’t expect Nexa to replace it.
Estado del proyectoProject status
Joven y de un solo autor: las APIs pueden cambiar. Probado a fondo en Linux; en Windows y macOS pasan los tests de Rust y una prueba de humo en cada integración continua, y la app de escritorio compila en los tres sistemas (las pruebas de navegador, solo en Linux).Young and single-author: APIs may change. Thoroughly tested on Linux; on Windows and macOS the Rust tests and a smoke test run in every CI build, and the desktop app builds on all three (browser tests, Linux only).
DocumentaciónDocumentation
En español. La referencia cubre cada función y cada opción.In Spanish. The reference covers every function and option.
Tutorial paso a pasoStep-by-step tutorial
Un blog bilingüe, una isla y un panel, desde cero.A bilingual blog, an island and a panel, from scratch.
Core, isla o Modo AppCore, island or App Mode
Qué usar para qué, con un ejemplo real.What to use for what, with a real example.
Blog y tienda con APIBlog and shop with an API
Rutas dinámicas, idiomas y publicar sin recompilar.Dynamic routes, languages and publishing without rebuilding.
SeguridadSecurity
Qué protege Nexa y qué sigue siendo tuyo.What Nexa protects and what is still yours.
React, Vue, Phaser…
Cómo usar librerías de terceros en islas y en la SPA.How to use third-party libraries in islands and the SPA.
ReferenciaReference
Cada función, atributo y opción de nexa.toml.Every function, attribute and nexa.toml option.