<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Dejan Stajic]]></title><description><![CDATA[Dejan Stajic]]></description><link>https://dejanstajic-sc.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 30 Nov 2026 22:00:04 GMT</lastBuildDate><atom:link href="https://dejanstajic-sc.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[I built a seating chart maker with no backend and one runtime dependency]]></title><description><![CDATA[A TypeScript and Vite walkthrough of local-only storage, drag-and-drop, client-side PDFs, and the small search that seats the room.]]></description><link>https://dejanstajic-sc.hashnode.dev/i-built-a-seating-chart-maker-with-no-backend-and-one-runtime-dependency</link><guid isPermaLink="true">https://dejanstajic-sc.hashnode.dev/i-built-a-seating-chart-maker-with-no-backend-and-one-runtime-dependency</guid><category><![CDATA[webdev]]></category><category><![CDATA[sideprojects]]></category><category><![CDATA[buildinpublic]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[TypeScript]]></category><category><![CDATA[frontend]]></category><dc:creator><![CDATA[Dejan Stajic]]></dc:creator><pubDate>Mon, 23 Nov 2026 15:15:03 GMT</pubDate><content:encoded><![CDATA[<p>I'm Dejan. I wanted a seating chart I could trust with a guest list, so I built one that never talks to a server. This post is about that choice: the stack, the storage model, the pointer quirks, and the arranger that turned out harder than the rest of the UI.</p>
<p>The tool is here: <a href="https://dejoski.github.io/seating-chart-maker/">https://dejoski.github.io/seating-chart-maker/</a></p>
<p>It is a free browser app for wedding, classroom, and event charts. You paste a list, set up tables, add keep-together and keep-apart rules, auto-arrange, drag people around, and export. There is no sign-up and no account. I'll skip a click-by-click tour and stay on how it is built.</p>
<h2>No backend on purpose</h2>
<p>A guest list is a personal document. The simplest way to keep it private is to never send it anywhere. Once I committed to that, other decisions fell out of it: no API, no database, and no account wall to save your work. The app is a static site on GitHub Pages. Charts live in <code>localStorage</code> on that device. Wedding, classroom, and event modes each keep their own chart, so switching modes does not overwrite the last one. If you need the same chart on another computer, you export a JSON backup and restore it there.</p>
<p>That also kept the surface area small. There are no cookies, no analytics, no ads, and no third-party scripts. The only runtime library is <code>pdf-lib</code>, which I use to build PDFs in the browser. Everything else is TypeScript, Vite, and unit tests in Vitest. The source is public at <a href="https://github.com/dejoski/seating-chart-maker">dejoski/seating-chart-maker</a>.</p>
<h2>Import, layout, and the pointer problem</h2>
<p>Paste has to be forgiving. People arrive as one name per line, or as spreadsheet columns (Name, Group, Meal, Notes). Couples written as "Alex &amp; Sam Lee" and plus-ones written as "Jordan Park +1" become linked parties, so later steps can treat them as a unit.</p>
<p>Tables are just data: rounds, long tables, a head table, classroom desks, and a few quick layouts (rows, pairs, pods, U-shape), or a custom table with 1–20 seats. You can drag a table around the floor plan by its name bar.</p>
<p>Seating people was the interaction I spent the most time on. On a mouse or a pen, drag-and-drop is the obvious move. On a phone, dragging a name onto a table is fiddly and easy to cancel with a scroll. So touch uses a two-tap path: tap a name, then tap the table. Same data, two input mappings. That sounds minor. It is the difference between "this works on my phone" and "I'll do it on the laptop later."</p>
<h2>The arranger is a search, not a theorem</h2>
<p>Auto-arrange is the piece I underestimated. Keep-together, keep-apart, locked seats, table capacities, and "people from the same group should sit near each other" do not form a neat problem once real lists show up. A couple can also be marked keep-apart. A family of twelve can be larger than the biggest table. Two people can be locked at different tables and still be linked. The tool has to do something useful in those cases, not freeze.</p>
<p>I did not write a full constraint solver. I wrote a greedy packer with retries.</p>
<p>Linked people — couples, plus-ones, and keep-together rules — are clustered with a disjoint-set union, then split when they cannot share a table or when locks disagree. Locked guests stay where they are. Keep-apart can mean "not at the same table," or "not at a neighbouring table" if a distance is set. The arranger then shuffles those clusters and tries a series of placements (sixty attempts by default). Each attempt scores a table by keep-apart clashes, how many people from the same group already sit there, and how awkward the leftover seats would be. The attempt with the fewest unseated people and the fewest broken rules wins. If some rules still fail, the chart stays, and each conflict is listed in red so you can add a table, free a seat, or loosen a rule. Classroom mode can also shuffle for a random but still legal seating.</p>
<p>I test this path. Vitest covers parsing, the arranger, conflict detection, and PDF output, because a silent bad seating is worse than a visible one.</p>
<h2>Export without uploading</h2>
<p>The last mile is getting the chart off the screen. The PDF is built on the device with <code>pdf-lib</code>: a floor plan, a by-table list, and an A–Z "find your seat" list. A PNG comes off the canvas. A caterer CSV lists meals by table. None of that leaves the browser except as a file the user chose to download. That was the point of skipping a server, and it had to hold all the way through print.</p>
<p>What was hard was not any one library. It was the combination: packing rules that almost fit, drawing tables that still look like a room in a PDF, and keeping mouse and touch in agreement without growing a second app.</p>
<h2>What I would change next</h2>
<p>I want to keep it a static page with no account. The next work I would actually do is unglamorous: clearer conflict messages when a rule cannot be met, and smoother table dragging on a small screen. If you try it and a step feels clumsy, tell me in the comments — that is more useful to me than a feature list.</p>
<p>The tool is free to use, with no sign-up: <a href="https://dejoski.github.io/seating-chart-maker/">https://dejoski.github.io/seating-chart-maker/</a></p>
]]></content:encoded></item></channel></rss>