Skip to content
Ludofabriko

The flow

The studio is usable end to end for one person in one browser. This page is the shape of that loop: what you do, in what order, and where the work ends up. It describes what exists now rather than the plan; the home page covers where the tool is going and the local development guide covers running it.

The domain root is the entry page: the studio’s own title and blurb, the three layers it is made from, the colour scheme control and two links, one into the studio and one into these docs. Everything after that link lives at /app/. Opening the studio lands on the overview there, which is the studio’s menu. Projects are local documents rather than rows on a server, so this page is how one gets picked:

  • New from template is inert and says “coming later”. The tile is drawn anyway, so the shape of the page matches the plan instead of hiding a path that does not exist yet.
  • New from import reads one or more backup files, chosen in the picker or dropped on the tile, and adds each readable one to the list as a new project. Nothing is opened: the tile is a way to put work back, not to switch to it. It is the restore half of the backup flow below.
  • New blank creates a project called “Untitled project”, fills it with a Card, a Token and a Board and opens it. Creating and opening are one gesture, because a project that was just made is the one you want.

Below the choices is the project that is open, spelled out rather than summarised as a tile: its name, the start of its description, when it was last saved, and one line per component with its row count and its copies (the sum of count), each linked to that component’s table. Its actions are a column beside the breakdown — below it when the window is narrow — in the order Setup, Assets, Data, Design, then a rule, then Export and Close, so the four ways into the project and the two things that act on the whole document read as separate groups. When nothing is open the panel says so instead of disappearing.

Everything else is a list of closed projects, one wide row each: the name, excerpt, component summary (“Card, Token, Board — 9 rows · 12 copies”) and updated date on the left, with Open, Export and Delete at the top of the trailing edge, so the rows read down the page and the actions line up down the list. Open is the primary action; Delete is marked as the destructive one. The name is the link and Open is the button; the rest of the row is not a click target, so a stray click on a large card never replaces the workspace that is open.

Deleting is asked about by name. The dialog says that the components, fields and rows live in this browser only, that it cannot be undone and that there is no copy anywhere else, and it offers Export first. Cancel is the plain button and Delete the marked one, so the destructive choice is deliberate.

A stored project whose shape does not match the running build is not opened and not repaired. It is listed in its own section, Could not be read, with the reason the check gave, and two actions that still mean something:

  • Export writes the stored document into a backup file exactly as it is, including keys and a schema version this build does not understand. The data can leave the browser even though no page here can draw it.
  • Delete removes it from this browser.

Opening one by an old link raises the same explanation in a dialog, with the same Export and Delete beside it. Nothing is shown half-way, because a document read into the wrong shape and written back would lose what it held.

A project downloads as one JSON file: the project document wrapped in a format name (ludofabriko.project), a version and the export date, so a later build can recognise its own files. The project inside carries a second version, its schema version, which is what tells a later build that the document predates it.

The export is the stored document, unchanged. Nothing is stamped onto it on the way out, because for a document this build cannot read, that version marker is the one thing a later build needs in order to migrate it. The file is the only copy of that project outside the browser, and it is the only way work moves between browsers or machines.

Restoring is New from import, which takes one file, a whole selection of them, or a drop of them, and counts them off on the tile while it reads. Each file’s envelope is checked against the compiled schema, then the project inside is checked by the same code the open path uses, so a file and a stored project that are unreadable for the same reason say the same thing about it. A readable project is stored as a new project with a new id — which is why importing the same backup twice leaves two projects rather than replacing the one already there. Nothing is merged and nothing is overwritten: this is a backup, not a sync.

One file that cannot be read does not stop the ones beside it: the rest are stored, and a single dialog lists the refused files with the reason each gave. Nothing is opened by an import — the new projects join the list and the workspace stays where it was. Files the tile does not take are not offered to it at all, so a mixed drop imports its .json backups and says nothing about the others.

A project holds its name, a Markdown description, optional author, homepage and release date, its notes, and a list of components. A component is one physical thing the game contains, and it owns nearly everything else:

  • a name and a size, stored in millimetres and shown in the unit chosen in Settings, with a shape (rounded, round or square) that the preview uses;
  • one or two faces, each with a stable id and an editable name;
  • a list of typed fields, the columns of its table;
  • a list of classifications, the groups that share a design;
  • rows, one per instance of the component.

