<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Luigi Davide Micca</title>
    <description>The latest articles on DEV Community by Luigi Davide Micca (@luigidavidemicca).</description>
    <link>https://dev.to/luigidavidemicca</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4239198%2Fd907ebe5-580d-4e47-b997-8cfbd710cabf.jpg</url>
      <title>DEV Community: Luigi Davide Micca</title>
      <link>https://dev.to/luigidavidemicca</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/luigidavidemicca"/>
    <language>en</language>
    <item>
      <title>The app worked. Then I had to host it for strangers</title>
      <dc:creator>Luigi Davide Micca</dc:creator>
      <pubDate>Fri, 04 Dec 2026 11:42:20 +0000</pubDate>
      <link>https://dev.to/luigidavidemicca/the-app-worked-then-i-had-to-host-it-for-strangers-42hk</link>
      <guid>https://dev.to/luigidavidemicca/the-app-worked-then-i-had-to-host-it-for-strangers-42hk</guid>
      <description>&lt;p&gt;For three months I had a workspace chat app that worked. Rooms, private rooms, direct messages, files, search, four roles, realtime. Probes attacked it from outside, and it passed every one. Then I decided to put it on a public address and let people I do not know create accounts, and I found out how much of a product is not the product.&lt;/p&gt;

&lt;p&gt;Nothing in the list below is a feature anybody asks for. All of it had to exist before the first stranger arrived.&lt;/p&gt;

&lt;h2&gt;
  
  
  A stranger can fill your disk
&lt;/h2&gt;

&lt;p&gt;The app accepted ten files per message, twenty-five megabytes each, with no ceiling per workspace. Among colleagues that is generous. On a public server it is an invitation: one account, one script, and the disk is full by lunchtime.&lt;/p&gt;

&lt;p&gt;So the first thing I wrote was not a feature but four numbers an operator can set: megabytes per file, megabytes per workspace, people per workspace, workspaces per account. Then rate limits inside the app, because a reverse proxy can count requests per address but only the app knows that twenty messages in ten seconds from one account is a script, or that the fourth password reset in an hour for one inbox is harassment.&lt;/p&gt;

&lt;p&gt;The rule I took from this: every resource a user can consume needs a number, and the number has to be yours to change without a deploy.&lt;/p&gt;

&lt;h2&gt;
  
  
  An account nobody can recover is not an account
&lt;/h2&gt;

&lt;p&gt;The app had no email at all. Invites were links you sent yourself, which I had been rather proud of. It also meant a forgotten password was a lost account, and that nobody had ever proved an address was theirs.&lt;/p&gt;

&lt;p&gt;Mail brought more decisions than code. A reset link built from the request's &lt;code&gt;Host&lt;/code&gt; header can be pointed at an attacker's domain, so links are built from one configured address, and mail stays off until that address is set. Opening a confirmation link does not confirm anything, because mail scanners open links too; a button on the page does. And a server with no mail relay still needs a way back in, so the admin can create a reset link and hand it over.&lt;/p&gt;

&lt;h2&gt;
  
  
  Leaving has to work before arriving does
&lt;/h2&gt;

&lt;p&gt;If you hold other people's conversations in the EU, those people can ask for a copy of what you hold and ask you to delete it. I would rather they never had to ask. An account can now export everything it wrote as one file and delete itself; an owner can export a workspace's rooms and close it.&lt;/p&gt;

&lt;p&gt;Deletion turned out to be a design question. What happens to what a person said in a room other people still read? I kept the words and removed the name: a conversation with holes in it is everybody else's loss. And an account that is the only owner of a workspace with other people in it cannot simply vanish and leave them ownerless, so the deletion is refused until ownership is handed over.&lt;/p&gt;

&lt;h2&gt;
  
  
  Somebody has to be able to say no
&lt;/h2&gt;

&lt;p&gt;A public instance needs a page only its operator sees. It shows who is here and what each workspace weighs, and it has three verbs: suspend, delete, close. I made one decision early and kept it: that page counts messages and never shows one. Reading what people wrote takes database access, which an operator has anyway and should need a reason to use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four bugs that shipping found
&lt;/h2&gt;

&lt;p&gt;The probes had been green for weeks. These four turned up only once I published the thing and installed it on a machine that was not mine.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The compose file would not start without a domain.&lt;/strong&gt; A required variable inside an optional service is still read when the service is off. Every install without HTTPS failed on line one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The installer left the secrets file readable by everyone on the machine.&lt;/strong&gt; It set the right permissions, then rewrote the file, and a rewritten file is a new file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The image could not be published after the repository was recreated.&lt;/strong&gt; The package still belonged to a repository that no longer existed, and the new one was refused.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The probes themselves broke when the landing page became cacheable.&lt;/strong&gt; They fetched it to obtain a CSRF token, and a page served from a shared cache mints none. The app was right; the tests had been leaning on an accident.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of these is interesting. The first two would have been somebody's first five minutes with the project.&lt;/p&gt;

&lt;h2&gt;
  
  
  A backup you have not restored is a hope
&lt;/h2&gt;

&lt;p&gt;The last item took the least code and the most nerve. I had a nightly dump. I did not know it worked until I deleted every workspace and every uploaded file on a test stack, restored both, and watched the app come back with the same rooms. It did, the second time. The first attempt failed on a path, my mistake, which is exactly the kind of thing you want to learn on a quiet afternoon rather than during an incident.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would tell myself in September
&lt;/h2&gt;

&lt;p&gt;The app was perhaps two thirds of the work. The rest was limits, mail, exits, an operator's page, an installer and a restore, and none of it shows in a screenshot. If you are about to open something you built to people you have not met, write that list before you write the announcement.&lt;/p&gt;

&lt;p&gt;The app is called piazza. It is open source, it installs with one command, and there is a public instance at &lt;a href="https://piazza.luigimicca.com" rel="noopener noreferrer"&gt;piazza.luigimicca.com&lt;/a&gt; if you want to see what the list above looks like when it is done. The source is on &lt;a href="https://github.com/LuigiDavideMicca/piazza" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://luigimicca.com/en/blog/the-app-worked-then-i-had-to-host-it" rel="noopener noreferrer"&gt;luigimicca.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>selfhosted</category>
      <category>opensource</category>
      <category>webdev</category>
      <category>devops</category>
    </item>
    <item>
      <title>Your next visitor is an agent, and it would rather ask than crawl</title>
      <dc:creator>Luigi Davide Micca</dc:creator>
      <pubDate>Thu, 03 Dec 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/luigidavidemicca/your-next-visitor-is-an-agent-and-it-would-rather-ask-than-crawl-4g6i</link>
      <guid>https://dev.to/luigidavidemicca/your-next-visitor-is-an-agent-and-it-would-rather-ask-than-crawl-4g6i</guid>
      <description>&lt;p&gt;On 25 November Cloudflare shipped a feature with an unusually plain pitch: flip one toggle and your site becomes searchable by AI agents. It is called Search for Agents, it is in beta on every plan including the free one, and it puts a search endpoint on your own domain at &lt;code&gt;/.well-known/search&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I think it matters less for what it does today than for what it admits. For years we have optimised pages for a reader who clicks. A growing share of readers do not click. They send software to read on their behalf.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it actually does
&lt;/h2&gt;

&lt;p&gt;When you enable it, Cloudflare builds a search index of your site from your sitemaps and links, and refreshes it every 24 hours. By default it follows links five hops deep, stops at 100,000 pages and leaves subdomains out.&lt;/p&gt;

&lt;p&gt;An agent then asks a question instead of fetching pages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl --get &lt;span class="s2"&gt;"https://example.com/.well-known/search"&lt;/span&gt; \
  --data-urlencode &lt;span class="s2"&gt;"q=what is your refund policy"&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It gets back up to ten chunks of your content as Markdown, each with its source and a relevance score. The endpoint also accepts the new HTTP &lt;code&gt;QUERY&lt;/code&gt; method, the one standardised this June for exactly this kind of read-only request with a body.&lt;/p&gt;

&lt;p&gt;The important design choice is what the endpoint does not do. In the words of the documentation, it retrieves content without generating an answer. There is no model on your side summarising your pages. The agent that asked does the reasoning with its own model, on your actual words.&lt;/p&gt;

&lt;h2&gt;
  
  
  How an agent finds it
&lt;/h2&gt;

