<?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: Наталья Решетникова</title>
    <description>The latest articles on DEV Community by Наталья Решетникова (@natalia_weblevo).</description>
    <link>https://dev.to/natalia_weblevo</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%2F4161840%2F15b55098-56e7-4c78-a892-89f9d345c960.jpg</url>
      <title>DEV Community: Наталья Решетникова</title>
      <link>https://dev.to/natalia_weblevo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/natalia_weblevo"/>
    <language>en</language>
    <item>
      <title>One PHP Warning Emptied the H1 on Every WordPress Blog Post</title>
      <dc:creator>Наталья Решетникова</dc:creator>
      <pubDate>Sun, 22 Nov 2026 12:12:05 +0000</pubDate>
      <link>https://dev.to/natalia_weblevo/one-php-warning-emptied-the-h1-on-every-wordpress-blog-post-1i70</link>
      <guid>https://dev.to/natalia_weblevo/one-php-warning-emptied-the-h1-on-every-wordpress-blog-post-1i70</guid>
      <description>&lt;p&gt;A client's WordPress site looked fine on the home page and on its product pages. Every blog post, though, had two problems: a PHP warning printed at the top, and an empty &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;. The cause was one line in the theme's &lt;code&gt;single.php&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The symptom
&lt;/h2&gt;

&lt;p&gt;Open any post and you saw:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a PHP warning above the content about accessing an array offset on a value that wasn't an array;&lt;/li&gt;
&lt;li&gt;an &lt;code&gt;&amp;lt;h1&amp;gt;&amp;lt;/h1&amp;gt;&lt;/code&gt; with nothing inside it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The empty H1 is the expensive part. Search engines and screen readers use the H1 as the page's main heading. Every article on the blog was effectively untitled.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cause
&lt;/h2&gt;

&lt;p&gt;The theme was built for its own custom post type. In &lt;code&gt;single.php&lt;/code&gt; the title came from the theme's own data array (simplified):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;lt;?&lt;/span&gt;&lt;span class="n"&gt;php&lt;/span&gt; &lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$content&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'title'&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;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That array is filled for the theme's own content type. On an ordinary blog post it isn't, so &lt;code&gt;$content&lt;/code&gt; wasn't an array. PHP raised a warning for &lt;code&gt;$content['title']&lt;/code&gt;, returned null, and the heading came out empty.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;Fall back to the standard WordPress title when the theme's field isn't there:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="n"&gt;php&lt;/span&gt;
&lt;span class="nv"&gt;$mc_title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;is_array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nb"&gt;empty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$content&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'title'&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;?&lt;/span&gt; &lt;span class="nv"&gt;$content&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'title'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;get_the_title&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;lt;?&lt;/span&gt;&lt;span class="n"&gt;php&lt;/span&gt; &lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nf"&gt;esc_html&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$mc_title&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;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two checks matter. &lt;code&gt;is_array()&lt;/code&gt; stops the warning. &lt;code&gt;!empty()&lt;/code&gt; catches the case where the field exists but is blank, so you never print an empty heading again. &lt;code&gt;esc_html()&lt;/code&gt; is worth adding while you are there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do it in a child theme
&lt;/h2&gt;

&lt;p&gt;Editing the parent theme works until the next theme update overwrites it. Copy &lt;code&gt;single.php&lt;/code&gt; into a child theme and change it there. On this site we patched the parent theme directly, so the change is written down and gets re-checked after every theme update.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check the rest of the site
&lt;/h2&gt;

