post-W7 cleanup

This commit is contained in:
root
2026-06-15 12:00:46 +00:00
parent 75bccb778c
commit 1a5c6547b9
28 changed files with 896 additions and 301 deletions
+16 -16
View File
@@ -29,7 +29,7 @@ void render_link_card(String href, String title, String body, String meta)
</a></>
}
void render_code_example(Request& context, String eyebrow, String title, String summary, String code, String note, String language = "uce")
DValue code_example_props(String eyebrow, String title, String summary, String code, String note, String language = "uce")
{
DValue props;
props["eyebrow"] = eyebrow;
@@ -38,7 +38,7 @@ void render_code_example(Request& context, String eyebrow, String title, String
props["code"] = code;
props["note"] = note;
props["language"] = language;
<><?: component("components/code_example", props, context) ?></>
return(props);
}
RENDER(Request& context)
@@ -123,7 +123,7 @@ RENDER(Request& context)
"}\n";
String snippet_nginx =
"location ~ \\.ws\\.uce$ {\n"
"location ~ \\.uce$ {\n"
"\terror_page 418 = @uce_websocket;\n"
"\tif ($http_upgrade = \"websocket\") { return 418; }\n"
"\tinclude fastcgi_params;\n"
@@ -212,7 +212,7 @@ RENDER(Request& context)
<div class="feature-grid">
<? render_feature_card("templating", "Inline markup without framework tax", "UCE templates live directly inside handler code with escaped and raw output modes, so rendering stays local to the request logic that owns it."); ?>
<? render_feature_card("composition", "Components and sub-rendering", "Components are just .uce files. Props flow through context.props. Full pages can call other units without inventing a second application runtime."); ?>
<? render_feature_card("transport", "FastCGI for pages, HTTP for sockets", "Normal page renders stay on the FastCGI socket. Real WebSocket upgrades on .ws.uce endpoints are proxied to the built-in HTTP listener."); ?>
<? render_feature_card("transport", "FastCGI for pages, HTTP for sockets", "Normal page renders stay on the FastCGI socket. WebSocket upgrades for .uce endpoints are proxied to the built-in HTTP listener."); ?>
<? render_feature_card("operations", "nginx in front, systemd behind", "Static files stay static, nginx does the edge work, and the runtime handles compilation, request execution, and socket fan-out."); ?>
</div>
</section>
@@ -248,12 +248,12 @@ RENDER(Request& context)
</p>
</div>
<div class="code-grid">
<? render_code_example(context, "templating", "A page with request data", "Drop from C++ into markup, escape output by default, and keep request handling next to the HTML it controls.", snippet_minimal, "See the live demos for forms, headers, sessions, JSON, markdown, and more."); ?>
<? render_code_example(context, "forms", "POST + session flash", "Old-school dynamic websites still matter. UCE keeps form handling and page rendering in one file when that is the simplest thing.", snippet_forms, "Request data lives on context.get, context.post, context.cookies, and context.session."); ?>
<? render_code_example(context, "components", "Reusable UI without a second framework", "Components are ordinary .uce files. Pass props through context.props and choose when to render or return markup.", snippet_components, "Named handlers and component_render() are also available for direct output flows."); ?>
<? render_code_example(context, "content", "Markdown when you want it", "UCE also ships a markdown module, so content-heavy pages do not need an external rendering stack.", snippet_markdown, "The runtime supports markdown_to_ast() and markdown_to_html() for content pipelines and component hooks."); ?>
<? render_code_example(context, "realtime", "WebSockets with broker-owned state", "A .ws.uce page can render HTML and also accept live socket messages. Connection-local state lives on context.connection.", snippet_websocket, "The published demo includes a full chat example with reconnect logic and per-connection metadata."); ?>
<? render_code_example(context, "deploy", "nginx wiring", "Use FastCGI for ordinary requests and only send actual websocket upgrades to the runtime's built-in HTTP listener.", snippet_nginx, "Match .ws.uce before the generic .uce location so normal page loads and upgrades split correctly.", "nginx"); ?>
<?: component("components/code_example", code_example_props("templating", "A page with request data", "Drop from C++ into markup, escape output by default, and keep request handling next to the HTML it controls.", snippet_minimal, "See the live demos for forms, headers, sessions, JSON, markdown, and more."), context) ?>
<?: component("components/code_example", code_example_props("forms", "POST + session flash", "Old-school dynamic websites still matter. UCE keeps form handling and page rendering in one file when that is the simplest thing.", snippet_forms, "Request data lives on context.get, context.post, context.cookies, and context.session."), context) ?>
<?: component("components/code_example", code_example_props("components", "Reusable UI without a second framework", "Components are ordinary .uce files. Pass props through context.props and choose when to render or return markup.", snippet_components, "Named handlers and component_render() are also available for direct output flows."), context) ?>
<?: component("components/code_example", code_example_props("content", "Markdown when you want it", "UCE also ships a markdown module, so content-heavy pages do not need an external rendering stack.", snippet_markdown, "The runtime supports markdown_to_ast() and markdown_to_html() for content pipelines and component hooks."), context) ?>
<?: component("components/code_example", code_example_props("realtime", "WebSockets with broker-owned state", "Any .uce page can render HTML and also accept live socket messages with WS(Request& context). Connection-local state lives on context.connection.", snippet_websocket, "Route WebSocket upgrade requests for .uce paths to the runtime HTTP listener."), context) ?>
<?: component("components/code_example", code_example_props("deploy", "nginx wiring", "Use FastCGI for ordinary requests and send websocket upgrades to the runtime's built-in HTTP listener.", snippet_nginx, "Route upgrade requests for .uce paths to HTTP_PORT; plain page loads stay on FastCGI.", "nginx"), context) ?>
</div>
</section>
@@ -266,9 +266,9 @@ RENDER(Request& context)
<div class="deploy-card">
<h3>The intended shape</h3>
<ul>
<li>nginx serves static files directly from `site/`</li>
<li>ordinary `.uce` and plain `.ws.uce` page loads go through FastCGI</li>
<li>real websocket upgrade traffic goes to the built-in HTTP listener</li>
<li>nginx serves static files directly from `/var/www/html`</li>
<li>ordinary `.uce` page loads go through FastCGI</li>
<li>websocket upgrade traffic for `.uce` paths goes to the built-in HTTP listener</li>
<li>systemd manages the runtime binary and restart policy</li>
</ul>
</div>
@@ -276,9 +276,9 @@ RENDER(Request& context)
<h3>The practical settings</h3>
<ul>
<li>`FCGI_SOCKET_PATH=/run/uce/fastcgi.sock` for normal requests</li>
<li>`HTTP_PORT=8080` for `.ws.uce` websocket upgrades</li>
<li>`HTTP_PORT=8080` for `.uce` websocket upgrades</li>
<li>`scripts/systemd/manage-uce-service.sh` for build and service control</li>
<li>published root should be `site/`, not the repo root</li>
<li>published root should be `/var/www/html`, not the repo root</li>
</ul>
</div>
</div>
@@ -291,7 +291,7 @@ RENDER(Request& context)
</div>
<div class="link-grid">
<? render_link_card("../demo/index.uce", "Demo Area", "Open the published UCE demo pages for strings, forms, sessions, JSON, components, markdown, and runtime behavior.", "Try things"); ?>
<? render_link_card("../demo/websockets.ws.uce", "WebSocket Demo", "See the built-in broker model in a real page that renders HTML, upgrades the same route, and broadcasts chat events.", "Realtime"); ?>
<? render_link_card("../demo/websockets.ws.uce", "WebSocket Demo", "See the built-in broker model in a page that renders HTML, upgrades the same route, and broadcasts chat events.", "Realtime"); ?>
<? render_link_card("../doc/index.uce", "Reference Docs", "Browse the manual-style function and concept docs for the current runtime surface.", "Manual"); ?>
<? render_link_card("../doc/singlepage.uce", "Single-Page Docs", "Read the reference as one long page if you want the PHP-manual energy without the clicking.", "Reference"); ?>
<? render_link_card("../examples/uce-starter/index.uce", "UCE Starter", "Browse the larger example app built in UCE using components, themes, views, and richer page composition.", "Starter"); ?>
+1 -1
View File
@@ -548,7 +548,7 @@ howl.updateEffectsChain(); <span class="code-comment">// Apply changes</span>
<div class="api-section">
<h3>Frequency Analysis</h3>
<div class="api-description">
<strong>enableEQ(bands, callback, boost)</strong> - Enable real-time frequency analysis<br>
<strong>enableEQ(bands, callback, boost)</strong> - Enable live frequency analysis<br>
• bands: Number of frequency bands (default: 16)<br>
• callback: Function called with frequency data array<br>
• boost: Gain multiplier for visualization (default: 4.0)<br><br>