<?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: Maegami</title>
    <description>The latest articles on DEV Community by Maegami (@maegamidev).</description>
    <link>https://dev.to/maegamidev</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%2F4008837%2Ff88119ed-7329-47f0-9be3-c8e6666843c4.png</url>
      <title>DEV Community: Maegami</title>
      <link>https://dev.to/maegamidev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/maegamidev"/>
    <language>en</language>
    <item>
      <title>I built a Next.js 16 store starter for perfume &amp; cosmetics (and learned a few things)</title>
      <dc:creator>Maegami</dc:creator>
      <pubDate>Tue, 30 Jun 2026 00:55:04 +0000</pubDate>
      <link>https://dev.to/maegamidev/i-built-a-nextjs-16-store-starter-for-perfume-cosmetics-and-learned-a-few-things-fgg</link>
      <guid>https://dev.to/maegamidev/i-built-a-nextjs-16-store-starter-for-perfume-cosmetics-and-learned-a-few-things-fgg</guid>
      <description>&lt;p&gt;Honestly a bit scary to post this. I'm a self-taught dev, and Aura is the first thing I've actually finished and put up for sale. It's a Next.js 16 storefront starter, but I didn't want to make "another generic shop", so I built it specifically for perfume and cosmetics.&lt;/p&gt;

&lt;p&gt;Live demo: &lt;a href="https://aura-starter.vercel.app" rel="noopener noreferrer"&gt;https://aura-starter.vercel.app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's why I niched it, and two things that confused me while building, in case it helps someone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why perfume &amp;amp; cosmetics
&lt;/h2&gt;

&lt;p&gt;I kept noticing fragrance and cosmetics aren't sold like normal products:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;People buy &lt;strong&gt;decants&lt;/strong&gt; first (2, 5 or 10 ml of a scent) before paying for a full bottle. So instead of a product photo, my hero is three little apothecary vials, filled to different heights by size.&lt;/li&gt;
&lt;li&gt;Every fragrance has a &lt;strong&gt;note pyramid&lt;/strong&gt; (top / heart / base). Buyers actually care how it opens and where it lands.&lt;/li&gt;
&lt;li&gt;Cosmetics need real &lt;strong&gt;shade swatches&lt;/strong&gt; and a short &lt;strong&gt;ingredients&lt;/strong&gt; list.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most templates ignore all that. I figured building around how people actually buy is what makes it worth something.&lt;/p&gt;

&lt;h2&gt;
  
  
  Thing that confused me #1: React 19 and refs
&lt;/h2&gt;

&lt;p&gt;I have a hover panel that slides in with product info, and I wanted it to keep showing the last product while it slides away. I reached for a ref:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;lastShown&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useRef&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&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;active&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;lastShown&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;active&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// React 19 yelled at me here&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Turns out React 19 has a new lint rule that won't let you read or write refs during render. Took me a while to get it. The fix was just to keep it in state and set it in the handler:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;shownSlug&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setShownSlug&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="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;open&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;slug&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="nf"&gt;setActiveSlug&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;slug&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="nf"&gt;setShownSlug&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;slug&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;Cleaner in the end, honestly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Thing that confused me #2: making graphics work in dark mode
&lt;/h2&gt;

&lt;p&gt;The decant vials are just divs, not images. I didn't want to draw them twice for light and dark, so instead of fixed colors I used CSS variables for the fill:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="na"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;linear-gradient(180deg, var(--accent), var(--accent-strong))&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;Since the variable flips with the theme, the same vials just work in both. No &lt;code&gt;dark:&lt;/code&gt; copies, no second SVG. Small thing, but it made me happy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Also, Next 16 + Tailwind v4
&lt;/h2&gt;

&lt;p&gt;If you're starting fresh: &lt;code&gt;params&lt;/code&gt; and &lt;code&gt;searchParams&lt;/code&gt; are promises now (you &lt;code&gt;await&lt;/code&gt; them), and Tailwind v4 config lives in &lt;code&gt;globals.css&lt;/code&gt;. Took me a minute coming from older versions.&lt;/p&gt;




&lt;p&gt;That's it really. It's typed, has tests, light/dark, and the hover thing.&lt;/p&gt;

&lt;p&gt;Demo: &lt;a href="https://aura-starter.vercel.app" rel="noopener noreferrer"&gt;https://aura-starter.vercel.app&lt;/a&gt;&lt;br&gt;
If it's useful to anyone, it's up here: &lt;a href="https://maegami.gumroad.com/l/aura/LAUNCH" rel="noopener noreferrer"&gt;https://maegami.gumroad.com/l/aura/LAUNCH&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is genuinely my first time selling something I made, so any feedback (design, code, whatever) would mean a lot. Thanks for reading 🙏&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>react</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
