Case study · UI/UX & AI-driven prototype

FCD Genthe human stays in control of a CMS that writes its own pages

FCD Gen is a local mini CMS, no install required: one column for the site, an assistant beside it, and every page produced as one complete HTML file, SEO and GEO ready. This case study tells how the interface was designed so a language model serves a coherent site rather than twenty-six pages that vaguely resemble each other.

Role
UX/UI, prototype, Figma design system
Real case
FCD's institutional site: 26 content items, 11 menu entries
Engine
Gemini API (text, Nano Banana, Veo), user's own key
Scope
Working prototype, continuously tested on the real site
Dashboard, "Full view" layout, on the imported FCD site.

Open FCD Gen ↗The deployed tool, usable online.

26FCD site content served by a single template
27templates filtered by content type, each with its thumbnail
53audit controls, including measured contrast and above-the-fold checks
14widgets on a closed 12 × 12 cell grid
246Figma components driven by a fidelity property
0build step: open it, it runs
The challenge

Generating a page is easy. Generating a site is not.

A language model can write a beautiful homepage. Ask it for the twenty-sixth one, and the header has changed, the menu has forgotten two sections, and nobody knows whether the page fits on a phone screen.

The initial need was simple: produce FCD's institutional site — pages, blog, press room — relying on AI, without falling back into copy-pasting from a chat into a code editor.

The real design question lies elsewhere. A generative AI is very good at proposing and very bad at remembering. The interface therefore has to carry everything the model cannot guarantee on its own: consistency from one page to the next, proof that quality is actually there, and certainty that no change gets applied behind the editor's back.

Hence a rule held throughout the project: whatever must be identical everywhere is written by the application, not by the model.

  • The styling driftsA single template: the model only renders the <main>, the application assembles header, footer and metadata.
  • The menu goes staleNavigation is regenerated on every assembly, from the actual pages.
  • Quality is invisibleAn audit of 53 checks, with measurements taken in the browser rather than a reading of the CSS.
  • One tweak breaks the restTargeted regeneration: unchecked sections never go through the API.
  • The AI applies changes without askingEvery proposal from the model is checked, previewed, then applied or discarded.
Approach

Prototype first, mockup second

Reversing the usual order was a deliberate choice: on an AI-driven tool, you don't know what's actually a problem until you've seen it run on a real site.

  1. Working prototype

    Sidenav, chat, preview, code, audit, visuals. Connected to Gemini, tested on the real FCD site.

  2. Measured UX review

    Nielsen heuristics and WCAG 2.2 AA, every finding measured in the browser or read in the code.

  3. Figma design system

    246 components, property Fidelity = High | Wireframe, 688 variants.

  4. Figma reconciled with reality

    The dashboard originally drawn documents what was actually built, plus what had been proposed.

  5. Deliverable

    This case study, and its front-end specifications for the next development phase.

Screen architecture

Three columns, no horizontal bar

Everything adjustable lives in the left column — including the editor's own tools. The top bar was removed: it was covering the corner of the page in preview.

One column, two states

Site navigation — Content, Press room, Libraries, Site — or, with a page open, that page's editing tools. A back button brings it back.

One assistant per page

Each content item has its own conversation and version history. The column is resized by its handle and can collapse entirely.

One stage, three views

Default dashboard, content list by section, or editor with Preview, Code, Audit and Visuals.

Collapse to focus

Both side columns collapse: navigation into an icon rail, the assistant completely, with a tab to bring it back. The animation runs through grid-template-columns, so nothing jumps.

The set of 33 icons was redrawn as line icons: the first, isometric version was no longer legible at 20 px. An icon that needs to be recognized in a rail cannot be an illustration.

The choice is remembered, like the assistant's width and the last view opened: you come back to where you were.

Modular dashboard

A closed grid: the screen doesn't scroll, it fills up

Each widget is the compact version of something the tool already does. They can be moved, resized, and spread across up to eight screens.

Customize. Drag by the header, drop on another card to swap them, pull the corner to resize.
Library. Five families — figures, work, content, site, actions. The check mark shows what's already on screen.
Templates. A template only describes widget names; positions are computed on open by the function pack, so no template can ever contain an overlap.

Gestures

GestureEffect
Drag a card by its headerMove it to a free spot
Drop it on another cardThe two swap places
Pull the bottom-right cornerResize, without overlapping a neighbor
Cross on the headerRemove from screen
“+” in the tabsOne more screen, renameable with a double-click
Deliberate choice

Adding to a full screen is refused

