diff --git a/docs/architecture/sidebar-injection.html b/docs/architecture/sidebar-injection.html new file mode 100644 index 0000000..b3c9d1b --- /dev/null +++ b/docs/architecture/sidebar-injection.html @@ -0,0 +1,191 @@ + + + + + + Sidebar Injection - Soleprint + + + + + +
+
+

Sidebar Injection

+

+ How managed room sidebar works + Como funciona el sidebar del managed room +

+
+ +
+
+

Overview

+

The soleprint sidebar is injected into managed app pages using a hybrid nginx + JavaScript approach. This allows any frontend framework (React, Next.js, static HTML) to receive the sidebar without code modifications.

+

El sidebar de soleprint se inyecta en las paginas de apps manejadas usando un enfoque hibrido nginx + JavaScript. Esto permite que cualquier framework frontend (React, Next.js, HTML estatico) reciba el sidebar sin modificaciones de codigo.

+
+ +
+

+ How It Works + Como Funciona +

+
+┌─────────────────────────────────────────────────────────────────┐
+│                         Browser Request                          │
+│                    http://room.spr.local.ar/                     │
+└─────────────────────────────────────────────────────────────────┘
+                                  │
+                                  ▼
+┌─────────────────────────────────────────────────────────────────┐
+│                            Nginx                                 │
+│                                                                  │
+│  1. Routes /spr/* → soleprint:PORT (sidebar assets + API)       │
+│  2. Routes /* → frontend:PORT (app pages)                       │
+│  3. Injects CSS+JS into HTML responses via sub_filter           │
+└─────────────────────────────────────────────────────────────────┘
+                                  │
+                                  ▼
+┌─────────────────────────────────────────────────────────────────┐
+│                       Browser Renders                            │
+│                                                                  │
+│  1. Page loads with injected CSS (sidebar styles ready)         │
+│  2. sidebar.js executes (deferred, after DOM ready)             │
+│  3. JS fetches /spr/api/sidebar/config                          │
+│  4. JS creates sidebar DOM elements and injects into page       │
+│  5. Sidebar appears on left side, pushes content with margin    │
+└─────────────────────────────────────────────────────────────────┘
+
+ +
+

+ Key Design Decisions + Decisiones de Diseno Clave +

+
+
+

Why nginx sub_filter?Por que nginx sub_filter?

+

Framework agnostic: Works with any frontend. No app changes needed. Easy to disable.

+

Agnostico de framework: Funciona con cualquier frontend. Sin cambios en la app. Facil de deshabilitar.

+
+
+

Why inject into </head>?Por que inyectar en </head>?

+

Next.js and streaming SSR may not include </body> in initial response. </head> is always present.

+

Next.js y SSR streaming pueden no incluir </body> en la respuesta inicial. </head> siempre esta presente.

+
+
+

Why JS instead of iframe?Por que JS en vez de iframe?

+

No isolation issues, better UX (no double scrollbars), simpler CSS with margin-left.

+

Sin problemas de aislamiento, mejor UX (sin doble scrollbar), CSS mas simple con margin-left.

+
+
+
+ +
+

+ Nginx Configuration + Configuracion de Nginx +

+

The nginx config injects CSS+JS into HTML responses:

+

La config de nginx inyecta CSS+JS en las respuestas HTML:

+
location / {
+    proxy_pass http://frontend:PORT;
+    proxy_set_header Accept-Encoding "";  # Required for sub_filter
+
+    # Inject sidebar
+    sub_filter '</head>'
+      '<link rel="stylesheet" href="/spr/sidebar.css">
+       <script src="/spr/sidebar.js" defer></script></head>';
+    sub_filter_once off;
+    sub_filter_types text/html;
+}
+
+ +
+

+ Port Allocation + Asignacion de Puertos +

+

Each room uses unique ports for concurrent operation:

+

Cada room usa puertos unicos para operacion concurrente:

+ + + + + +
RoomSoleprintFrontendBackend
amar1200030008001
dlt120103010-
sample1202030208020
+
+ +
+

+ Sidebar Config API + API de Config del Sidebar +

+

The sidebar JS fetches configuration from /spr/api/sidebar/config:

+

El JS del sidebar obtiene configuracion de /spr/api/sidebar/config:

+
{
+  "room": "amar",
+  "soleprint_base": "/spr",
+  "auth_enabled": true,
+  "tools": {
+    "artery": "/spr/artery",
+    "atlas": "/spr/atlas",
+    "station": "/spr/station"
+  }
+}
+
+ +
+

Troubleshooting

+
+
+

Sidebar not appearingSidebar no aparece

+

Check if soleprint is running. Verify nginx has Accept-Encoding "". Hard refresh (Ctrl+Shift+R).

+

Verificar que soleprint esta corriendo. Verificar que nginx tiene Accept-Encoding "". Refresco forzado (Ctrl+Shift+R).

+
+
+

sub_filter not workingsub_filter no funciona

+

Ensure proxy_set_header Accept-Encoding "" is set. Check response is text/html.

+

Asegurar que proxy_set_header Accept-Encoding "" esta seteado. Verificar que la respuesta es text/html.

+
+
+
+
+ + + + diff --git a/docs/artery/index.html b/docs/artery/index.html new file mode 100644 index 0000000..a44bac3 --- /dev/null +++ b/docs/artery/index.html @@ -0,0 +1,314 @@ + + + + + + Artery - Soleprint + + + + + +
+
+

Artery

+

Todo lo vital

+
+ +
+
+

+ ModelModelo +

+
+
+

Pulse

+

+ Composed data flow: a vein configured for a room + with storage +

+

+ Flujo de datos compuesto: vein configurado para un + room con almacenamiento +

+
+
+

Vein

+

API connector

+

Conector API

+
+
+

Room

+

Config/env

+

Config/entorno

+
+
+

Depot

+

Data storage

+

Almacenamiento

+
+
+
+
+

Shunt

+

+ Mock connector for testing - same interface, fake + data +

+

+ Conector mock para testing - misma interfaz, datos + falsos +

+
+
+

Vein Interface

+

Same API shape

+

Misma forma de API

+
+
+

Mock Data

+

Fake responses

+

Respuestas falsas

+
+
+
+
+

Plexus

+

+ Full application when you need more than data flow +

+

+ Aplicacion completa cuando necesitas mas que flujo + de datos +

+
+
+

Backend

+

FastAPI server

+
+
+

Frontend

+

Web UI

+
+
+

Infra

+

DB, queues, etc

+

DB, colas, etc

+
+
+
+
+
+ +
+

+ ArchitectureArquitectura +

+ Artery Hierarchy +
+ +
+

+ ComponentsComponentes +

+
+
+

Vein

+

+ Stateless API connector. Connects to external + services like Google Sheets, Jira, Slack. Pure data + flow - no state, no storage. +

+

+ Conector API sin estado. Conecta a servicios + externos como Google Sheets, Jira, Slack. Flujo de + datos puro. +

+
+
+

Shunt

+

+ Mock connector for testing. Same interface as a vein + but returns fake data. +

+

+ Conector mock para testing. Misma interfaz que un + vein pero devuelve datos falsos. +

+
+
+

Pulse

+

+ Composed data flow. Formula: + Vein + Room + Depot. +

+

+ Flujo de datos compuesto. Formula: + Vein + Room + Depot. +

+
+
+

Plexus

+

+ Full application with backend, frontend, and + infrastructure. +

+

+ Aplicacion completa con backend, frontend e + infraestructura. +

+
+
+
+ +
+

+ Shared ComponentsComponentes Compartidos +

+
+
+

Room

+

+ Runtime environment configuration. Each room is an + isolated instance with its own config and + credentials. +

+

+ Configuracion del entorno. Cada room es una + instancia aislada con su propia config y + credenciales. +

+
+
+

Depot

+

+ Data storage / provisions. JSON files, configs, + cached responses. +

+

+ Almacenamiento de datos. Archivos JSON, configs, + respuestas cacheadas. +

+
+
+
+ +
+

+ Available VeinsVeins Disponibles +

+ +
+
+ + + + diff --git a/docs/atlas/index.html b/docs/atlas/index.html new file mode 100644 index 0000000..1141dae --- /dev/null +++ b/docs/atlas/index.html @@ -0,0 +1,258 @@ + + + + + + Atlas - Soleprint + + + + + +
+
+

Atlas

+

Todo lo escrito

+
+ +
+
+

+ ModelModelo +

+
+
+

Plain Book

+

+ Static documentation with an index page +

+

+ Documentacion estatica con una pagina indice +

+
+
+

index.html

+

Entry point

+

Punto de entrada

+
+
+

Depot

+

Static content

+

Contenido estatico

+
+
+
+
+

Templated Book

+

+ Dynamic docs from template + data elements +

+

+ Docs dinamicos desde template + elementos de datos +

+
+
+

Template

+

Jinja2 pattern

+

Patron Jinja2

+
+
+

Depot

+

Data elements

+

Elementos de datos

+
+
+
+
+
+ +
+

+ ArchitectureArquitectura +

+ System Overview +
+ +
+

+ ComponentsComponentes +

+
+
+

Book

+

+ Collection of related documentation. Can be plain + (static HTML) or templated (template + depot + elements). +

+

+ Coleccion de documentacion relacionada. Puede ser + plain (HTML estatico) o templated (template + + elementos de depot). +

+
+
+

Template

+

+ Jinja2 templates that generate documentation. Define + the structure once, fill with data from depot. +

+

+ Templates Jinja2 que generan documentacion. Definen + la estructura una vez, llenan con datos del depot. +

+
+
+
+ +
+

+ Shared ComponentsComponentes Compartidos +

+
+
+

Room

+

+ Runtime environment configuration. Each room can + have its own atlas with project-specific books. +

+

+ Configuracion del entorno. Cada room puede tener su + propio atlas con books especificos del proyecto. +

+
+
+

Depot

+

+ Data storage. For plain books: static files. For + templated books: elements that fill the template. +

+

+ Almacenamiento de datos. Para plain books: archivos + estaticos. Para templated books: elementos que + llenan el template. +

+
+
+
+ +
+

+ ExamplesEjemplos +

+
+
+

Feature Flow

+

+ Plain book - HTML presentation explaining the + standardization pipeline. +

+

+ Plain book - Presentacion HTML explicando el + pipeline de estandarizacion. +

+
+
+

Feature Form Samples

+

+ Templated book - Form template + depot of actual + feature forms. +

+

+ Templated book - Template de formulario + depot de + feature forms reales. +

+
+
+

Gherkin Samples

+

+ Templated book - Gherkin viewer + depot of .feature + files. +

+

+ Templated book - Visor Gherkin + depot de archivos + .feature. +

+
+
+

Arch Model

+

+ Plain book - Static site with architecture diagrams. +

+

+ Plain book - Sitio estatico con diagramas de + arquitectura. +

+
+
+
+
+ + + + diff --git a/docs/index.html b/docs/index.html index ce08a28..e7b65a9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5,39 +5,151 @@ Soleprint - Documentation + +
+

Soleprint

-

- Cada paso deja huella / Each step leaves a mark +

Cada paso deja huella

+

+ Pluggable stuff to tackle any challenge + Piezas enchufables para cualquier desafio

+ + Try the Demo + Ver Demo +
-

Documentation

-
+

+ The Three Systems + Los Tres Sistemas +

+ @@ -45,53 +157,106 @@

Quick Start

-
-

Build & Run

-
-# Build standalone
-python build.py
-cd gen/standalone && .venv/bin/python run.py
+                
+# Clone
+git clone https://git.mcrn.ar/soleprint
+cd soleprint
 
-# Build with room config
-python build.py --cfg amar
-cd gen/amar && .venv/bin/python run.py
+# Setup (once)
+python -m venv .venv && source .venv/bin/activate
+pip install -r requirements.txt
 
-# Visit http://localhost:12000
-
+# Option 1: Build standalone (soleprint only) +python build.py --cfg standalone +cd gen/standalone && ./ctrl/start.sh +# Visit http://localhost:12000 + +# Option 2: Build managed room (soleprint + your app) +python build.py --cfg myroom +cd gen/myroom && ./ctrl/start.sh +# Visit http://myroom.spr.local.ar + +# Option 3: Use the installer (coming soon) + +

+ Minimal config example: + Ejemplo de config minima: +

+
+// cfg/myroom/config.json
+{
+  "room": "myroom",
+  "artery": {
+    "veins": ["google", "jira", "slack"],
+    "shunts": ["mercadopago"]
+  },
+  "atlas": {
+    "books": ["gherkin", "feature-flow"]
+  },
+  "station": {
+    "tools": ["tester", "modelgen"],
+    "monitors": ["databrowse"]
+  }
+}
-

What Soleprint Solves

+

+ Architecture + Arquitectura +

+

Deep dive into how soleprint works.

+

Profundizando en como funciona soleprint.

diff --git a/docs/lang-toggle.js b/docs/lang-toggle.js new file mode 100644 index 0000000..3f810ca --- /dev/null +++ b/docs/lang-toggle.js @@ -0,0 +1,54 @@ +// Language toggle for soleprint docs +// Include this script and add:
in header + +(function () { + function setLang(lang) { + localStorage.setItem("spr-docs-lang", lang); + document.documentElement.lang = lang; + document.querySelectorAll(".lang-toggle button").forEach((btn) => { + btn.classList.toggle("active", btn.dataset.lang === lang); + }); + } + + document.addEventListener("DOMContentLoaded", () => { + const currentLang = localStorage.getItem("spr-docs-lang") || "en"; + + // Inject toggle HTML + const container = document.getElementById("lang-toggle"); + if (container) { + container.className = "lang-toggle"; + + const btnEn = document.createElement("button"); + btnEn.textContent = "EN"; + btnEn.dataset.lang = "en"; + btnEn.addEventListener("click", () => setLang("en")); + + const btnEs = document.createElement("button"); + btnEs.textContent = "ES"; + btnEs.dataset.lang = "es"; + btnEs.addEventListener("click", () => setLang("es")); + + container.appendChild(btnEn); + container.appendChild(btnEs); + } + + setLang(currentLang); + }); + + // Inject styles + const style = document.createElement("style"); + style.textContent = ` + .lang-toggle { position: absolute; top: 1.5rem; right: 2rem; display: flex; border: 1px solid #888; border-radius: 4px; overflow: hidden; } + .lang-toggle button { background: #1a1a1a; border: none; color: #888; padding: 0.4rem 0.8rem; font-family: inherit; font-size: 0.75rem; cursor: pointer; } + .lang-toggle button:first-child { border-right: 1px solid #888; } + .lang-toggle button:hover { background: #0a0a0a; color: #fff; } + .lang-toggle button.active { background: var(--accent, #b91c1c); color: #fff; } + header { position: relative; } + .lang-en, .lang-es { display: none; } + html[lang="en"] .lang-en { display: block; } + html[lang="es"] .lang-es { display: block; } + html[lang="en"] span.lang-en { display: inline; } + html[lang="es"] span.lang-es { display: inline; } + `; + document.head.appendChild(style); +})(); diff --git a/docs/station/index.html b/docs/station/index.html new file mode 100644 index 0000000..923888b --- /dev/null +++ b/docs/station/index.html @@ -0,0 +1,333 @@ + + + + + + Station - Soleprint + + + + + +
+
+

Station

+

Todo lo construido

+
+ +
+
+

+ ModelModelo +

+
+
+

Desk

+

+ Control center - collection of monitors +

+

+ Centro de control - coleccion de monitores +

+
+
+

Monitor

+

Web UI

+
+
+

Monitor

+

Web UI

+
+
+

...

+

+
+
+
+
+

Monitor

+

+ Web interface - always running, always watching +

+

+ Interfaz web - siempre corriendo, siempre observando +

+
+
+

Web UI

+

Dashboard

+
+
+

Room

+

Config/env

+

Config/entorno

+
+
+

Depot

+

Data source

+

Fuente de datos

+
+
+
+
+

Tool

+

+ CLI utility - run once, get results +

+

+ Utilidad CLI - ejecutar una vez, obtener resultados +

+
+
+

CLI

+

Command interface

+

Interfaz de comandos

+
+
+

Room

+

Config/env

+

Config/entorno

+
+
+

Depot

+

Output storage

+

Almacenamiento de salida

+
+
+
+
+
+ +
+

+ ArchitectureArquitectura +

+ System Overview +
+ +
+

+ ComponentsComponentes +

+
+
+

Desk

+

+ Collection of monitors. Your control center with all + the views you need. +

+

+ Coleccion de monitores. Tu centro de control con + todas las vistas que necesitas. +

+
+
+

Monitor

+

+ Web interfaces for observation. Data browsers, + dashboards, log viewers. Always running. +

+

+ Interfaces web para observacion. Navegadores de + datos, dashboards, visores de logs. Siempre + corriendo. +

+
+
+

Tool

+

+ CLI utilities and scripts. Code generators, test + runners, infra provisioners. Run once, get results. +

+

+ Utilidades CLI y scripts. Generadores de codigo, + test runners, provisioners de infra. Ejecutar una + vez, obtener resultados. +

+
+
+
+ +
+

+ Shared ComponentsComponentes Compartidos +

+
+
+

Room

+

+ Runtime environment configuration. Tools and + monitors are configured per-room for isolation. +

+

+ Configuracion del entorno. Tools y monitors se + configuran por room para aislamiento. +

+
+
+

Depot

+

+ Data storage. For tools: output files, results. For + monitors: data to display. +

+

+ Almacenamiento de datos. Para tools: archivos de + salida, resultados. Para monitors: datos a mostrar. +

+
+
+
+ +
+

+ Available ToolsTools Disponibles +

+
+
+

Tester

+

+ API and Playwright test runner. Discover tests, run + them, collect artifacts. +

+

+ Test runner de API y Playwright. Descubrir tests, + ejecutarlos, recolectar artefactos. +

+
+
+

ModelGen

+

+ Generate model diagrams from code. Introspect + soleprint structure, output SVG. +

+

+ Generar diagramas de modelo desde codigo. + Introspeccionar estructura de soleprint, generar + SVG. +

+
+
+

Infra

+

+ Infrastructure provisioners. AWS, GCP, DigitalOcean + deployment helpers. +

+

+ Provisioners de infraestructura. Helpers de deploy + para AWS, GCP, DigitalOcean. +

+
+
+

DataGen

+

+ Test data generation. Create realistic fake data for + development. +

+

+ Generacion de datos de test. Crear datos falsos + realistas para desarrollo. +

+
+
+

DataBrowse

+

+ Navigable data model graphs generated from existing + models. +

+

+ Grafos de modelo de datos navegables generados desde + modelos existentes. +

+
+
+
+ +
+

+ Available MonitorsMonitors Disponibles +

+
+
+

DataBrowse

+

+ Navigable data model graphs generated from existing + models. +

+

+ Grafos de modelo de datos navegables generados desde + modelos existentes. +

+
+
+
+
+ + + +