&lt;p&gt;A search box nobody knows about is not much use, so Cloudflare adds four &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tags to each HTML page: &lt;code&gt;agent:endpoint&lt;/code&gt;, &lt;code&gt;agent:method&lt;/code&gt;, &lt;code&gt;agent:instructions&lt;/code&gt; and &lt;code&gt;agent:documentation&lt;/code&gt;. The first carries a URL template with a &lt;code&gt;{query}&lt;/code&gt; placeholder. If you serve Markdown to agents, the same fields appear as front matter.&lt;/p&gt;

&lt;p&gt;That is a convention, not a standard. Nothing obliges an agent to look for those tags, and I have not seen the large assistants commit to reading them. For now this is one vendor describing a door and hoping the other side learns where it is.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why asking beats crawling
&lt;/h2&gt;

&lt;p&gt;An agent that wants one fact from your site today downloads the page it guessed, the navigation, the footer, the cookie banner, and often three more pages because the first guess was wrong. It pays for all of it in tokens and time, and you pay in requests.&lt;/p&gt;

&lt;p&gt;A query endpoint replaces that with one request and a few hundred words of the right passage. It is the same shift that happened when sites added an API next to the HTML: the page was written for eyes, and something else needed the data.&lt;/p&gt;

&lt;p&gt;It also changes what you can measure. A crawl tells you a bot was there. A query tells you what someone wanted to know.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would check before flipping the toggle
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What ends up in the index.&lt;/strong&gt; It is built from what is publicly linked. The documentation says to index only what you intend to make publicly searchable. That is worth reading twice. Think of an old PDF, a staging path in the sitemap, a page that is reachable but was never meant to be found. Searchable is a stronger word than reachable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your existing rules.&lt;/strong&gt; Requests to the endpoint still go through your AI crawler settings and your firewall. If you block AI bots today and then enable this, decide which of the two you mean.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The bill.&lt;/strong&gt; Usage follows the pricing of the underlying search product: ingestion, storage and queries, within the limits of your plan. On a small site that is close to nothing. On a large one, read the pricing notice in the confirmation step rather than this article.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who actually calls it.&lt;/strong&gt; One independent check of early adoption found the endpoint enabled on about one site in a thousand. Being early costs little here, but do not expect traffic from it this quarter.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honesty corner
&lt;/h2&gt;

&lt;p&gt;I do not run this on my own site. It is hosted elsewhere, and for a site this size an &lt;code&gt;llms.txt&lt;/code&gt; file and clean HTML do the same job. I am describing a beta from its documentation and its launch post, and the defaults may change.&lt;/p&gt;

&lt;p&gt;What I am confident about is the direction. Whether through this endpoint, a rival convention or a standard that does not exist yet, sites will be asked questions by software, and the ones that answer in their own words will be quoted more accurately than the ones that are scraped.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to do this week
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Read your site the way an agent does.&lt;/strong&gt; Fetch a page with &lt;code&gt;curl&lt;/code&gt; and look at what comes back before any JavaScript runs. If the answer to your customers' most common question is not in that text, no endpoint will fix it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Put the facts in sentences.&lt;/strong&gt; Prices, opening hours, what you do and where: stated plainly, on a page, once. Retrieval returns passages, and a passage that needs the rest of the page to make sense is a bad result.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If you are on Cloudflare, try it on one site&lt;/strong&gt; and query it yourself with the ten questions your customers ask most. The quality of those ten answers tells you more about your content than any audit.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;em&gt;I am an independent software architect, and making sites legible to search engines and to the software that now reads on people's behalf is part of my &lt;a href="https://luigimicca.com/en/services/web-development" rel="noopener noreferrer"&gt;web development work&lt;/a&gt;. If you want to know what an agent sees when it visits yours, &lt;a href="https://luigimicca.com/en/contact" rel="noopener noreferrer"&gt;let's talk&lt;/a&gt;: the first 30-minute call is free.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>cloud</category>
      <category>search</category>
    </item>
    <item>
      <title>Cursor is now Grok Build: what your team should check before 7 December</title>
      <dc:creator>Luigi Davide Micca</dc:creator>
      <pubDate>Thu, 03 Dec 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/luigidavidemicca/cursor-is-now-grok-build-what-your-team-should-check-before-7-december-50gj</link>
      <guid>https://dev.to/luigidavidemicca/cursor-is-now-grok-build-what-your-team-should-check-before-7-december-50gj</guid>
      <description>&lt;p&gt;If you open cursor.com this week, a banner across the top says it in five words: Cursor is now Grok Build. The company announced in August that it had been acquired by SpaceX. The name has now followed the ownership.&lt;/p&gt;

&lt;p&gt;For one developer this is a new icon in the dock. For a team it is something else: a tool that sits inside the repository, the chat, the issue tracker and the review process has changed its name and, according to coverage of the announcement, the way you call it changes too on 7 December.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is confirmed and what is reported
&lt;/h2&gt;

&lt;p&gt;I want to be careful here, because a lot of what is circulating is second-hand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Confirmed on Cursor's own site:&lt;/strong&gt; the rename, and the acquisition, announced on 14 August.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reported consistently by several outlets, but not something I could read at the source:&lt;/strong&gt; from 7 December, mentions in Slack, GitHub, Linear and Jira move from &lt;code&gt;@Cursor&lt;/code&gt; to &lt;code&gt;@Build&lt;/code&gt;. The desktop app carries the new name. Scripts that use the command line or the API are said to keep working.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Unclear:&lt;/strong&gt; what happens to existing plans and prices, and whether the data-handling terms your company approved still describe the product you are using. On both points the write-ups I found contradict each other.&lt;/p&gt;

&lt;p&gt;The third group is the one that should worry a team lead, and it is the reason for the list below.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four checks before the 7th
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Find every place the old name is wired in.&lt;/strong&gt; Search your repositories, your CI configuration and your team's documents for &lt;code&gt;@Cursor&lt;/code&gt;. The usual hiding places are pull request templates, issue templates, onboarding pages, saved replies and any automation that tags the bot to start a review. A mention that stops resolving does not fail loudly. The review simply never starts, and nobody notices until a pull request has waited two days.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Re-read what you approved.&lt;/strong&gt; If your company signed off on this tool, someone approved specific terms: what is sent, what is retained, whether your code can be used for training. A change of owner is exactly the event that can change those terms. Ask whoever approved it to compare what they signed with what is published today, and to do it in writing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Check your plan before you click anything.&lt;/strong&gt; When a product is folded into a larger one, the upgrade path is often one-way. Before anyone accepts a migration prompt, find out what the old plan included that the new one does not, especially usage of models from other providers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Decide who owns this.&lt;/strong&gt; The honest answer in most teams is nobody: the tool arrived one developer at a time. Name one person who reads the changelog, and you will hear about the next change from them instead of from a broken workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part that outlasts this rename
&lt;/h2&gt;

&lt;p&gt;None of this is about one company. Within a single year the same product has had an independent maker, a new owner and a new name. The tool you standardise on next year will have its own version of that story.&lt;/p&gt;

&lt;p&gt;What you can control is how much of your team's knowledge lives inside the tool. The rules about your architecture, the patterns you want followed, the things an assistant must never do in your codebase: if those are written in a vendor's settings panel, they move when the vendor moves. If they are plain files in your repository, every assistant can read them, and the next migration is a change of binary.&lt;/p&gt;

&lt;p&gt;The same goes for the entry points. A review triggered by tagging a bot is tied to that bot. A review triggered by your CI calling a command belongs to you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honesty corner
&lt;/h2&gt;

&lt;p&gt;I could not read the full announcement at its source, so the 7 December details above rest on several independent reports that agree with each other, not on the primary text. Verify the date against the notice in your own workspace before you plan around it.&lt;/p&gt;