Row height is calculated from the space actually available: everything fits at a glance. The trade-off is disclosed to the user, with a message offering to open a new tab.

A card dropped where there's no room returns to its starting point, rather than pushing three others in a cascade. Predictability comes before density.

From wireframe to real

The Figma wireframe was recalibrated against the prototype, not the other way round: same grid, same dimensions measured in the code. Drag to compare.

Figma wireframe of the dashboard, in grayscale. The same dashboard in the prototype, at high fidelity.
Create a content item

The question “what kind of page?” comes up at the right time

The template choice happens right at creation, filtered by content type — not afterwards in a separate dialog.

Five steps. Type, topic, intent, direction, summary. The resulting brief stays readable before being sent to the model.
Thumbnails that draw the structure. A brief has no page to capture: the thumbnail assembles in SVG the blocks it calls for — 30 wireframe blocks.

Page

WebPage

Appears in the menu. 12 templates: landing, local service, case study, pricing, help center…

Article

BlogPosting

Dated, outside the menu, lives in the blog index.

Press release

NewsArticle

8 templates following the genre's conventions: dateline, inverted pyramid, attributed quote, quotable facts.

Press kit

Report

6 templates, downloadable resources and a generated ZIP press kit.

The type determines three things: the brief sent to the model, the structured data — written by the application, not the model — and the index the content appears in.

Tree view. A thread from a socket to a card attaches a page; a double-click opens it.
Navigations. The model's suggestion is checked against the real pages: a made-up identifier is rejected, the reason shown.
A single header. The container marked data-site-nav triggers menu sync across all pages.
The editor

See, tweak, compare — with no intermediate format

Editing acts on the actually rendered DOM. What you see, what the model reworks and what gets exported are the same document.

The left column switches to editing tools: View (Preview, Code, Audit, Visuals), then Resume page.

Regenerate only a part

Redoing a whole page to fix one section harms the others: the model always rephrases a little of what it rewrites. Regenerate sections lists the top-level blocks with their title and weight, and lets you check which ones to redo.

Only the checked sections are sent. The others come back identical, down to the character, because they never leave the browser. If the response doesn't match the expected format, nothing is changed — and the tool says so.

Another version, not a tweak

Another version asks for an alternative: same topic, same information, same identity, but a different composition. The current structure is sent along with the instruction to depart from it, and the temperature is raised for the duration of this request.

The variant is added as a labeled version: the two compositions stay comparable and interchangeable through the version selector.

Measured quality

Measure rather than declare

The audit doesn't read the CSS to guess: it renders the page in isolated iframes and measures contrast node by node, the actually displayed background, layout gaps, and above-the-fold content.

Two geometric checks

Space usage scans every grid and flex container at 1280 px and flags any row leaving more than a quarter of its width empty — two cards in a three-column grid, an orphaned last row.

Above the fold renders the page at three sizes. A title size calculated from width alone yields 144 px on a 1920×900 screen and cuts off the whole first screen: the kit's scale is therefore sized on min(vw, svh).

The accessibility score is static: it replaces neither the keyboard nor the screen reader. The UX review recommends renaming it.

The UX review: the tool was weaker than the pages it produces

The review's most important, and most reassuring, result: the UI kit holds AA level on the produced pages. The interface's flaws, though numerous, are very localized — a single color token explains three-quarters of the gaps.

FindingMeasurementProposed fixStatus
Secondary text below AA31 nodes · 2.68:1--ink-3 of #9E9E9E à #6E6E6EOpen
Field borders1.14:1 (3:1 required)Token --field-line:#8A8A8AOpen
Silent editor tabsrole="tab" seularia-selected, aria-controls, tabpanelOpen
System messages not announced#toast sans rôlerole="status" aria-live="polite"Open
Audit tab too long91% “compliant”Collapse passing checksTo schedule
Text too small43 nœuds < 12 pxFloor of 12 px, targets of 24 pxTo schedule
Contrast of produced pages0 écart sur l'accueil—Compliant

The fix batch (contrasts, field borders, toast, tabs) is estimated at one hour and measurable right after — the first thing to do before any demonstration.

Theme

A dark mode that isn't an inverted light mode

Two separate settings: the tool, and the pages it produces. In dark mode, surfaces get lighter to read as raised, since a shadow is no longer visible.

On the produced-pages side, the system instruction enforces the rules that make the difference: background never pure black, text never pure white, lightened and desaturated accent, color-scheme: dark. The audit then checks the actually rendered background.

Design decisions

Six trade-offs, and what they cost

A decision with no trade-off isn't one. Each is written down with what it gives up.

