SShortSingh.
Back to feed

Dev Builds .NET + React Site Where Chromium Pre-Renders Islands at Publish Time

0
·2 views

A developer has built a hotel-and-editorial website using ASP.NET Core 10 Razor Pages, React islands, PostgreSQL, and a Node/Playwright worker that pre-renders interactive components before any visitor arrives. The architecture separates responsibilities cleanly: Razor handles page content and SEO-friendly HTML, while React islands manage interactive elements like galleries and search controls. Rather than running Chromium on every visitor request or relying on a JavaScript-dependent SPA shell, a background Playwright worker renders the React islands at publication time and stores the completed HTML in PostgreSQL. When a visitor requests a page, the gateway serves the pre-built HTML document directly, and the visitor's browser then hydrates the already-populated islands for interactivity. This approach ensures public content and search results remain accessible without JavaScript, while treating interactive controls as a progressive enhancement.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Codename One Framework Lets Developers Share One Java Model Across App, Server, and PostgreSQL

A developer tutorial published on DEV Community demonstrates how Codename One, an open-source Java and Kotlin framework for cross-platform apps, can extend its runtime to the backend to eliminate duplicated validation logic. The approach allows a single Java model class to serve the client app, the server, and the PostgreSQL database, reducing the common full-stack problem of inconsistent field rules across layers. Using simple annotations such as @Entity and @Column, the same types used by the client ORM are recognized by the backend build, which generates routing, a DAO, and database metadata without relying on runtime reflection. A shared ReminderRules class enforces business logic like title length limits on both client and server, ensuring no caller can bypass validation. The backend module remains experimental but already supports pooled connections, an ORM, transactions, and generated routing, and is activated separately from standard client builds.

0
ProgrammingDEV Community ·

Developer Marks Milestone as KiwiEngine Components Begin Forming a Unified Framework

A developer building KiwiEngine, a custom web framework, has reached a stage where its individual libraries are being coordinated into a cohesive engine called WebEngine. Components such as Juice for styling, Seltzer for HTTP, and Nectarine for configuration have each been built with distinct responsibilities, but the focus has now shifted to how they work together. The developer emphasizes that the engine should coordinate these components without absorbing their independence, drawing a clear distinction between a library, an engine, and an application. A key goal is establishing shared lifecycle patterns — covering startup, dependency resolution, routing, and shutdown — so individual applications do not need to wire everything together manually. The Kiwi CLI is also being developed to give developers a straightforward path from project creation to a working application.

0
ProgrammingDEV Community ·

Developer Discovers Shared Sampling Function Breaks Diffuse Rendering When Changing Aperture Shape

A developer building a raytracer from scratch found that experimenting with a hexagonal camera aperture inadvertently corrupted all diffuse surfaces in the renderer. The root cause was a single shared function, SampleUnitDisk, used by both the camera lens sampler and the diffuse surface lighting model. Changing the disk-sampling logic to a hexagonal boundary affected not just bokeh shape but also Malley's method, which relies on uniform disk sampling to correctly simulate diffuse light scattering. The developer caught the bug by manually reviewing their own code, but acknowledged this was not a reliable safeguard. The incident highlights the risk of coupling physically distinct rendering systems to a single shared primitive.

0
ProgrammingDEV Community ·

Sentinel: Open-Source Tool Automates Adversarial Security Testing for LLM Apps

A developer has built Sentinel, an automated adversarial testing harness designed to identify security vulnerabilities in large language model (LLM) applications before they go live. The tool fires dynamic attack prompts across five OWASP Top 10 LLM vulnerability categories — including prompt injection, system prompt leakage, hallucination, excessive agency, and jailbreaking — and delivers a scored diagnostic report in under two minutes. Sentinel was created to fill a gap left by heavier enterprise tools like NVIDIA's Garak and Microsoft's PyRIT, which require complex configuration and are typically used by dedicated security teams. The tool includes a dashboard displaying pass rates, flagged categories, and collapsible attack-response inspection cards, and ships with an intentionally vulnerable demo chatbot to validate its detection capabilities. Sentinel was submitted as part of the MLH x DEV Writing Challenge and is publicly accessible via a live Vercel deployment.