&lt;p&gt;I also have no opinion yet on whether the new product is better. What matters is that you can answer that question on its merits, without the answer being decided by how hard it would be to leave.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would do this week
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Run the search for &lt;code&gt;@Cursor&lt;/code&gt; across repositories, templates and automations, and fix what you find.&lt;/li&gt;
&lt;li&gt;Send one message to whoever approved the tool, asking them to re-check the data terms.&lt;/li&gt;
&lt;li&gt;Move your assistant rules into the repository, if they are not there already.&lt;/li&gt;
&lt;li&gt;Write down, in two lines, what you would switch to and what it would take. You will probably never use it. Writing it takes ten minutes and changes how the next announcement feels.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;em&gt;I am an independent software architect. Helping teams adopt AI coding tools without handing over the keys is part of my &lt;a href="https://luigimicca.com/en/services/technical-consulting" rel="noopener noreferrer"&gt;technical consulting&lt;/a&gt;: rules in the repository, review that does not depend on one vendor, and a way out. If this rename caught your team by surprise, &lt;a href="https://luigimicca.com/en/contact" rel="noopener noreferrer"&gt;let's talk&lt;/a&gt;: the first 30-minute call is free.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>software</category>
      <category>tools</category>
    </item>
    <item>
      <title>AI is finding your framework's old bugs: patch monthly</title>
      <dc:creator>Luigi Davide Micca</dc:creator>
      <pubDate>Thu, 19 Nov 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/luigidavidemicca/ai-is-finding-your-frameworks-old-bugs-patch-monthly-224o</link>
      <guid>https://dev.to/luigidavidemicca/ai-is-finding-your-frameworks-old-bugs-patch-monthly-224o</guid>
      <description>&lt;p&gt;On Tuesday the Next.js team published a post with an unusually candid chart. Security advisories for the framework: 6 in 2024, 14 in 2025, &lt;a href="https://nextjs.org/blog/how-were-using-ai-to-make-nextjs-more-secure" rel="noopener noreferrer"&gt;51 so far in 2026&lt;/a&gt;. Their explanation fits in one sentence: "AI has made it much easier to find them."&lt;/p&gt;

&lt;p&gt;I think they are right, and I think the consequence is bigger than one framework. For years a team could treat framework upgrades as a project: something you schedule twice a year, when there is slack. That model is over. The software under your product now receives security fixes on a monthly rhythm, and the ability to apply one within days has become part of the architecture, like the database or the deploy pipeline.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bugs are old. The searchlight is new
&lt;/h2&gt;

&lt;p&gt;The most useful number in that post is not the 51. It is this: 70% of this year's vulnerabilities were in code at least a year old, and 43% in code three years old or more. These are not fresh mistakes shipped in a hurry. They are edge cases that sat in the codebase for years because finding them took more effort than anyone was willing to spend. Language models made the search cheap, for researchers and for attackers alike.&lt;/p&gt;

&lt;p&gt;Next.js is simply the project that said it out loud. Nuxt shipped &lt;a href="https://github.com/nuxt/nuxt/releases/tag/v4.6.4" rel="noopener noreferrer"&gt;4.6.4 on 2 November&lt;/a&gt; as a security release: eight advisories in Nuxt and three more in Nitro, the server underneath it. Node.js followed on 11 November with &lt;a href="https://nodejs.org/en/blog/vulnerability/november-2026-security-releases" rel="noopener noreferrer"&gt;sixteen fixes across the 22, 24 and 26 lines&lt;/a&gt;, seven of them rated high. Three layers of the same stack, all patched inside ten days.&lt;/p&gt;

&lt;p&gt;A fair caveat: an advisory count measures how hard people are looking, not how dangerous the software is. A project that publishes 51 advisories is a project with a working intake, a bug bounty and an outside audit. I would rather build on that than on one that publishes none. Vercel's claim that Next.js is "more secure today than it's ever been" is plausible. It is also the vendor grading its own homework, and their forecast that the yearly number will start to fall is exactly that, a forecast.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a monthly train looks like
&lt;/h2&gt;

&lt;p&gt;In July, Next.js moved to a &lt;a href="https://nextjs.org/blog/next-security-release-program" rel="noopener noreferrer"&gt;formal security release programme&lt;/a&gt;: roughly once a month, announced in advance with the highest expected severity, so teams can plan and hosting providers can prepare mitigations. Since then I count four scheduled releases on their blog, in July, August, September and November, plus two out-of-band updates that could not wait.&lt;/p&gt;

&lt;p&gt;The out-of-band ones are the reason to care. The &lt;a href="https://nextjs.org/blog/nextjs-security-update-october-14-2026" rel="noopener noreferrer"&gt;14 October update&lt;/a&gt; fixed two critical, unauthenticated remote code execution bugs, both traced to upstream dependencies. One was in an image library the framework uses for image optimisation. That is the &lt;a href="https://luigimicca.com/en/blog/your-dependencies-are-the-attack-surface" rel="noopener noreferrer"&gt;dependency problem&lt;/a&gt; again, seen from the other side: you inherit your framework's dependencies along with its features.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://nextjs.org/blog/november-2026-security-release" rel="noopener noreferrer"&gt;3 November release&lt;/a&gt; was quieter: seven issues, one rated high, fixed in 16.4.5 and 15.5.29. Read the list, though, and a pattern shows. Four of the seven sit in the &lt;code&gt;use cache&lt;/code&gt; and Cache Components machinery, and the worst can serve one tenant's cached data to another. I have written before that &lt;a href="https://luigimicca.com/en/blog/next-js-and-the-cost-of-magic" rel="noopener noreferrer"&gt;implicit caching is a loan&lt;/a&gt;. This is one of the ways it gets called in. The more a framework does on your behalf, the more of its code stands between a stranger's request and your customers' data.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would do
&lt;/h2&gt;

&lt;p&gt;None of this needs a security team. It needs a routine, and someone whose name is on it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Know what you are running.&lt;/strong&gt; Framework version, Node version, and whether each is still on a supported line. The November fixes landed only on Next.js 16.4 and 15.5. Nuxt 3 reached end-of-life on 31 July, so there was no 3.x release at all. The Node advisory says it plainly: end-of-life versions are always affected. They just do not get the fix.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Put the release in the calendar.&lt;/strong&gt; Next.js announced the November release a week ahead. Node has an announcement-only mailing list. A recurring half-day a month for "apply security patches" is cheaper than the emergency version of the same work.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make a patch upgrade boring.&lt;/strong&gt; That means a lockfile, automated tests on the paths that earn money (sign-in, checkout, the forms that bring leads) and a preview deployment you can click through. If a patch release takes your team more than a day, the problem is not the patch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read the release notes anyway.&lt;/strong&gt; Security fixes change behaviour. Nuxt 4.6.4 flagged five such changes, including stricter rules about which responses a cached route may store. A one-line version bump can still alter what your pages do.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use the new tooling, and check its work.&lt;/strong&gt; Since 16.4, &lt;code&gt;next dev&lt;/code&gt; and &lt;code&gt;next build&lt;/code&gt; warn when the installed version has a known vulnerability, and there is an experimental &lt;a href="https://nextjs.org/docs/app/guides/upgrading/agent-upgrade" rel="noopener noreferrer"&gt;&lt;code&gt;next upgrade --agent&lt;/code&gt;&lt;/a&gt; that hands the upgrade to a coding agent. I would happily let an agent do the bump. I would not let it be the one who decides the app still works.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Switch off what you do not use.&lt;/strong&gt; Every enabled feature is code you have to keep patched. If the app does not need a caching mode, an image pipeline or an edge runtime, leaving it off removes whole advisories from your list.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The business version
&lt;/h2&gt;

&lt;p&gt;If you run a company rather than a codebase, there are three questions for your team or your agency. Which version of the framework and of Node is in production today, and is it still supported? When the last security release came out, how many days passed before it was live? And who decides, without a meeting, that a patch goes out this week?&lt;/p&gt;