The application writes the styling, the model writes the content

Header and footer identical everywhere by construction. An iteration only sends back the <main>: noticeably fewer tokens, no risk of breaking the menu.

Trade-offA page can no longer have a header of its own.

Never applied behind your back

A menu plan proposed by the model is checked against the real pages, previewed, then applied or discarded.

Trade-offOne extra click for every proposal.

A closed 12 × 12 grid

The dashboard fits at a glance, with no scrolling, and stays predictable when dragging and dropping.

Trade-offA full screen refuses one more widget; you have to open a new tab.

A draft doesn't exist anywhere

Not in the navigation, not in the sitemap, not in the export. The model knows it's working on an unpublished page.

Trade-offA link to a draft returns a 404 — which says so — in local preview.

The Figma documents what's actually built

The three screens of the initial dashboard proposal were replaced by ten screens measured on the prototype.

Trade-offThe original proposal now only lives in the history.

Web content is data, never an instruction

Web search and page reading cite their sources; any instruction found inside a page is flagged, not followed.

Trade-offThe model rephrases instead of taking it verbatim.

Front-end specs

What development needs to know

State of the prototype. Source of truth: the code (index.html, styles.css, dashboard.css, js/) and the project's README.

Stack

No build step, no browser-side dependency outside a CDN.

InterfaceNative HTML, CSS and JavaScript, IIFE modules loaded in order by index.html — around 19,800 lines in total
Local serverserve.js (Node ≥ 22.5, native modules only), launched with lancer.cmd, Python fallback
Local databaseSQLite via node:sqlite (base.js) — “nothing gets erased” principle: INSERT OR IGNORE, deletions flagged, full log
OnlineServerless hosting (api/) + managed Postgres database, only npm dependency
AIGemini API called from the browser with the user's own key: text streamed, Nano Banana (images), Veo (video); models listed dynamically
CDNJSZip 3.10.1, loaded on demand at the first export
Testsnode js/dashboard.test.js — grid-placement invariants, outside the browser

Modules

One file, one responsibility.

FileRole
js/app.jsOrchestration: sites, pages, versions, templates, media library, exports
js/prompt.jsThe two system instructions (style guide / content) and the site context — the qualitative core
js/layout.jsSite template: extraction, assembly, menu sync
js/dashboard.js + dashboard.cssRegistry of the 14 widgets, 12 × 12 grid, tabs, templates, function pack
js/editor.jsVisual editing: selection, actions, re-serialization of the <main>
js/audit.js53 checks + measurements in isolated iframes: contrast, theme, gaps, above-the-fold
js/uikit.js3 art directions as tokens, 26 responsive components, catalog passed to the model
js/arbo.jsTree view as a node editor
js/gemini.js · js/assets.jsAPI client; visual fill-in, IndexedDB cache, WebP re-encoding
js/store.js · js/db.jsLocal persistence and reconciliation with the server database
js/templates.js · js/thumbs.js27 templates (structured briefs); SVG thumbnails assembled from 30 wireframe blocks

Interface tokens

Ouidou interfaces palette: a single blue #2962FF, never navy as an accent. Navy is reserved for the navigation column.

--blue#2962FF · #5B8BFF
--blue-bg#EBF0FF · #1B2740
--nav-bg#12293F
--page#F5F7FF · #0F1218
--surface#FFFFFF · #171B23
--ink#1F1F1F · #E8EAF0
--ink-3#9E9E9E · below AA for small text
--ok-fg · --warn-fg#2C7A31 · #C97A1E
Typography--font: Aptos, Calibri, Segoe UI, system-ui · --mono: Cascadia Mono, Consolas · body 14 px
Radius--radius:14px — above the 12 px reference for cards, 8 px for controls
Elevation--shadow (placed), --shadow-lg (floating), --shadow-bloc for widgets
ThemeLight by default; uiTheme = light | dark | auto, applied before first render

Layout and breakpoints

A three-column CSS grid, animated.

/* styles.css */
:root{ --navw:221px }
body{ --chat-w:30% }
.layout{
  display:grid;
  grid-template-columns: var(--navw) clamp(280px, var(--chat-w), 62vw) 1fr;
  transition: grid-template-columns .3s cubic-bezier(.4,0,.2,1);
}
body.nav-collapsed{ --navw:56px }            /* rail d'icônes */
body.chat-collapsed .layout{ grid-template-columns: var(--navw) 0 1fr }
BreakpointEffect
1240pxNavigation narrowed to 196 px
900px · 860pxDialogs become single-column; dashboard widgets reorganized
760pxThe dashboard grid stacks into one column, drag and drop turns off
prefers-reduced-motionSix rule blocks: transitions and animations neutralized