&lt;p&gt;After the fix, look for the same pattern elsewhere:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Search the theme for &lt;code&gt;$content['&lt;/code&gt; and similar direct array reads from meta.&lt;/li&gt;
&lt;li&gt;Open one page of every template type (post, page, archive, custom type) and check for exactly one non-empty H1.&lt;/li&gt;
&lt;li&gt;Turn &lt;code&gt;WP_DEBUG_DISPLAY&lt;/code&gt; off on production so warnings go to the log, not to visitors.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;A theme that assumes its own data structure will break quietly the moment the site is used in a way the theme author didn't plan for. Guard every read from post meta, and always fall back to the WordPress core value.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I build and maintain small-business websites at &lt;a href="https://weblevo.com/" rel="noopener noreferrer"&gt;Weblevo&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>php</category>
      <category>seo</category>
      <category>debugging</category>
    </item>
    <item>
      <title>sharp on Vercel: "libvips-cpp.so: cannot open shared object file" when the install was clean</title>
      <dc:creator>Наталья Решетникова</dc:creator>
      <pubDate>Sun, 15 Nov 2026 10:19:59 +0000</pubDate>
      <link>https://dev.to/natalia_weblevo/sharp-on-vercel-libvips-cppso-cannot-open-shared-object-file-when-the-install-was-clean-289g</link>
      <guid>https://dev.to/natalia_weblevo/sharp-on-vercel-libvips-cppso-cannot-open-shared-object-file-when-the-install-was-clean-289g</guid>
      <description>&lt;p&gt;Our first production deploy of Brifora (an AI design studio built with Next.js and Supabase) looked perfect — until every route that used &lt;code&gt;sharp&lt;/code&gt; started returning 500.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The symptom.&lt;/strong&gt; The function crashed while loading the module, before the first line of the handler ran. The Vercel runtime log said:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: Could not load the "sharp" module using the linux-x64 runtime
ERR_DLOPEN_FAILED: libvips-cpp.so.8.18.3: cannot open shared object file:
No such file or directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The build log was clean: all packages installed, no optional dependency skipped, and the lock file had both Linux entries with the right &lt;code&gt;os&lt;/code&gt; and &lt;code&gt;cpu&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Read which file is missing.&lt;/strong&gt; Not &lt;code&gt;sharp&lt;/code&gt;, not its native binding — &lt;code&gt;libvips-cpp.so&lt;/code&gt;. That detail is the whole story.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The cause.&lt;/strong&gt; Since sharp 0.34, libvips ships in a separate package, &lt;code&gt;@img/sharp-libvips-&amp;lt;platform&amp;gt;&lt;/code&gt;. The binding loads it through an rpath at &lt;code&gt;dlopen&lt;/code&gt; time. Nothing ever &lt;code&gt;require&lt;/code&gt;s it, so Next's output file tracing doesn't see it and doesn't copy it into the serverless function. (&lt;code&gt;serverExternalPackages&lt;/code&gt; is not the problem — sharp is already external, as the error itself shows.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fix.&lt;/strong&gt; Tell the tracer explicitly, in &lt;code&gt;next.config.ts&lt;/code&gt;:&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="n"&gt;outputFileTracingIncludes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="s1"&gt;'/api/generate'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'node_modules/@img/**'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s1"&gt;'/api/uploads'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'node_modules/@img/**'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s1"&gt;'/api/vectorize'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'node_modules/@img/**'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s1"&gt;'/api/edit'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'node_modules/@img/**'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s1"&gt;'/api/maintenance/sweep-uploads'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'node_modules/@img/**'&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;We listed routes by name instead of &lt;code&gt;'/*'&lt;/code&gt;: libvips weighs tens of megabytes, and the login page or the gallery has no use for it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Act two, two days later.&lt;/strong&gt; The same error came back — this time on two &lt;em&gt;pages&lt;/em&gt;, not API routes. They don't process images at all. But they imported a couple of constants (&lt;code&gt;UPLOAD_MAX_BYTES&lt;/code&gt;, &lt;code&gt;UPLOAD_TYPES&lt;/code&gt;) from our uploads module — and that module imports sharp. A constant pulled the whole native dependency in with it.&lt;/p&gt;

&lt;p&gt;We had a comment in the config saying "don't forget to add new routes here". It didn't help: the person who wrote the comment was the person who forgot. So we replaced the comment with a check — a command whose output must have as many lines as there are &lt;code&gt;@img&lt;/code&gt; entries in the config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep -rln &lt;span class="s2"&gt;"generation/uploads'\|generation/preview'\|generation/svg'\|generation/sources'"&lt;/span&gt; src/app/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Takeaways:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A clean install log doesn't mean a native library reaches your serverless function. The tracer follows &lt;code&gt;require&lt;/code&gt;, not rpath or &lt;code&gt;dlopen&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Read exactly which file is missing: &lt;code&gt;libvips-cpp.so&lt;/code&gt; and &lt;code&gt;sharp.node&lt;/code&gt; point to different problems.&lt;/li&gt;
&lt;li&gt;A hand-maintained list of exceptions will go stale. Replace "remember to update this" comments with a command that checks it.&lt;/li&gt;
&lt;li&gt;Importing a constant from a module imports its heavy dependencies too. Keep constants in a light file.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Brifora: &lt;a href="https://brifora.app" rel="noopener noreferrer"&gt;https://brifora.app&lt;/a&gt; — built by Weblevo (weblevo.com)&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>vercel</category>
      <category>sharp</category>
      <category>debugging</category>
    </item>
    <item>
      <title>A blank WordPress page caused by one missing hidden input</title>
      <dc:creator>Наталья Решетникова</dc:creator>
      <pubDate>Fri, 13 Nov 2026 10:02:14 +0000</pubDate>
      <link>https://dev.to/natalia_weblevo/a-blank-wordpress-page-caused-by-one-missing-hidden-input-2efe</link>
      <guid>https://dev.to/natalia_weblevo/a-blank-wordpress-page-caused-by-one-missing-hidden-input-2efe</guid>
      <description>&lt;p&gt;A client's WordPress rental site had one page that rendered completely blank below the header: the camping-gear rental page. Other rental pages were fine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The cause.&lt;/strong&gt; The theme's booking script expects every rental page to have a full checkout block: hidden inputs for the cleaning fee and tax, and a prepayment button. The camping-gear item had no cleaning fee and no tax, so the theme didn't render those elements. The script tried to read them anyway, hit &lt;code&gt;null&lt;/code&gt; and threw.&lt;/p&gt;

&lt;p&gt;Because the caching plugin combines all scripts into one file, that single error stopped everything after it — including the code that draws the page content. One missing input, one blank page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The quick fix.&lt;/strong&gt; Without touching the theme, we added a small snippet (via WPCode, site-wide header) that runs on &lt;code&gt;DOMContentLoaded&lt;/code&gt; and, for every &lt;code&gt;.checkout&lt;/code&gt; block, adds the missing hidden inputs with value &lt;code&gt;0&lt;/code&gt; and a hidden prepayment button if they aren't there. The page came back immediately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The better fix.&lt;/strong&gt; Daily rental of tents isn't really a "booking with nights", so we then replaced the calendar on that page with a simple price list and a WhatsApp button.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One more lesson.&lt;/strong&gt; To show the Portuguese version of the price list we first checked &lt;code&gt;document.documentElement.lang&lt;/code&gt; — but the theme always outputs &lt;code&gt;en&lt;/code&gt;. Checking &lt;code&gt;location.pathname.startsWith('/pt/')&lt;/code&gt; worked.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Takeaways:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;When one page is blank, open the console first: a single uncaught error can hide everything.&lt;/li&gt;
&lt;li&gt;Combined scripts turn a small error into a full outage.&lt;/li&gt;
&lt;li&gt;Don't trust the &lt;code&gt;lang&lt;/code&gt; attribute on multilingual WordPress sites — check how the plugin really builds URLs.&lt;/li&gt;
&lt;li&gt;A patch is fine to stop the bleeding; then fix the product logic.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We maintain small business websites at Weblevo: &lt;a href="https://weblevo.com" rel="noopener noreferrer"&gt;https://weblevo.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>javascript</category>
      <category>debugging</category>
      <category>webdev</category>
    </item>
    <item>
      <title>A silent bug: signing Supabase Storage URLs in the wrong bucket</title>
      <dc:creator>Наталья Решетникова</dc:creator>
      <pubDate>Fri, 06 Nov 2026 10:43:22 +0000</pubDate>
      <link>https://dev.to/natalia_weblevo/a-silent-bug-signing-supabase-storage-urls-in-the-wrong-bucket-55ne</link>
      <guid>https://dev.to/natalia_weblevo/a-silent-bug-signing-supabase-storage-urls-in-the-wrong-bucket-55ne</guid>
      <description>&lt;p&gt;This week we fixed a bug in Brifora (an AI design studio for small businesses, built with Next.js and Supabase) that never threw a single error.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The symptom.&lt;/strong&gt; In "My works", cross-stitch patterns showed up without a download link. Logos, pictures and videos were fine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The cause.&lt;/strong&gt; We store files in several Supabase Storage buckets, because each bucket has its own allowed MIME types and size limit: images in &lt;code&gt;generations&lt;/code&gt;, videos in &lt;code&gt;videos&lt;/code&gt;, PDF patterns in &lt;code&gt;patterns&lt;/code&gt;. The history page signed every path in &lt;code&gt;generations&lt;/code&gt;, with one exception for &lt;code&gt;.mp4&lt;/code&gt;. A PDF path signed in the wrong bucket doesn't fail — &lt;code&gt;createSignedUrl&lt;/code&gt; simply finds nothing and returns no URL. The UI then shows an empty slot, which looks exactly like "the file was never saved".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fix.&lt;/strong&gt; One shared function decides the bucket from the file extension, and every place that signs or deletes files uses it:&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;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;bucketForPath&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;StorageBucket&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;endsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.mp4&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;videos&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;endsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.pdf&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;patterns&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;generations&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then group the paths by bucket and sign each group in one batch call — one request per bucket, not one per file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lessons:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If a rule ("which bucket?") lives in two files, it will drift. Put it in one place.&lt;/li&gt;
&lt;li&gt;Extension is a safe signal only if &lt;em&gt;you&lt;/em&gt; set it when storing the file — not the provider.&lt;/li&gt;
&lt;li&gt;A missing URL should be visible in the UI as an error, not as an empty frame.&lt;/li&gt;
&lt;li&gt;Watch what the fix exposes: once PDFs had links, they would have landed in an &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tag. We added a separate "PDF" tile.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Brifora: &lt;a href="https://brifora.app" rel="noopener noreferrer"&gt;https://brifora.app&lt;/a&gt; — built by Weblevo (weblevo.com).&lt;/p&gt;

</description>
      <category>supabase</category>
      <category>nextjs</category>
      <category>typescript</category>
      <category>debugging</category>
    </item>
    <item>
      <title>hreflang on a static site with clean URLs: the .html mistake</title>
      <dc:creator>Наталья Решетникова</dc:creator>
      <pubDate>Wed, 04 Nov 2026 10:53:29 +0000</pubDate>
      <link>https://dev.to/natalia_weblevo/hreflang-on-a-static-site-with-clean-urls-the-html-mistake-1ci8</link>
      <guid>https://dev.to/natalia_weblevo/hreflang-on-a-static-site-with-clean-urls-the-html-mistake-1ci8</guid>
      <description>&lt;p&gt;We maintain several small multilingual sites on static hosting. One of them — a shop in Funchal — had a quiet SEO problem that took one line per page to fix.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The setup.&lt;/strong&gt; Netlify serves &lt;code&gt;/blog/article.html&lt;/code&gt; at the clean URL &lt;code&gt;/blog/article&lt;/code&gt; and redirects the &lt;code&gt;.html&lt;/code&gt; version. The canonical tag pointed to the clean URL. But the &lt;code&gt;hreflang&lt;/code&gt; tags still pointed to &lt;code&gt;…/article.html&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it matters.&lt;/strong&gt; Google expects hreflang alternates to point to the canonical, indexable URL. If they point to a redirect, the language cluster is inconsistent and Search Console starts reporting pages "with redirect" and alternate-page issues.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fix.&lt;/strong&gt; Make every URL that describes the page agree: canonical, &lt;code&gt;hreflang&lt;/code&gt; (including &lt;code&gt;x-default&lt;/code&gt;), &lt;code&gt;og:url&lt;/code&gt;, structured data &lt;code&gt;url&lt;/code&gt;/&lt;code&gt;mainEntityOfPage&lt;/code&gt;, internal links and the sitemap — all without &lt;code&gt;.html&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A quick check you can run:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-rn&lt;/span&gt; &lt;span class="s1"&gt;'hreflang'&lt;/span&gt; &lt;span class="nt"&gt;--include&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;.html &lt;span class="nb"&gt;.&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s1"&gt;'\.html"'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Anything it prints is a page to fix.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Takeaway.&lt;/strong&gt; On static sites, URL rules live in two places — hosting redirects and your HTML. When you change one, search for the other.&lt;/p&gt;

&lt;p&gt;We build and maintain multilingual websites for small businesses: &lt;a href="https://weblevo.com/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=hreflang" rel="noopener noreferrer"&gt;weblevo.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>seo</category>
      <category>webdev</category>
      <category>netlify</category>
      <category>beginners</category>
    </item>
    <item>
      <title>We built an AI design SaaS for small businesses in two months: Next.js, Supabase, Stripe as merchant of record, fal.ai</title>
      <dc:creator>Наталья Решетникова</dc:creator>
      <pubDate>Sun, 04 Oct 2026 14:54:30 +0000</pubDate>
      <link>https://dev.to/natalia_weblevo/we-built-an-ai-design-saas-for-small-businesses-in-two-months-nextjs-supabase-stripe-as-1297</link>
      <guid>https://dev.to/natalia_weblevo/we-built-an-ai-design-saas-for-small-businesses-in-two-months-nextjs-supabase-stripe-as-1297</guid>
      <description>&lt;p&gt;&lt;em&gt;Case study from Weblevo, a two-person web studio in Madeira. Brifora is our own product, so this is the honest version.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;My co-founder runs a print and embroidery shop. Every week someone brings a phone photo of a logo and asks for it on a t-shirt. The file is a 400-px JPG; the embroidery machine needs a vector; the customer has no designer and no budget for one. We built &lt;strong&gt;&lt;a href="https://brifora.app/?utm_source=devto" rel="noopener noreferrer"&gt;Brifora&lt;/a&gt;&lt;/strong&gt; to turn "what the customer already has" into files that print.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Create:&lt;/strong&gt; logo from a 6-question brief (4 variants, SVG from the start), product images, short video from a still.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fix:&lt;/strong&gt; background removal, new scene, 4× upscale, outpaint to banner format, object removal, free captions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Brand:&lt;/strong&gt; logo mockups on 8 products with a free position/curve editor, "more in this style" series, raster → SVG, brand kit, cross-stitch pattern from any image (yes, really — the shop does embroidery).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Credits-based pricing from €9/month. Four interface languages: EN, PT, UK, RU.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Next.js 16&lt;/strong&gt; on Vercel (App Router, server actions, edge route for OG images)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Supabase&lt;/strong&gt; — Postgres, auth by email code, storage, RLS everywhere&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stripe Managed Payments&lt;/strong&gt; — Stripe is merchant of record, so EU VAT, invoices and disputes are theirs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;fal.ai&lt;/strong&gt; — one gateway to all generation models (image, vector, video, and a small text model for the assistant)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resend&lt;/strong&gt; for email, &lt;strong&gt;ElevenLabs&lt;/strong&gt; for the assistant's recorded voice, &lt;strong&gt;Vercel Analytics&lt;/strong&gt; (no cookies, no banner)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Five decisions worth stealing
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Every generation is a job.&lt;/strong&gt; The browser enqueues; fal.ai calls a signed webhook on completion; a one-minute cron sweeps stragglers and refunds credits on provider failure. The user can close the tab. Video made this mandatory, but it fixed image flows too.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The model draws the blank; code places the logo.&lt;/strong&gt; Asking a model to "put this logo on a mug" mangles the logo. We render an empty product, then composite the user's actual file with sharp — crisp, editable, and the "nudge it 20 px left" editor is free because no model is involved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Prices live in one table.&lt;/strong&gt; Every card, every page, every FAQ answer reads credit costs from the same source. We changed prices three times before launch and never had a stale number.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Language in the URL, not in a cookie.&lt;/strong&gt; We launched with cookie-based language and Google indexed only English. Moving to &lt;code&gt;/pt/&lt;/code&gt;, &lt;code&gt;/uk/&lt;/code&gt;, &lt;code&gt;/ru/&lt;/code&gt; prefixes with hreflang took a day and was the single most important SEO change.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Launch mode as an env var.&lt;/strong&gt; &lt;code&gt;LAUNCH_MODE=open&lt;/code&gt; flipped the "coming soon" banner off at launch without a redeploy. Boring, and exactly what you want on launch day.&lt;/p&gt;

&lt;h2&gt;
  
  
  Things that bit us
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;allow_promotion_codes&lt;/code&gt; and &lt;code&gt;discounts&lt;/code&gt; are mutually exclusive in Stripe Checkout. We apply the code server-side when the user typed one, and let Stripe show the field when they didn't.&lt;/li&gt;
&lt;li&gt;Satori (next/og) can't render a 50-path SVG character; our OG cards are typographic.&lt;/li&gt;
&lt;li&gt;Headless browsers are filtered by Vercel Analytics as bots — test tracking with a real user agent or you'll think it's broken.&lt;/li&gt;
&lt;li&gt;fal.ai's &lt;code&gt;bria/expand&lt;/code&gt; wants absolute canvas dimensions, not a ratio.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Timeline
&lt;/h2&gt;

&lt;p&gt;First commit to public launch: about two months, one product owner, AI-assisted development (Claude Code did most of the typing; we did the deciding). Roughly 40 screens, tools and integrations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Product: &lt;a href="https://brifora.app/?utm_source=devto" rel="noopener noreferrer"&gt;https://brifora.app/?utm_source=devto&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Examples: &lt;a href="https://brifora.app/examples" rel="noopener noreferrer"&gt;https://brifora.app/examples&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The studio: &lt;a href="https://weblevo.com" rel="noopener noreferrer"&gt;https://weblevo.com&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Questions about the stack are welcome in the comments — happy to go deeper on the job queue or the Stripe MoR setup.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>saas</category>
      <category>nextjs</category>
      <category>startup</category>
    </item>
  </channel>
</rss>