A new project starts with three components:

Component Size Faces Fields Starts with
Card 63 × 88 mm, rounded Front, Back Name, Classification, Cost, Count, Rules 3 sample rows
Token 25 mm round Front Name, Count no rows
Board 420 × 297 mm, square Side A Name, Count no rows

A card is a row of the Card component, not a separate collection: one edit updates the table and the preview because they are the same row. Every cell is stored as text, numbers included, so one code path drives the table, the designer and any future CSV. The presets give count a default of 1 — a new piece is one copy of itself unless said otherwise — and any field can be given a default in Setup. The copies a component holds are the sum of that column.

All of it is stored in the browser, under ludofabriko. prefixed keys in local storage: the projects themselves under projects.v1, and preferences such as the open project, the folded rail, the theme, the units and where opening a project lands beside it. Nothing is sent to the server and there is no account, so a project made in one browser does not exist in another.

Which project is open is remembered, so a reload comes back to the work that was in progress. Opening the overview does not close it: the overview is a way back into the same workspace, not a close button.

The setup page (#/project/<id>/setup) is where the component model is edited. It draws one tab per component when the project has more than one; the tab is part of the address, so a link can point at the token’s setup rather than its table.

Component. The name, the width and height in the unit chosen in Settings (stored in millimetres), and the faces. A face can be renamed; a second face can be added, which gives it a design record and a design slot on every classification at the same time. A face can only be removed while no field belongs to it and no classification has art for it, because either would be deleting data behind a control that reads as reorganising, and a component keeps at least one face. A component can be removed only while it has no rows and is not the last one left.

Classifications. A component that has them can give each one a name, and for every face after the first, a mode: one shared design, one design per row, or not printed. The first face is always shared. Renaming a classification does not touch any row, because a row stores the id. A classification can be removed while no row points at it; removing the last one takes the classification field with it and clears its cell from every row.

The classifications are also where the design chain will live: each one owns a design per face, but every design is null until the template editor exists, so the setup page stores the choice and the designer draws a placeholder.

Fields. Adding a field adds a blank cell to every row, so a row always has text for every field the component declares. Each field has a label, a type, and the constraints its type understands:

  • text and long text: a maximum length;
  • whole number and number: a minimum and a maximum;
  • choice: its options, one per line;
  • reference: a pointer at the component’s classifications.

Every field also has a required flag and a hidden flag, and every type but yes/no has a default value.

A field can also be scoped to one face, which is how a board’s two sides keep different data on the same row. Hiding a field keeps its values and removes it from the table and the designer; fields are hidden rather than deleted, so the column of values is never dropped by accident.

Three field ids are part of the model rather than vocabulary: name, count and classification. Their labels can be changed, their types cannot, and they are not offered for deletion. name and count are what every component is; classification appears with the first classification and goes with the last.

Names are checked as they are committed. A blank component, face or classification name and a classification name another one already uses are refused with the typed value put back, because a document containing either is one the open path would refuse — and the store refuses to write it.

At the bottom, a sample row shows what the fields and constraints feel like with the chosen face selected. It is a demonstration, not stored data.

The data page (#/project/<id>/data) is a spreadsheet of one component’s rows, with a tab per component when there is a choice. Its columns are the visible fields for the selected face: the shared ones always, plus the ones scoped to that face. A face picker appears only when at least one field belongs to a face; with every field shared, switching sides would redraw the same columns, so the control is not offered until it can do something.

Unlike the prose pages, the grid takes the whole content area, and it scrolls sideways rather than squeezing its columns when the window is narrow. A cell saves when it is left or when Enter is pressed, not on every keystroke, so the table is not being rewritten under the cursor. The value is checked first: an invalid one stays in the box with a message beside it and is not stored, while a valid one is written through the same row the designer reads.

Add row appends a row filled from the fields’ defaults — a card arrives as one copy with no name — which appears in the designer’s list immediately because it is the same row seen from the other side. Rows cannot be removed yet.

The design page (#/project/<id>/design) is the component’s workspace: its rows down the left, the selected row drawn in the middle, and its properties in a panel beside or below depending on width. The preview is drawn at the component’s print proportions — width and height as stored, corner radius from the shape — so the sheet on screen has the shape of the sheet that would be printed.

The first face draws the row: its name, a cost bubble when the component has a cost field, a hatched box where art will go, one long-text field (Rules on a card), and a footer naming its classification (or the face, when the component has no classifications) and, when it is not one copy, the count. A second face is drawn as a plate that says what it is — the classification or face name, its back mode, and that the template editor is a later step — because there is no drawn design yet. A toggle under the sheet switches faces when the component has two, and a line below it gives the sheet’s size in the chosen units and the name of the face being shown.

The properties panel edits a working copy, not the stored row. Changes are applied to the copy on screen, Commit writes them through to the table where the data page and the list see them, and Reset throws the copy away and reloads the stored row. The panel says whether the copy matches the table, has uncommitted changes, or is behind a row that changed in the table meanwhile. Commit refuses a copy with an invalid field and marks the field instead. The copy survives a trip to another view, so leaving the designer and coming back does not silently discard what was typed.

The panel folds to a narrow handle, and the fold is remembered.

The header carries a Settings link (#/settings). These settings belong to this browser, not to a project, and the page says so in one line rather than implying a cloud:

  • Colour scheme — follow the system, always light or always dark. One button cycles the three and names the current choice; it lives here rather than in the header, so the studio has one place that sets it.
  • Opening a project — the project page, Setup, Assets, Data, Design or Notes, in the same order as the rail. It applies to Open; a new blank project always starts on its project page, so it can be named, and an imported backup is only added to the list rather than opened. A link that names a view still goes to that view.
  • Measurements — millimetres or inches. Sizes are stored in millimetres because that is how print sizes are specified; this chooses the unit used to show and edit them in Setup and on the design stage.

The project’s own page (#/project/<id>) is where the name and the description live. The name is the page title and edits in place: the pencil beside it is a standing hint that the title can be typed in, and it does the same thing as tapping the title. At rest the field is as wide as the name in browsers that can size a field to its content; once it has focus it is a fixed width, so nothing moves while a name is being typed.

The author, the homepage and the release date are optional fields under the title. Each is stored as typed — a name in whatever script it was written in, a URL as the designer wrote it, and the date as the date field reads it — and they save through the same pause as the prose. A project that fills in none of them is still a title and a date, which is why the row stays quiet.

Below it, the description is Markdown, edited in a rich-text editor with a toolbar for headings, emphasis, links, lists, quotes, code blocks, tables and alignment. The toolbar offers only what the document format can carry: Markdown has syntax for emphasis, links, fences and nesting, while underline, sub- and superscript and alignment are written as inline HTML, and images, embeds and colour are switched off — there is no asset store yet, and a paragraph should not pin a colour scheme. The formatting reference sits behind the help button at the top of the editor, because it is consulted while writing and then dismissed.

Both save themselves: typing pauses for about two thirds of a second, the project is written, and the status bar at the bottom of the workspace says which of “Up to date”, “Saving…” or “Not saved” applies. If the editor cannot be loaded at all, the description falls back to a plain textarea rather than refusing to open.

The page is a centred column rather than a full-width strip: a line of prose stops being readable somewhere past a hundred characters, so the header and the sections share one width and sit in the middle of the content area. The rail is not part of that column — it keeps its edge whatever the window width.

Notes: the working memory beside the project

Section titled “Notes: the working memory beside the project”

The notes page (#/project/<id>/notes) is one Markdown document of dated entries: what is being tried, what did not work, what to look at next. It is kept apart from the description on purpose — the description is what a reader sees on the overview, and a to-do list quoted back at you as a summary is worse than no summary. The toolbar keeps the marks used constantly as buttons — headings, emphasis, links, lists, quotes — and puts the occasional ones behind menus: the format menu holds underline, strikethrough, highlight, sub- and superscript and clear formatting, and the lists menu holds the list types with indent and outdent. The menu is derived, not curated: it lists whatever text format has no button of its own, so giving a format its own button takes it out of the menu. Add note starts an entry headed with today’s date and puts the caret under it. It is disabled while the document already ends with today’s heading, because a second note written in the afternoon belongs under the morning’s date rather than under a second heading with the same date in it. The editor fills the height left under the heading and scrolls inside itself, so the page around it never moves. The project page’s description fills its page the same way.

The same document can be added to from anywhere: the header carries a note button beside Settings, which opens a small editor in a dialog and appends what is written under today’s date. That is for the thought that arrives while looking at a card or a column, where leaving the page would lose the thread. Both paths write the same field, and notes travel in the project’s backup.

Switching projects, and the unsaved question

Section titled “Switching projects, and the unsaved question”

Opening another project replaces the workspace the current one is in, so the shell asks first when there is work that has not reached storage yet. The dialog names what happens to it: Save and open, Open without saving, or Cancel. A refused save keeps the dialog open with the reason instead of quietly dropping the work.

Two cases need no question: nothing is open, so nothing can be lost, and the target is the project that is already open.

Close on the overview puts the open project away without deleting anything: the document stays in the browser and in the list below, and the rail’s project entries go back to being unavailable. Closing loses nothing that leaving the project open would have kept, which is exactly why it is worth having — it is the gesture a designer makes before shutting a laptop.

The navigation rail holds the overview, the project, then its five views — Setup, Assets, Data, Design and Notes, indented under it — then the docs. Setup leads them because it defines what the other pages work on: the fields, faces and classifications a row is made of. Assets follows Setup because it collects the material the rows and layouts use.

Components are tabs inside those pages rather than rail entries. The chosen component is part of the address (#/project/<id>/data/<componentId>), so a token table can be linked to. A project with one component draws no tabs at all, and the bare route resolves to that component.

With no project open, the project’s views are drawn but unavailable: they are dimmed, they are not links, and one line under the Project entry says why — “No project open — choose one from Overview” — rather than repeating the reason beside every child.

Below 768px the same navigation becomes the shell’s drawer; above that it folds to icons, and the fold is a remembered preference. The header of the docs returns to the signpost if the reader arrived from there, and to the studio otherwise.

Three small signals live in the shell:

  • The status bar along the bottom of the workspace holds two of them. On the right, Up to date or Saving with a spinner: every write to storage goes through it, and it settles back to up to date only once the browser has confirmed the write, so an idle indicator means the last change is stored. Not saved means the last change did not reach storage and is not safe yet. It sits on the right because Chrome draws its link preview over the bottom-left corner, where a hovered link would hide it. On the left, the studio server badge asks the Worker for the time every seven minutes, when the tab comes back into view, and gives up on an answer after five seconds. Its short text dates the answer — “Reachable · Nov 22, 2:05 PM” means the browser is talking to the deployed Worker rather than to a cached copy of the shell — and its popover explains what the check is. While the server is down the badge says so and dates the last answer that worked.
  • The build sits at the foot of the rail, above the fold control: the version and short commit, marked “modified” when the tree it came from had uncommitted changes. Folded, the rail has no room for the words, so it becomes an information icon that opens the same details in a popover. When the deployed build differs from the one loaded, a reload action takes its place — an icon while folded, a sentence when open.
  • A browser note on the overview appears when the browser is not Chromium based, saying that Chromium is what the studio is tested in and that other engines may show small inconsistencies.

Several parts of the plan are not built yet, and the interface says so instead of pretending:

  • No print output. The preview has the proportions of the sheet, but nothing writes a PDF or an image yet; downloading a project as JSON is the only way out.
  • No template editor. Faces, classifications and design modes are recorded, but every design slot is null: a second face is drawn as a plate, and there is no per-row back art.
  • No row deletion, no sort or filter in the table, and fields are hidden rather than removed.
  • No table or rules layer. The playtest surface and the rules language are the two later stages; the sample rows are only data.
  • No sync and no accounts. Every project is local to one browser, and two tabs on the same one are last-write-wins.
  • Chromium is the tested browser. Other engines are expected to work but are not part of the testing, and the overview’s note says so.