Dashboard grid

Geometry measured from the code, carried over as-is into Figma.

Cells12 columns × 12 rows, 14 px gutter; row height calculated from available space
At 1204 px of usable widthcolumn 87.5 px · row 54.5 px · panel 6×5 = 595 × 328.5 · figure 3×2 = 290.5 × 123
Widgets14, across 5 families: figures (4), work (4), content (3), site (2), actions (1)
Screens8 tabs maximum, renameable; 5 templates
PersistencelocalStorage fcdgen.dashboard.v1, per site — outside export and JSON backup, it is not content

HTML contract for produced pages

The model places slots; the application fills them in. That's what keeps pages alive without regeneration.

<!-- navigation synced across all pages -->
<nav data-site-nav>…</nav>

<!-- index rebuilt on every assembly: a single template card -->
<div data-index="communique" data-limit="5" data-category="Sécurité alimentaire">
  <article>
    <img data-field="image"> <h3 data-field="title"></h3>
    <time data-field="date"></time> <a data-field="link">Lire</a>
  </article>
</div>

<!-- visuals: the model never writes a URL -->
<img src="" alt="…" width="1600" height="900" data-ai-image="prompt" data-ar="16:9">
<img src="" data-stock="keywords">   <video data-ai-video="prompt"></video>
<img data-asset="logo-fcd">          <!-- file attached to the « Integrate » role -->
<ul data-downloads>…</ul>         <!-- press resources, one template row -->

An unfilled slot shows a placeholder SVG at the right dimensions, never a broken image. Export adds sitemap.xml, robots.txt, and for a dated site feed.xml and llms.txt.

Data and persistence

The browser is the working copy, the database keeps the history.

localStoragefcdgen.sites.v1 (sites, pages, versions) · fcdgen.settings.v1 (settings, API key) · fcdgen.dashboard.v1
IndexedDBGenerated visuals (indexed by prompt, re-encoded as WebP) and binary attachments
Server routesGET/PUT /api/db/etat · /api/db/page · /api/db/version · /api/db/visuel(s) · /api/fetch (page reader) · /api/preview
ReconciliationThe database is only adopted if the browser is empty or older than it; never a silent replacement of local content
SecurityAPI key in plain text in localStorage, sent directly to Google: to avoid on a shared machine

Accessibility

Targets WCAG 2.2 AA, like all Ouidou deliverables.

In placeSVG icons aria-hidden with a visible label, aria-expanded on sections, chat log in aria-live="polite", prefers-reduced-motion respected
To fixContrast of --ink-3 and field borders; editor tabs with no aria-selected nor tabpanel; toast not announced; column group labels to be measured against #12293F
Not yet designedKeyboard focus states in Figma; keyboard alternative to the dashboard's drag and drop

Performance

For the tool, and for the pages it produces.

VisualsModel PNG re-encoded as WebP when it actually shrinks the file — measured on 18 visuals: 15.3 MB → 2.7 MB
TokensOnly the page's content is sent to the model; only the latest version is transmitted in full
Produced pagesMedia with reserved dimensions, slider in scroll-snap with no JS, 100/100 Lighthouse target — to confirm in PageSpeed on the final URL, the audit measures neither LCP nor INP
VideoVeo is only triggered if the page contains a data-ai-video: slow and costly
Takeaways

What this project taught me

Testing on a real site reveals what a brief doesn't say

The densest dashboard layout was measured on the real prototype, not on paper: that measurement is what showed a closed grid can drop widgets without flagging it early enough. A constraint set during scoping ("a closed, predictable grid") only gets tested by confronting it with a dense case.

The design system must document what exists, not what was planned

The Figma file was reworked to follow the measured prototype, rather than remaining a record of the initial proposal. A design system that documents an intention rather than a built state ends up misleading whoever consults it.

Measuring quality rather than declaring it changes what gets fixed

The automated audit showed the UI kit held AA level on the produced pages, while the tool's own interface carried most of the gaps, concentrated on a single colour token. Without the measurement, the fix effort would have gone in the wrong direction.

Delivered

  • Working prototype, wired to the Gemini API, tested on the real FCD site
  • Measured UX review (Nielsen heuristics, WCAG 2.2 AA)
  • Figma design system with 246 components, brought back in line with the prototype
  • Automated quality audit, 53 checks
  • Front-end specifications for the next development phase

See the other projects in the book.