&lt;p&gt;The second answer is the one I would watch. A product that can absorb a patch in two days is in good shape, whatever the advisory count says. A product that cannot be upgraded without a project plan was already fragile; until this year nobody was searching hard enough to prove it.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm an independent software architect focused on front-end work. The dates, counts and version numbers above come from the Next.js, Nuxt and Node.js release notes linked in the text; the opinions are mine.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>nextjs</category>
      <category>security</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Your dependencies are the attack surface: what 2026’s npm worms taught us</title>
      <dc:creator>Luigi Davide Micca</dc:creator>
      <pubDate>Wed, 11 Nov 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/luigidavidemicca/your-dependencies-are-the-attack-surface-what-2026s-npm-worms-taught-us-35bj</link>
      <guid>https://dev.to/luigidavidemicca/your-dependencies-are-the-attack-surface-what-2026s-npm-worms-taught-us-35bj</guid>
      <description>&lt;p&gt;On 11 May, between 19:20 and 19:26 UTC, 84 malicious versions of 42 &lt;code&gt;@tanstack/*&lt;/code&gt; packages landed on npm. Six minutes. Every one of them carried a valid SLSA Build Level 3 provenance attestation — the cryptographic receipt that says "this was built by the project's own pipeline". It was true. The pipeline had been turned against its owners.&lt;/p&gt;

&lt;p&gt;Eight days later the same family of worm, Mini Shai-Hulud, published 639 poisoned versions of 323 packages in about an hour, most of them in the &lt;code&gt;@antv&lt;/code&gt; ecosystem. Within 48 hours of the first wave it had already spread to 172 packages across npm and PyPI.&lt;/p&gt;

&lt;p&gt;If your product is built with JavaScript, those numbers are not someone else's news. Your &lt;code&gt;node_modules&lt;/code&gt; folder is the largest codebase you ship, and you wrote almost none of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the two waves worked
&lt;/h2&gt;

&lt;p&gt;The TanStack wave is the one to study, because it beat the controls the industry has been asking for. According to the post-mortems, the attacker opened a pull request from a fork that poisoned the GitHub Actions cache. The project's release workflow later restored that cache, and the attacker's binaries read the short-lived OIDC publish token straight out of the runner's memory. The tests failed and the publish step was skipped — and the signed packages reached the registry anyway.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;@antv&lt;/code&gt; wave was cruder and just as effective. Each infected package gained a &lt;code&gt;preinstall&lt;/code&gt; hook that ran a script the moment anyone installed it. The script collected what a developer machine or a CI runner keeps lying around — GitHub and npm tokens, AWS credentials, Kubernetes and Vault secrets, SSH keys, Docker auth, database connection strings — and sent it away. Then it used the stolen npm token to list every package the victim could publish, injected itself into them, bumped the version and republished them under the victim's name. That is what makes it a worm: each infection publishes the next ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the controls did not stop it
&lt;/h2&gt;

&lt;p&gt;npm has tightened a lot since late 2025. Classic tokens were revoked for good on 9 December 2025. A new write token now expires after seven days by default, and after ninety at most. Publishing enforces 2FA. Trusted publishing replaces stored tokens with credentials minted for a single CI job. All of that is good, and all of it was in place for at least part of what happened in May.&lt;/p&gt;

&lt;p&gt;The pattern is the uncomfortable part. Each control closes the door the last attack used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;2FA&lt;/strong&gt; stops a stolen password. The worm does not need one; it uses tokens that already passed 2FA.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Short-lived tokens&lt;/strong&gt; limit how long a stolen token works. An hour is plenty for a worm that republishes in minutes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provenance&lt;/strong&gt; proves where a package was built. It says nothing about whether the build was hijacked.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trusted publishing&lt;/strong&gt; removes stored secrets, but its token is only as narrow as the workflow you allow to request it. In the TanStack case it was the whole repository.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these is useless. They are necessary, and they are not sufficient. As one researcher put it after the TanStack incident, the control that actually mattered was the scope of the OIDC trust — not provenance, not 2FA.&lt;/p&gt;

&lt;h2&gt;
  
  
  Five settings that would have helped
&lt;/h2&gt;

&lt;p&gt;Most teams are not publishers; they are consumers. The good news is that the consumer side has cheap, boring defences, and they are exactly the kind that hold up against an attack nobody has seen yet.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install from the lockfile, nothing else.&lt;/strong&gt; In CI, &lt;code&gt;npm ci&lt;/code&gt;, &lt;code&gt;pnpm install --frozen-lockfile&lt;/code&gt; or &lt;code&gt;bun install --frozen-lockfile&lt;/code&gt;. A poisoned version can only reach you when something resolves a new version; a frozen install never does.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not run your dependencies' install scripts by default.&lt;/strong&gt; The &lt;code&gt;@antv&lt;/code&gt; payload lived in a &lt;code&gt;preinstall&lt;/code&gt; hook. pnpm 10 and Bun already refuse to run dependency lifecycle scripts unless you allow a package by name; with npm, set &lt;code&gt;ignore-scripts=true&lt;/code&gt; in &lt;code&gt;.npmrc&lt;/code&gt; and allowlist the few packages that genuinely need a build step.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wait before you upgrade.&lt;/strong&gt; Both waves were detected within minutes to an hour. A cooldown that refuses versions younger than a day would have skipped them entirely, at the cost of getting patches a day later. pnpm 11 now does this by default, waiting 24 hours; npm (&lt;code&gt;min-release-age&lt;/code&gt;), Bun and Yarn have their own setting for it, and Renovate can hold its pull requests the same way.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep secrets away from the job that installs.&lt;/strong&gt; Any script that runs during an install can read the environment it runs in. The job that runs &lt;code&gt;install&lt;/code&gt; and the tests should not hold your cloud keys or publish rights. If you publish, grant &lt;code&gt;id-token: write&lt;/code&gt; only to the publish job, scope trusted publishing to one workflow on a protected branch, and never let a fork's code share a cache with your release.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Have fewer dependencies.&lt;/strong&gt; Every package is a maintainer account you are trusting with your build machine. The cheapest dependency to secure is the one you removed.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Honesty corner
&lt;/h2&gt;

&lt;p&gt;None of this makes you immune. A lockfile pins a version that may already be bad; a cooldown protects you from fast-moving worms, not from a patient attacker who waits a week. The goal is not zero risk. It is to make sure that the next wave — and there will be one, the cadence this year has been monthly — finds nothing to run and nothing to steal on your machines.&lt;/p&gt;

&lt;h2&gt;
  
  
  The business version
&lt;/h2&gt;

&lt;p&gt;If you run a company rather than a codebase, three questions to ask your team or your vendor this week:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does CI install strictly from the lockfile, with install scripts off by default?&lt;/li&gt;
&lt;li&gt;Which secrets does the job that installs dependencies have access to — and why?&lt;/li&gt;
&lt;li&gt;If a maintainer we depend on were compromised tonight, how would we know, and how long would it take us to rotate everything?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A team that answers all three without hesitating has done the work. A team that has to think about it has a weekend of configuration ahead, which is far cheaper than the alternative.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm an independent software architect focused on front-end work. &lt;a href="https://luigimicca.com/en/services/technical-consulting" rel="noopener noreferrer"&gt;Technical audits&lt;/a&gt; of JavaScript codebases — dependencies, build pipelines, the things that only get looked at after an incident — are a good part of what I do. If you'd like a second pair of eyes on yours, &lt;a href="https://luigimicca.com/en/contact" rel="noopener noreferrer"&gt;let's talk&lt;/a&gt;: a 30-minute intro call is free.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>javascript</category>
      <category>node</category>
      <category>security</category>
    </item>
    <item>
      <title>AI writes your code faster. Who pays for the maintenance?</title>
      <dc:creator>Luigi Davide Micca</dc:creator>
      <pubDate>Mon, 26 Oct 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/luigidavidemicca/ai-writes-your-code-faster-who-pays-for-the-maintenance-5dh8</link>
      <guid>https://dev.to/luigidavidemicca/ai-writes-your-code-faster-who-pays-for-the-maintenance-5dh8</guid>
      <description>&lt;p&gt;Every engineering leader I talk to this year tells me the same two things: the team ships noticeably faster with AI assistants, and nobody is quite sure what all that speed is doing to the codebase. Both are correct, and now there's data for the second one.&lt;/p&gt;

&lt;p&gt;The most careful study so far comes from Carnegie Mellon, presented at MSR 2026. It compared 807 open-source projects that adopted the Cursor editor with 1,380 similar projects that didn't. The speed was real and short-lived: commits rose 55% in the first month and the effect had largely faded by the second. What didn't fade: static-analysis warnings up about 30%, code complexity up about 41%, and both still there months later. The authors' conclusion is the line to underline — the extra warnings and complexity are what drag the velocity back down.&lt;/p&gt;

&lt;p&gt;It isn't the only signal. CodeRabbit's December 2025 report, comparing AI-coauthored pull requests with human-only ones, found about 1.7 times more issues in the AI ones, with logic errors up 75%. CodeRabbit sells code review, so read it with that in mind — but it points the same way as the academic one. The compounding kind of expensive, not the linear kind.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this debt is different
&lt;/h2&gt;

&lt;p&gt;Technical debt isn't new; I've spent a good part of my career &lt;a href="https://luigimicca.com/en/services/technical-consulting" rel="noopener noreferrer"&gt;cleaning it up&lt;/a&gt;. But the classic kind was at least &lt;em&gt;chosen&lt;/em&gt;: a developer took a shortcut, knew it, and someone could write "TODO: fix properly" above it. AI-generated debt has a nastier property — nobody knows the shortcut was taken.&lt;/p&gt;

&lt;p&gt;The assistant produces code that compiles, passes the tests and reads plausibly. What it lacks is context: it doesn't know your architecture's boundaries, why the last team abandoned that pattern, or that three other modules already solve this problem. So it happily writes a fourth solution, slightly different from the other three. I once wrote that a fast-growing codebase breeds five slightly different implementations of the same thing; AI does that at machine speed, politely, in perfect syntax.&lt;/p&gt;

&lt;p&gt;Review was supposed to catch this. In practice, plausible code is precisely the hardest kind to review — nothing looks wrong, so approval becomes a reflex. The result is what the industry calls "code smells": issues that don't break anything today and quietly raise the cost of every change tomorrow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honesty corner
&lt;/h2&gt;

&lt;p&gt;I use AI assistants daily, and they're genuinely good — for scaffolding, for tests, for the boring parts I used to postpone. This isn't an argument for abstinence. The dividing line isn't &lt;em&gt;assisted versus manual&lt;/em&gt;; it's &lt;em&gt;assisted versus unattended&lt;/em&gt;. Speed that produces code nobody understands isn't velocity, it's deferred cost with excellent syntax highlighting.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix is process, not heroics
&lt;/h2&gt;

&lt;p&gt;What works, in the teams I've seen manage this well, is boring and effective:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Someone owns the architecture.&lt;/strong&gt; A human decides where the boundaries are and which patterns are canonical — and reviews AI output &lt;em&gt;against those decisions&lt;/em&gt;, not against "does it work".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review AI code like a junior developer wrote it.&lt;/strong&gt; Not hostility — scrutiny. The question isn't "is this broken?" but "should this exist, here, in this shape?"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Static analysis and tests as the contract.&lt;/strong&gt; Machines are consistent reviewers of machine output. Wire the thresholds into CI so "it passes" keeps meaning something.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Periodic debt audits.&lt;/strong&gt; Measure time-to-change and defect rates per area. The 30% and 41% from the study aren't destiny — they're what happens when nobody looks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Delete duplicates on sight.&lt;/strong&gt; The fourth implementation is cheapest to remove the week it appears.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The business version
&lt;/h2&gt;

&lt;p&gt;If you run a company rather than a codebase, here's the translation: AI-assisted development is a real productivity gain &lt;em&gt;only if&lt;/em&gt; the second year doesn't eat the first. When you evaluate a team or a vendor, ask how they review AI-generated code, what their duplication and defect metrics look like, and who owns the architecture. Silence on those questions is the answer.&lt;/p&gt;

&lt;p&gt;Faster is good. Faster with the meter running quietly in the background is how you end up hiring someone like me two years later — which, full disclosure, is fine for me and expensive for you.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm an independent software architect focused on front-end work — &lt;a href="https://luigimicca.com/en/services/technical-consulting" rel="noopener noreferrer"&gt;audits and modernisation&lt;/a&gt; of codebases that grew faster than their structure, human-written or otherwise. If your team ships fast and sleeps badly, &lt;a href="https://luigimicca.com/en/contact" rel="noopener noreferrer"&gt;let's talk&lt;/a&gt;: a 30-minute intro call is free.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>codequality</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>A realtime channel is a door, and most apps leave it open</title>
      <dc:creator>Luigi Davide Micca</dc:creator>
      <pubDate>Tue, 06 Oct 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/luigidavidemicca/a-realtime-channel-is-a-door-and-most-apps-leave-it-open-5gdi</link>
      <guid>https://dev.to/luigidavidemicca/a-realtime-channel-is-a-door-and-most-apps-leave-it-open-5gdi</guid>
      <description>&lt;p&gt;I spent a week this autumn attacking a realtime relay I had built myself, and the first thing that fell was not clever. A client with no cookie opened a socket, asked for a topic called &lt;code&gt;channel:3&lt;/code&gt;, and received every message posted there — plus a helpful &lt;code&gt;__count&lt;/code&gt; event telling it how many real users were in the room. No exploit. No race. Just a name that was easy to guess and a server that never asked who was asking.&lt;/p&gt;

&lt;p&gt;The relay was "correct" in every way the tests measured. It checked the browser's &lt;code&gt;Origin&lt;/code&gt;, it capped message sizes, it closed misbehaving sockets with the right codes. What it did not do was the only thing that mattered: decide whether this socket, carrying this session, may hold this topic. The handshake was a door with a lock on the outside.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the decision has to live
&lt;/h2&gt;

&lt;p&gt;A WebSocket has exactly one moment that looks like an HTTP request: the handshake. After the &lt;code&gt;101&lt;/code&gt;, there are no headers, no cookies re-sent, no middleware runs — just frames on a wire that stays open for hours. Whatever authorization exists must happen &lt;em&gt;at the upgrade&lt;/em&gt;, with the session already verified, per topic the socket asks for. If the decision is anywhere else, it is nowhere.&lt;/p&gt;

&lt;p&gt;This is also why "we authorize in the API routes" does not transfer. Your &lt;code&gt;/api/channels/3/messages&lt;/code&gt; endpoint checks membership on every call because every call is a request. The socket subscribed once, weeks ago in socket-time, and the relay has been forwarding ever since. The two paths look like the same feature to the product and are completely different surfaces to an attacker.&lt;/p&gt;

&lt;h2&gt;
  
  
  The four rules I apply now
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The topic name is not a secret.&lt;/strong&gt; &lt;code&gt;dm:ana:luigi&lt;/code&gt; is a routing key, and routing keys are enumerable. Scoping by unguessable id is a delay, not a wall. The rule has to be &lt;em&gt;the session may hold this topic&lt;/em&gt;, evaluated against what the session proves — membership, ownership, role — not against how hard the string is to type.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Presence is data.&lt;/strong&gt; The subscriber count felt like harmless UI sugar until it told an anonymous client how many people were in a private room. Anything the relay emits about a topic is part of that topic's confidentiality. If a topic is private, its count is too, and so is the fact that it exists.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Refuse by default in production, say so in development.&lt;/strong&gt; A relay with no rule configured should refuse every subscription when deployed, loudly, and admit everything only in development, where the startup banner says so in a way you cannot miss. The dangerous configuration is the silent one: open by default, with a note in the docs that nobody reads before the incident.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Revocation has a latency, and it should be named.&lt;/strong&gt; A socket authorized at its handshake keeps its topics until it closes. When you revoke a user — log out everywhere, remove them from a workspace — their open sockets are still subscribed. Decide what that means: cut the socket, push a "you are gone" event, or accept that the next handshake is the boundary. All three are defensible. Not deciding is not.&lt;/p&gt;

&lt;h2&gt;
  
  
  What good looks like from the application side
&lt;/h2&gt;

&lt;p&gt;The shape I ended up with is small enough to read in one sitting. The application registers a function — &lt;em&gt;given this request and this topic name, yes or no&lt;/em&gt; — and the relay calls it once per topic at the handshake, with the session the framework already verified. Publishing from the browser gets a second function or inherits the first. There is no annotation, no role matrix, no configuration file: a function, in the language the rest of the authorization is written in, next to the handler that creates the channel in the first place.&lt;/p&gt;

&lt;p&gt;It took an afternoon to add and it closed the worst finding of a two-day stress test. The relay had been "done" for months.&lt;/p&gt;

&lt;h2&gt;
  
  
  The question to take to your own stack
&lt;/h2&gt;

&lt;p&gt;Open the file that handles your WebSocket upgrade, or your SSE endpoint, or whatever your realtime layer is called. Find the line where a subscription is accepted. Now ask what, on that line, proves the subscriber may receive what follows — not what proves the browser is on your domain, not what proves the message is well-formed. If the answer is "the name of the topic", you have a door with the lock on the outside, and the people who find those do not file issues.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This piece comes out of building &lt;a href="https://github.com/LuigiDavideMicca/borgo" rel="noopener noreferrer"&gt;borgo&lt;/a&gt;, an open-source React and Go framework I maintain. Its own realtime layer had exactly this hole until version 0.30 closed it along these lines.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>backend</category>
      <category>cybersecurity</category>
      <category>security</category>
    </item>
    <item>
      <title>Next.js and the cost of magic</title>
      <dc:creator>Luigi Davide Micca</dc:creator>
      <pubDate>Tue, 08 Sep 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/luigidavidemicca/nextjs-and-the-cost-of-magic-4j0h</link>
      <guid>https://dev.to/luigidavidemicca/nextjs-and-the-cost-of-magic-4j0h</guid>
      <description>&lt;p&gt;I have built more products on Next.js than on anything else, and I would still reach for it in plenty of situations. That is exactly why its costs are worth naming precisely. Not the Twitter version — "Next bad, framework heavy" — but the specific bills that arrive months later, itemised, when the honeymoon is over and the app is load-bearing.&lt;/p&gt;

&lt;p&gt;They all trace back to the same trade. Next made hard things easy by taking decisions away from you. That is what magic is. And every decision it took away is one you eventually need back.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cache you never asked for
&lt;/h2&gt;

&lt;p&gt;For two major versions, &lt;code&gt;fetch()&lt;/code&gt; inside Next did not behave like &lt;code&gt;fetch()&lt;/code&gt;. Responses were cached by default — aggressively, invisibly, at several layers with different names. Teams shipped dashboards that showed yesterday's data and spent days learning the difference between the Data Cache, the Full Route Cache, the Router Cache and the browser's own, each with its own invalidation story.&lt;/p&gt;

&lt;p&gt;Then Next 15 flipped the default. Uncached, like the platform. The flip was the right call — and it was also an admission, and a migration, and a re-audit of every data read in every app that had learned the old rules. When a framework overrides a web primitive and later un-overrides it, both moves are breaking changes, and both were yours to absorb.&lt;/p&gt;

&lt;p&gt;The lesson is not "caching is hard", although it is. The lesson is that implicit caching is a loan. You ship faster today because something cached for you; you pay later when you need to know &lt;em&gt;exactly&lt;/em&gt; what is cached, and the answer is spread across four layers of documentation.&lt;/p&gt;

&lt;h2&gt;
  
  
  A router that changed under your feet
&lt;/h2&gt;

&lt;p&gt;The Pages Router was small and legible: a file is a route, &lt;code&gt;getServerSideProps&lt;/code&gt; runs on the server, props arrive in your component. You could hold it in your head.&lt;/p&gt;

&lt;p&gt;The App Router is more capable and much bigger: layouts, nested streaming, server components, client boundaries, parallel routes, intercepting routes. Some of that power is real. But it did not arrive as an addition — it arrived as &lt;em&gt;the future&lt;/em&gt;, with the old router in maintenance mode and every new feature landing on one side of the line. Migration was not a codemod; it was a rewrite of your data flow, your error handling and your mental model, undertaken not because your product needed it but because your framework moved.&lt;/p&gt;

&lt;p&gt;There is a special tiredness in teams that have done this twice. It shows up as a question in planning meetings: "is this a Next thing or an us thing?" When that question comes up often, the framework has stopped being infrastructure and started being weather.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;"use client"&lt;/code&gt; is a confession
&lt;/h2&gt;

&lt;p&gt;The directive itself is fine. What it confesses is not: the split between server components and client components pushed a distributed-systems question — &lt;em&gt;where does this code run?&lt;/em&gt; — into every file of an application, to be answered by every developer, forever, one directive at a time.&lt;/p&gt;

&lt;p&gt;Get it wrong in one direction and you ship a server secret to the browser. Get it wrong in the other and your bundle quietly grows, because one &lt;code&gt;"use client"&lt;/code&gt; at the top of a tree drags everything under it across the line. The framework cannot fully check either mistake, which is why every team I know has a folklore document about it — and folklore is what you write when the type system can't help you.&lt;/p&gt;

&lt;h2&gt;
  
  
  The best version lives on one host
&lt;/h2&gt;

&lt;p&gt;Run Next on its home platform and everything works: image optimisation, ISR, the edge pieces, the caches. Run it on your own boxes — which is where plenty of European clients contractually need it — and you meet the asterisks. Self-hosted ISR wants shared storage you now operate. Image optimisation wants a service you now provision. Some behaviours differ just enough that your staging environment tells you less than it should.&lt;/p&gt;

&lt;p&gt;None of this is sinister; a company funds the framework and the framework fits the company. But it means the honest comparison is never "Next versus something else". It is "Next on their infrastructure, or a different set of trade-offs on yours" — and that second option deserves to be evaluated on purpose, not discovered during a procurement review.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I actually want
&lt;/h2&gt;

&lt;p&gt;Fewer layers I have to trust and more I can read. Data fetching that behaves like the platform primitive it wraps. A router that fits in working memory. Costs that appear where I can see them — in my code — rather than where I cannot: in a cache with four names, on a host I did not choose.&lt;/p&gt;

&lt;p&gt;Easy setup is worth one afternoon. Legibility is worth every afternoon after that. Magic optimises the first day of a project; the bill is presented across the following thousand. Whatever you build on, check who holds the loan.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Disclosure: I maintain &lt;a href="https://github.com/LuigiDavideMicca/borgo" rel="noopener noreferrer"&gt;borgo&lt;/a&gt;, an open-source, self-hosted React framework, so I have a horse in this race. Every cost above can be checked without it.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>nextjs</category>
      <category>performance</category>
      <category>react</category>
    </item>
    <item>
      <title>The quiet cost of running a Node server</title>
      <dc:creator>Luigi Davide Micca</dc:creator>
      <pubDate>Sat, 22 Aug 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/luigidavidemicca/the-quiet-cost-of-running-a-node-server-fhb</link>
      <guid>https://dev.to/luigidavidemicca/the-quiet-cost-of-running-a-node-server-fhb</guid>
      <description>&lt;p&gt;Every Node server I have inherited came with the same folklore. "It restarts at night, that's normal." "Don't run the export on the same box as the API." "If it gets slow, add a replica." Nobody could say why any of this was true. They had simply learned, one incident at a time, to work around a runtime that was never designed to be a server in the first place.&lt;/p&gt;

&lt;p&gt;I say that with affection. I have shipped a lot of Node. But after a few years of operating it in production next to other things, the costs are consistent enough to name.&lt;/p&gt;

&lt;h2&gt;
  
  
  You pay for memory you never use
&lt;/h2&gt;

&lt;p&gt;A Node process that does nothing sits at 40–60 MB. Add a web framework, an ORM, a validation library and a logger — the ordinary furniture of a backend — and the idle footprint is 100–200 MB before the first request arrives. Under load the V8 heap grows toward whatever &lt;code&gt;--max-old-space-size&lt;/code&gt; allows, and it does not hand that memory back to the OS with any enthusiasm.&lt;/p&gt;

&lt;p&gt;This matters in a specific, unglamorous way: it sets the floor on how small your instances can be. A service that could run comfortably on 128 MB needs a 512 MB slot because of what it is written in, not what it does. Multiply by environments, by replicas, by the "one more microservice" that every team accumulates, and the bill is real long before the traffic is.&lt;/p&gt;

&lt;h2&gt;
  
  
  One thread, shared with everyone
&lt;/h2&gt;

&lt;p&gt;The event loop is Node's great idea and its defining constraint. Every request, every timer, every database callback is scheduled onto a single thread. As long as every piece of work is short, this is remarkably efficient. The moment one piece of work is long — parsing a 40 MB JSON upload, rendering a big page, compressing or hashing with a synchronous call — every other request on that process waits behind it.&lt;/p&gt;

&lt;p&gt;The symptom is not a crash. It is latency that spikes for reasons that never correlate with the request that suffered. The cure everyone reaches for is worker threads or a second process, which means you are now operating a small distributed system to get what other runtimes give you with a single keyword.&lt;/p&gt;

&lt;p&gt;There is a second-order effect that is easy to miss: a CPU-bound task does not just slow responses, it &lt;strong&gt;stops timers&lt;/strong&gt;. A keep-alive that should fire every two seconds fires when the loop gets around to it. A health check answers late. A connection that looks alive from the outside is simply waiting its turn.&lt;/p&gt;

&lt;h2&gt;
  
  
  Restarts as a feature
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;pm2&lt;/code&gt;, &lt;code&gt;forever&lt;/code&gt;, a systemd unit with &lt;code&gt;Restart=always&lt;/code&gt; — every production Node setup grows a supervisor, and most of them grow a scheduled restart too. Ask why and the answer is some version of "memory creeps". Sometimes it is a real leak. More often it is fragmentation, or a cache that never evicts, or a promise chain that holds a reference a little too long. Nobody finds it because restarting is cheaper than finding it.&lt;/p&gt;

&lt;p&gt;This is a rational decision in the moment and a slow poison over years. A system that needs to be restarted to stay healthy cannot be reasoned about, and the nightly restart becomes the thing that masks the next bug, and the next.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Node is genuinely right
&lt;/h2&gt;

&lt;p&gt;None of this argues against Node for what it is unmatched at: turning components into HTML, running the same code on the server and in the browser, the ecosystem of tooling around that job. Rendering is bursty, stateless and short — exactly the shape the event loop was built for.&lt;/p&gt;

&lt;p&gt;The trouble starts when the same process is also asked to be the thing that holds the database pool, enforces the rate limit, streams the export, keeps the websocket subscriptions and talks to the payment provider. Those are long-lived, stateful, occasionally CPU-heavy jobs, and they belong on a runtime that has threads, a small fixed footprint and a garbage collector tuned for servers rather than browsers.&lt;/p&gt;

&lt;h2&gt;
  
  
  The shape that works
&lt;/h2&gt;

&lt;p&gt;The setups I trust most have stopped trying to make one runtime do both jobs. The front — rendering, hydration, the browser-facing edge — runs where the component model lives. The back — persistence, business rules, anything long-running — runs on something compiled, with a predictable memory ceiling and real concurrency. The two talk over a narrow, typed seam, and each is allowed to be good at one thing.&lt;/p&gt;

&lt;p&gt;It is less novel than it sounds. It is how most serious systems were built before "JavaScript everywhere" made a single runtime feel like a simplification. It was never one. It was a deferral, and the nightly restart is where the interest gets paid.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>backend</category>
      <category>javascript</category>
      <category>node</category>
    </item>
    <item>
      <title>Persistent state in React and Next.js, without a store</title>
      <dc:creator>Luigi Davide Micca</dc:creator>
      <pubDate>Tue, 28 Jul 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/luigidavidemicca/persistent-state-in-react-and-nextjs-without-a-store-2g4k</link>
      <guid>https://dev.to/luigidavidemicca/persistent-state-in-react-and-nextjs-without-a-store-2g4k</guid>
      <description>&lt;p&gt;Somewhere in every React codebase there's a hook called &lt;code&gt;useLocalStorage&lt;/code&gt;, written in ten minutes, copied from a gist, and trusted with the theme, the auth token and half the checkout. I've audited enough front-ends to state this as a law of nature.&lt;/p&gt;

&lt;p&gt;Here's what that innocent hook is actually signing up for — and why "persistence" is a real engineering problem, not a &lt;code&gt;useEffect&lt;/code&gt; afterthought.&lt;/p&gt;

&lt;h2&gt;
  
  
  The six lines everyone writes
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;useLocalStorage&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;T&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;initial&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;T&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;setValue&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;useState&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;T&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="s1"&gt;'null'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="n"&gt;initial&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;setValue&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Five production problems, in ascending order of how late they bite:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Next.js kills it on sight.&lt;/strong&gt; &lt;code&gt;localStorage&lt;/code&gt; doesn't exist on the server — and even guarded, reading it during render makes the first client render differ from the server HTML — hello, hydration mismatch warnings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Corrupt data throws.&lt;/strong&gt; Storage is user-editable and outlives your deploys. One malformed entry and &lt;code&gt;JSON.parse&lt;/code&gt; takes the component tree down.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Components disagree.&lt;/strong&gt; Two components using the same key each hold their own &lt;code&gt;useState&lt;/code&gt; copy: change one, the other doesn't move. Most teams "fix" this with Context — a provider, for a string in storage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tabs disagree, values rot.&lt;/strong&gt; No &lt;code&gt;storage&lt;/code&gt; event handling, no expiry: last month's draft and yesterday's token are treated as fresh.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write storms.&lt;/strong&gt; Persisting a text input on every keystroke hammers a synchronous main-thread API.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of this is exotic. It's the same checklist, in every app, usually rediscovered one incident at a time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The checklist, packaged
&lt;/h2&gt;

&lt;p&gt;This is the itch behind &lt;a href="https://github.com/LuigiDavideMicca/smart-state" rel="noopener noreferrer"&gt;&lt;code&gt;smart-state&lt;/code&gt;&lt;/a&gt;, a small open-source hook I maintain (~3 kB min+gzip, zero dependencies — full disclosure, it's mine):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;useSmartState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'smart-state'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;setTheme&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;useSmartState&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="s1"&gt;'light'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="s1"&gt;'dark'&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'light'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;persist&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;storageKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'theme'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;syncTabs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Drop-in &lt;code&gt;useState&lt;/code&gt; semantics — lazy initializer, functional updater — with the whole checklist handled: SSR-safe hydration (no mismatch warnings), shared state across every component using the key &lt;em&gt;without a provider&lt;/em&gt; (it's built on &lt;code&gt;useSyncExternalStore&lt;/code&gt;), cross-tab sync, and error handling that degrades instead of throwing.&lt;/p&gt;

&lt;p&gt;The production details are options, not rewrites:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Storage is untrusted input: validate it&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;setUser&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;useSmartState&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;guest&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;persist&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;storageKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'user'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;userSchema&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// zod, valibot, anything that throws&lt;/span&gt;
  &lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;migrate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;old&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="nf"&gt;upgradeV1&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;old&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// A session that expires on its own&lt;/span&gt;
&lt;span class="nf"&gt;useSmartState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;persist&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;storageKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'token'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ttl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// A draft that doesn't hammer storage on every keystroke&lt;/span&gt;
&lt;span class="nf"&gt;useSmartState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;persist&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;storageKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'draft'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;writeDebounce&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;parse&lt;/code&gt;/&lt;code&gt;version&lt;/code&gt;/&lt;code&gt;migrate&lt;/code&gt; trio is the part I care most about: persisted data crosses your release boundaries, so it deserves the same suspicion as any external input. Very few libraries treat it that way.&lt;/p&gt;

&lt;h2&gt;
  
  
  "Shouldn't this just be Zustand?"
&lt;/h2&gt;

&lt;p&gt;Honesty corner: if your app has genuinely complex shared state — many writers, derived data, devtools time-travel — a store like Zustand or Redux Toolkit earns its place, and &lt;code&gt;persist&lt;/code&gt; middleware exists. But adopting a store &lt;em&gt;because you need localStorage&lt;/em&gt; is backwards: you're taking on an architecture to get a side effect. For the theme, the filters, the draft and the cart, a persistence hook is the right size — and at about 3 kB it costs less than the store's readme.&lt;/p&gt;

&lt;p&gt;It's the same lesson I keep repeating in &lt;a href="https://luigimicca.com/en/services/technical-consulting" rel="noopener noreferrer"&gt;architecture reviews&lt;/a&gt;: name the actual requirement first. "Sharing", "persisting", "syncing" and "caching" are four different problems that all get called "state management" in meetings.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm an independent software architect focused on front-end work — smart-state has siblings for Vue and Nuxt that share its storage format. If your React codebase has three hand-rolled useLocalStorage hooks and a hydration warning nobody investigates, &lt;a href="https://luigimicca.com/en/contact" rel="noopener noreferrer"&gt;let's talk&lt;/a&gt;: the intro call is free.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>nextjs</category>
      <category>react</category>
      <category>typescript</category>
    </item>
    <item>
      <title>The European Accessibility Act is being enforced. Is your website in scope?</title>
      <dc:creator>Luigi Davide Micca</dc:creator>
      <pubDate>Fri, 17 Jul 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/luigidavidemicca/the-european-accessibility-act-is-being-enforced-is-your-website-in-scope-1aj0</link>
      <guid>https://dev.to/luigidavidemicca/the-european-accessibility-act-is-being-enforced-is-your-website-in-scope-1aj0</guid>
      <description>&lt;p&gt;For years, web accessibility in Europe lived in a comfortable limbo: everyone agreed it mattered, almost nobody was forced to act. That limbo ended on 28 June 2025, when the European Accessibility Act became applicable — and 2026 is turning out to be the year the machinery actually starts moving. Market surveillance authorities are running inspections, advocacy groups are filing complaints, law firms are sending warning letters, and the first lawsuits were filed in France in November 2025. The fines are on the books even though none has been made public yet: Germany allows fines of up to €100,000 per violation; in France they range from €5,000 to €250,000, plus €25,000 per year for a missing accessibility statement.&lt;/p&gt;

&lt;p&gt;If you sell to EU consumers, this is now an engineering deadline that has already passed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who is actually in scope
&lt;/h2&gt;

&lt;p&gt;The EAA covers businesses with 10 or more employees or more than €2 million in annual turnover that sell covered products or services to EU consumers. In practice, that includes most of the web that takes money: e-commerce shops, banking and payment flows, booking systems, transport ticketing, consumer SaaS.&lt;/p&gt;

&lt;p&gt;Microenterprises providing services are formally exempt — but don't relax yet: if a larger company is your client, their compliance obligations flow down into what you supply them. I've already seen accessibility clauses appear in procurement checklists the same way GDPR clauses did in 2018.&lt;/p&gt;

&lt;h2&gt;
  
  
  What compliance actually means
&lt;/h2&gt;

&lt;p&gt;The standard behind the law is EN 301 549, which in web terms boils down to WCAG at level AA. Strip away the acronyms and it's a concrete engineering checklist:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Keyboard.&lt;/strong&gt; Every flow — menu, filters, checkout — works without a mouse, with a visible focus indicator and no traps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Forms.&lt;/strong&gt; Real labels, and error messages that say what to fix, not just "invalid input".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Contrast and text.&lt;/strong&gt; Sufficient contrast ratios, text that scales to 200% without breaking the layout.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structure.&lt;/strong&gt; Semantic HTML: headings that outline the page, buttons that are buttons, links that are links. Screen readers navigate structure, not pixels.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Media.&lt;/strong&gt; Alt text that describes function, captions on videos.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A published accessibility statement&lt;/strong&gt; and a feedback channel — the absence of this document is the single easiest violation for a regulator to spot, and in France it has its own recurring fine.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this is exotic. It's the same discipline as performance work: measurable, testable and mostly invisible when done right.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honesty corner: the overlay shortcut
&lt;/h2&gt;

&lt;p&gt;There's a whole industry selling one-line JavaScript widgets that promise compliance overnight. They don't deliver it. Overlays can't fix missing labels, broken keyboard flows or divs pretending to be buttons — and several enforcement actions and lawsuits have explicitly named sites &lt;em&gt;with&lt;/em&gt; overlays installed. If a vendor promises EAA compliance for €49 a month and one script tag, you're buying a false sense of security, and the regulator knows it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The upside nobody mentions
&lt;/h2&gt;

&lt;p&gt;Accessibility work overlaps almost perfectly with things you already want. Semantic structure is what search engines parse. The faster, lighter pages it pushes you towards help everyone. Clear forms with described errors convert better for everyone, not just for the roughly 87 million people in the EU living with some form of disability — a market larger than Germany.&lt;/p&gt;

&lt;p&gt;In my experience, teams that treat accessibility as a quality attribute — like performance, like security — end up with better front-ends across the board. Teams that treat it as a box-ticking exercise do it twice: once badly, once properly after the complaint.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where I'd start
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Audit honestly.&lt;/strong&gt; Automated scanners catch maybe a third of real issues; the rest requires a human with a keyboard and a screen reader walking your critical flows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prioritise by user impact.&lt;/strong&gt; A broken checkout matters more than a decorative image in the footer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fix in normal sprints.&lt;/strong&gt; Most fixes are small; the expensive part is finding the problems, not fixing them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Publish the statement&lt;/strong&gt; and wire accessibility checks into your definition of done, so the work doesn't rot.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The EAA didn't invent any of this — it just attached a price tag to ignoring it.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm an independent software architect focused on front-end work, and accessibility reviews are part of every &lt;a href="https://luigimicca.com/en/services/technical-consulting" rel="noopener noreferrer"&gt;audit I run&lt;/a&gt;. If you're not sure where your site stands, &lt;a href="https://luigimicca.com/en/contact" rel="noopener noreferrer"&gt;let's talk&lt;/a&gt;: a 30-minute intro call is free.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>a11y</category>
      <category>accessibility</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Persistent state in Vue 3, without reaching for Pinia</title>
      <dc:creator>Luigi Davide Micca</dc:creator>
      <pubDate>Thu, 16 Jul 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/luigidavidemicca/persistent-state-in-vue-3-without-reaching-for-pinia-3k64</link>
      <guid>https://dev.to/luigidavidemicca/persistent-state-in-vue-3-without-reaching-for-pinia-3k64</guid>
      <description>&lt;p&gt;Every Vue app eventually grows a handful of values that must outlive a page reload: the chosen theme, a search filter, a half-written form, a cart. And every team eventually has the same conversation about them: "should we add Pinia for this?"&lt;/p&gt;

&lt;p&gt;Usually, no. A store solves &lt;em&gt;shared&lt;/em&gt; state; these are &lt;em&gt;persistent&lt;/em&gt; values — and gluing persistence onto a store still leaves you writing the same plumbing. Let's look at what that plumbing actually involves, because the details are where the bugs live.&lt;/p&gt;

&lt;h2&gt;
  
  
  The hand-rolled version (and its traps)
&lt;/h2&gt;

&lt;p&gt;The naive approach fits in six lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;watch&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'vue'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;theme&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'theme'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="s1"&gt;'"light"'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nf"&gt;watch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'theme'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It works — on your machine, today. In production it has at least five holes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;SSR crashes.&lt;/strong&gt; On Nuxt or any server render, &lt;code&gt;localStorage&lt;/code&gt; doesn't exist. First hydration error of the sprint.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Corrupt data throws.&lt;/strong&gt; One malformed value in storage (an old release, an extension, a curious user) and &lt;code&gt;JSON.parse&lt;/code&gt; takes your component down with it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tabs disagree.&lt;/strong&gt; Change the theme in one tab and the other five keep the old one until reload. The &lt;code&gt;storage&lt;/code&gt; event fixes it — if you remember it, and remember to remove the listener — otherwise you've built a memory leak.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stale values live forever.&lt;/strong&gt; A cached token, a draft from last month: without an expiry, storage becomes a junk drawer your app trusts blindly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write storms.&lt;/strong&gt; Persisting a text input on every keystroke hammers a synchronous API on the main thread.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of these is hard. All of them together, done in every component that needs them, is exactly the kind of code that grows five slightly different implementations in one codebase — I audit front-ends for a living, and I can promise you it does.&lt;/p&gt;

&lt;h2&gt;
  
  
  The one-line version
&lt;/h2&gt;

&lt;p&gt;This is the itch behind &lt;a href="https://github.com/LuigiDavideMicca/vue-smart-state" rel="noopener noreferrer"&gt;&lt;code&gt;vue-smart-state&lt;/code&gt;&lt;/a&gt;, a small open-source composable I maintain (~2.4 kB, zero dependencies — full disclosure, this is my package):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'vue-smart-state'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;setTheme&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;useState&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="s1"&gt;'light'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="s1"&gt;'dark'&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'light'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;persist&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;storageKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'theme'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;syncTabs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One call gives you the whole checklist: restore on load, persist on change, cross-tab sync with proper listener cleanup, SSR safety, and error handling that degrades instead of throwing. The API deliberately mirrors React's &lt;code&gt;useState&lt;/code&gt; — a tuple plus a functional updater (&lt;code&gt;setTheme(t =&amp;gt; …)&lt;/code&gt;) — because half the developers joining a Vue team carry that muscle memory with them.&lt;/p&gt;

&lt;p&gt;The production details are options away:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// A session that expires on its own&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;setToken&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;persist&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;storageKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'token'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;ttl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// A draft that doesn't hammer storage on every keystroke&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;draft&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;setDraft&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;persist&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;storageKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'draft'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;writeDebounce&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And for Nuxt there's a one-liner module, &lt;a href="https://github.com/LuigiDavideMicca/nuxt-smart-state" rel="noopener noreferrer"&gt;&lt;code&gt;nuxt-smart-state&lt;/code&gt;&lt;/a&gt;, that auto-imports the composable as &lt;code&gt;useSmartState&lt;/code&gt; — aliased on purpose, since Nuxt's own &lt;code&gt;useState&lt;/code&gt; solves a different problem (per-request server state, not browser persistence).&lt;/p&gt;

&lt;h2&gt;
  
  
  When you &lt;em&gt;do&lt;/em&gt; want a store
&lt;/h2&gt;

&lt;p&gt;Honesty corner: if many distant components mutate the same complex state, if you need devtools time-travel, or if your team benefits from one blessed pattern for app-wide data — use Pinia — it's excellent. The point isn't "stores are bad"; it's that &lt;strong&gt;persistence is not a reason to adopt one&lt;/strong&gt;. Pick the store for sharing, pick a persistence composable for persisting, and let each do its job.&lt;/p&gt;

&lt;p&gt;The wider lesson is one I keep repeating in &lt;a href="https://luigimicca.com/en/services/technical-consulting" rel="noopener noreferrer"&gt;architecture work&lt;/a&gt;: most "we need a state management solution" conversations dissolve once you name the actual requirement. Sharing, persisting, syncing and caching are four different problems wearing the same T-shirt.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm an independent software architect focused on front-end work — and I occasionally package the boring parts well, like the composable above. If your Vue codebase has grown five ways of doing the same thing, &lt;a href="https://luigimicca.com/en/contact" rel="noopener noreferrer"&gt;let's talk&lt;/a&gt;: a 30-minute intro call is free.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>javascript</category>
      <category>vue</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
