Web AppProjects

Pick a look, order via LINE

A catalog + lookbook site for a premium linen clothing brand that turns selling through an IG feed into an easy-to-browse storefront: pick a color and size, and one tap opens LINE with the order message. No cart, no checkout, everything managed by the brand in a headless CMS. Built with Next.js 16 + Payload CMS 3.

14 min read

A catalog + lookbook site for a premium linen clothing brand — moving it from selling through an Instagram feed to a storefront that is easy to browse. Customers pick a color and size, tap "Order", and land in LINE with the order message already filled in. The brand team edits products, prices and stock status themselves in a headless CMS.

Next.js 16React 19Payload CMS 3PostgreSQLTailwind v4LINE Deep LinkWebflow RewireChat-to-Order
Empathize · Define

The problem

A linen clothing brand that grew on Instagram wanted a storefront that felt premium and was easier to browse than a feed — without committing to full e-commerce.

Checkout page of the original fashion template, with an email form, shipping address, order summary box and a Place Order button
The fashion template (Avolin) the brand liked — good-looking, but it ships with a cart, address forms and a full checkout, none of which a brand that closes sales in chat ever uses

Customers spot a look on IG, but to order they have to scroll back through the feed and ask again: which item, what sizes, what colors, how much, is it still in stock — the brand answers the same questions every day. Meanwhile a cart and card payments are heavy and unnecessary for sales that already end with "let's talk on LINE".

— The brief: move from an IG feed to a catalog site that still closes sales in chat

Selling only through the IG feed — no structured way to find products

Customers scroll the feed to find a look they saw. There are no categories and no proper product pages, and older collections sink under new posts.

The same chat questions every day

Which size, what color, what is the fabric like, how much, is it sold out — the same questions come back because the information isn't in one place, and the admin answers them all by hand.

A cart and card payments are heavy and unnecessary

Real sales already end in a LINE conversation — checkout, a payment gateway and member accounts would be unused overhead and add more places for customers to drop off.

The brand can't update products without a developer

Adding a product, changing a price or marking something "sold out" would each mean paying someone to edit code — the brand team wanted to manage content without touching code.

The ready-made template looks good but is tied to its own commerce engine

The fashion template they liked comes with a fixed cart and product system — it can't be connected directly to real data or a LINE channel.


Ideate

The solution

Give the catalog real structure, turn the "order" button into a deep link into chat, drop checkout entirely, and let the brand control everything from the back office.

Product list in the Thai-language back office: a table with image, product name, category, price, original price and status labels for in stock, pre-order and sold out, plus search and category/status filters
The project's actual back office (sample seed data) — every product has a category, price and status instead of being answered one chat at a time. The brand logo and owner's name are blurred

A structured catalog, easier to browse than a feed

Products are grouped into categories, with collection pages filtered by category, a status (in stock / pre-order / sold out) and badges — customers find the look they saw in 2–3 clicks.

Chat-to-Order: tap order → LINE opens with the message

Pick a color and size, and the site builds an order message (product name + selected options + link), then deep-links into the brand's LINE OA with it pre-filled — the customer only taps send.

No checkout — just "inquire"

Cart, payment and member accounts are all removed, leaving a single inquiry flow — light, fast, and matching how sales actually close: in chat.

Headless CMS — the brand owns its content

Payload CMS built in at /admin — add or edit products, prices, statuses, categories, images, and even the LINE channel and default message, without touching code.

Rewire the template to be data-driven

Split the fashion template into HTML/CSS/JS, then "inject" real product cards from the CMS in place of the demo ones — keeping the design and animations, discarding the original commerce engine.


Prototype

How it works — 4 steps

From opening the site to the order message landing in chat

The storefront's All Collection page, with category tabs Dresses, Tops, Outerwear, Bottoms; product cards show category, name, price in baht, available sizes and a View Details button
Step 1, Explore, on the live storefront — product cards come from the CMS and are injected into the template's design, filterable by category, with available sizes shown on the listing (sample product photos from the template)
1

Explore

Open the site, browse a collection, filter by category, and see each item's status

2

Consider

Open a product page to see photos from several angles, price, fabric and details

3

Pick color / size

Select a variant and the order message is built automatically in real time

4

Inquire via LINE

Tap order → LINE opens with a pre-filled message, ready to send


Prototype

Tech Stack & Architecture

An RSC-first storefront + headless CMS + deep links out to chat — no payment layer

Inventory dashboard home: summary cards for total products, in stock, categories and media; a bar chart of products by category; a to-do box counting items without a price, on pre-order and sold out; and a row of recent products
The Payload CMS layer as the brand sees it — the home screen shows right away what needs attention, such as sold-out or unpriced items, all read from the same PostgreSQL database as the storefront
Storefront — Home / Collection / Product (any device)
Pick color / size Check stock status Tap "Order"
↕
Next.js 16 App Router (RSC) + Storefront Rewire Engine
readClonePage() injectGrid() buildProductDetail() BuyPanel
↕
Payload CMS 3 — collections + BrandSettings + buyLink
Products Categories Media lineBuyLink()
↕
PostgreSQL (Neon) + Blob storage + LINE / Telegram deep-links
schema auto-push media uploads oaMessage://
Why this stack?

The original brief asked for a WordPress-style CMS — I chose Next.js 16 + Payload CMS 3 instead, because Payload comes with a built-in admin UI (labels can be translated to Thai), automatic REST/GraphQL, and runs on the same serverless deployment as the storefront · React Server Components read straight from the database with no API layer in between · PostgreSQL keeps the schema tidy (auto-push in dev) · and most importantly — there is no payment layer at all. The sale closes through a deep link into LINE, which keeps the whole system light and easy to maintain


Prototype

What I built — 8 core capabilities

The full loop, from the back-office catalog to the order message in chat

Product edit screen in the back office: product name, SKU, a slug generated from the name, category, in-stock status, price, original price, image corner badge and a show-on-homepage checkbox
The “CMS Catalog” capability on the real screen — status, badge, original price, featured flag, and a slug that can be left blank because it is generated from the name

Chat-to-Order Deep Link

Builds the message from a template ({product}/{url}), then creates line.me/R/oaMessage and Telegram links with safe encoding

Variant Picker → Message

Color/size picker (client component) → appends "Product name (Color: …, Size: …)" to the order message in real time

Template Rewire Engine

Reads the fashion template pages, splits out inline styles / body / scripts in order, and caches the result — parsed once, reused on every request

Balanced-Tag DOM Transforms

Functions that replace an element's inner HTML by class/tab by counting the depth of opening and closing tags — so real data lands precisely in deeply nested markup

Commerce Stripper

Removes the cart/add-to-cart nodes (data-node-type) from the template entirely and puts mount points for the LINE/Telegram buttons in their place

CMS Catalog

Products/Categories/Media — status, badge, featured, original price, multiple images, slug auto-generated from the name (beforeValidate hook)

Brand Settings Global

LINE OA / Telegram / Instagram / default order message / banner images — all editable from the back office, nothing hardcoded

Runtime Re-init

Loads the template's libraries once per session, re-fires the reveal animation on every page change, plus a safety net so no element stays hidden


Prototype

The product page + buy panel

Pick color/size → the order message is built automatically → one tap opens the chat

Linen Lookbook Lookbook New
Audrey Linen Midi Dress, a sand-colored linen dress
Dresses
Audrey Linen Midi Dress
฿1,890 ฿2,400 ● In stock
Color
Sand Sage Ivory
Size
S M L
Message to be sent to LINE
Hi, I'd like to order this item 🛍️
Audrey Linen Midi Dress (Color: Sand, Size: M)
…/products/audrey-linen-midi-dress
Order via LINE Telegram

Sample photo: Reistor / Unsplash


Prototype · UI Craft

UI design & design system

From a product designer's side — a sharp, high-contrast lime-on-dark design system, and a flow that takes customers from "that's the look" to "message to order" with as little friction as possible.

ADesign tokens — designed as a system, not page by page
The storefront's real tokens (--ln-*) — a dark fashion look with a very bright accent so products and the order button stand out most
Accent · CTA
#c8ff00
Background
#0d0d0d
Ink · Text
#f4f1ea
Surface / border
#262624
LINE
#06C755
Telegram
#229ED9
In stock
#22c55e
Sold out
#e11d48
H1 / Hero Find the right piece, order it in chat
Body Browse, pick a size and color, then order through LINE or Telegram right away
Caption DRESSES · IN STOCK · SALE
Radius pill · 50px card · rounded-xl 12px phone · 32px
Spacing gap-2 · 8 gap-3 · 12 space-y-5 · 20 image · aspect 3/4
BKey screens — 3 screens on one path (scroll sideways)
☰
Li-ne
Find the right piece, order it in chat
Browse, pick a size and color, then order through LINE or Telegram
View all products
Categories
Dresses Tops Outerwear Bottoms
Featured
Audrey Linen Dress, a sand-colored linen dressPre-order
Audrey Linen Dress
฿1,890
Sage Linen, a sage-green linen outfitSALE
Sage Linen Top
฿890 ฿1,200
Home/
☰
All products
All Dresses Tops Bottoms
Audrey Midi Dress, a sand-colored linen dressSALE
Audrey Midi Dress
฿1,890 ฿2,400
Peak Blazer, a cream linen blazer
Peak Blazer
฿2,290
Ruffle Maxi Dress, a long green ruffled dressSold out
Ruffle Maxi Dress
฿1,690
Twist Linen Top, a white linen top
Twist Linen Top
฿790
Product listing/products
←
Audrey Linen Midi Dress, a sand-colored linen dress
Dresses
Audrey Linen Midi Dress
฿1,890 ฿2,400In stock
Color
Sand Sage Ivory
Size
S M L
DETAILS MATERIALS & CARE
Message to be sent to LINE Hi, I'd like to order this item 🛍️
Audrey Linen Midi Dress (Color: Sand, Size: M)
…/products/audrey-linen-midi-dress
Order via LINE Order via Telegram
Product page + buy panel/products/[slug]

Sample product photos from Unsplash — Reistor · engin akyurt · Kawê Rodrigues · Junior REIS · Sincerely Media

CUI decisions — why it works this way
  • Mobile-first — designed at 393 first, then expanded to 768 / 1440 Fashion customers mostly browse on their phones, so the base layout is a 2-column product grid with 3/4 images and a full-width order button. Larger screens expand to 3–4 columns, rather than shrinking a desktop layout down.
  • UX writing — the order message is written in advance The "Add to cart" button is replaced by "Order via LINE", which opens a real conversation with a pre-filled message (I'd like to order… + product name + color/size + link). The customer just taps send, cutting "I want this" down to one click.
  • Component states — color/size buttons have clear default / active / sold-out states The selected option gets a lime fill and bold text (active); the others have a faint outline (default), so the difference is the fill, not just the border. A "sold out" item can still open the chat to ask about the next batch instead of being a dead end.
  • Accessibility — high-contrast lime-on-dark + touch targets ≥ 44px Cream text and the lime accent on a #0d0d0d black background exceed 4.5:1 contrast (WCAG AA). CTA buttons deliberately use black text on lime, not white, and the order button is about 44px tall, easy to hit with a thumb.

Test & Iterate

Problems and hacks

6 problems I had to solve myself while connecting a ready-made template to real data and chat channels

The original template's buy section, with a sale badge, prices in dollars, color and size options, a quantity field and an Add to Cart buttonBefore: original template
The buy section after the rewire: prices in baht from the CMS, size buttons S M L XL, and a green Order via LINE button in place of the quantity field and cartAfter: rewired
The Commerce Stripper on the live page — the quantity field and Add to Cart button are removed entirely and an Order via LINE button takes their place, while the surrounding design stays the template's

The template is tied to its commerce engine — it can't use real data

The template's markup is deeply nested with cart nodes embedded in it — replacing product cards with a plain regex matches the wrong closing tag as soon as there is a nested <div>.

Fix: I wrote my own DOM transform that balances opening and closing tags by counting depth (<div> +1, </div> −1) to find the correct inner HTML before replacing it — so it can inject real cards, strip commerce nodes and swap the hero banner precisely, even in deeply nested markup.

The template's animations don't play after hydration

The reveal animation sets elements to opacity:0 and waits for the load event — but the script is injected after React hydrates (after load has fired), so on SPA navigation whole pages stayed hidden.

Fix: load the library once per session, re-initialize the animation engine on every page mount and dispatch load/readystatechange manually — plus a safety net that reveals any element still hidden after 1 second.

Emoji / spaces / line breaks in the message → broken deep links

The order message contains an emoji 🛍️, spaces and \n — appended to the URL as is, the LINE/Telegram links break immediately.

Fix: wrap both the message and the OA id in encodeURIComponent() before building the deep link, and normalize the prefix (add @ for LINE, strip @ for Telegram) so it works however the brand types it.

The template's commerce code calls /api/cart and collides with the CMS

The template's original runtime tries to fetch /api/... (the cart), which collides with the CMS's /api endpoint → CSRF errors and a "site unsecured" alert popping up in front of customers.

Fix: intercept window.alert to drop cart/checkout/unsecured messages, and silence unhandledrejection/error noise from the commerce code (CSRF, Failed to fetch) — leaving only the flow I control.

Dynamic pages re-parse a large file on every visit

Pages are force-dynamic (live data), but each navigation had to read and regex-parse template files of a few hundred KB — wasteful and slow.

Fix: cache the parsed result per slug in an in-memory Map — the template files are static design that never changes, so they are parsed once and reused, while product data is still fetched fresh from the CMS on every request. The two are kept clearly separate.

The brief asked for WordPress and assumed e-commerce

The initial expectation was a WordPress-style CMS with a cart — but real sales end in chat, so a checkout system would be dead weight.

Fix: I proposed a new scope — Next.js + Payload (a built-in admin, so content is just as self-editable) and deliberately no checkout or payment, only chat-to-order. Lesson: cutting unnecessary requirements can give a client more value than building everything they asked for.

Define

Deliberate design decisions

What I deliberately left out matters as much as what I built

Brand and contact settings in the back office: brand name, tagline, LINE OA ID, Telegram username and Instagram URL (blurred), and the default order message box using the product and url variables
“CMS-first, nothing hardcoded” and “deep links straight to the brand” on one screen — the brand sets its own LINE OA and order message (the brand's real accounts are blurred)

The site has one job: a catalog that gets customers into a LINE conversation as quickly and smoothly as possible. It has no cart, no payment and stores no orders — the sale closes in the brand's chat. A tight scope from the start meant a direct, lightweight build the brand can genuinely maintain on its own.

  • Chat-to-order, no checkout — the sale closes in chat; the site just gets you there fast
  • Rewire, don't rebuild — keep the template's design, drop only the commerce engine
  • CMS-first, nothing hardcoded — products, channels and messages are all editable from the back office
  • Deep links straight to the brand — into the brand's own LINE OA, no middleman

Level Up · Reflect

Knowledge I built up

5 areas where this project genuinely moved my skills forward

The Li-ne Admin login page on the deployed site, with a Thai description saying to log in to manage the shop, email and password fields, and a login button
The back-office entrance on the deployed site — every label is in Thai so the brand team can run the shop without calling a developer
1. Conversational commerce — designing sales that close in chat:

Understanding the non-e-commerce pattern of closing sales in chat — building pre-filled messages, deep-linking into LINE OA / Telegram, and UX that cuts the path from "I want this" to "message the shop" to one click. Lesson: for some businesses a cart isn't the answer — the conversation is what closes the sale.

2. Payload CMS 3 (headless) — from schema to a Thai-language admin:

Designing collections/globals, using field hooks (beforeValidate to generate slugs), access control, and localizing admin labels/descriptions into Thai for the brand team — seeing how a headless CMS gives you both the data model and the back office in one. Lesson: what's good for the client = editing content without calling a developer.

3. HTML rewiring — writing my own balanced-tag parser:

Splitting head styles / body / scripts out of template pages and writing a transform that counts opening/closing tag depth to find the correct inner HTML, without a DOM library — and understanding why a plain regex breaks on nested markup. Lesson: parsing HTML correctly is about balancing, not pattern matching.

4. Next.js 16 App Router + integrating 3rd-party runtime:

Understanding RSC + force-dynamic, injecting external runtimes (jQuery/an animation engine) into the React lifecycle so they run in the right order after hydration and client-side navigation, and catching errors from code I didn't write. Lesson: bringing a legacy runtime into React means keeping tight control of the lifecycle.

5. Client scoping — turning requirements into the right stack:

Taking a "WordPress + sales system" brief and distilling what the client actually needed (a catalog + self-editing + closing sales in chat), choosing the stack and cutting unnecessary features. Lesson: my job isn't to follow every word of the request, but to deliver the result it's really asking for with the least complexity.

0
checkout steps — sales close in chat
2
chat channels for ordering (LINE / Telegram)
4
collections in the back-office CMS
1
click — from product page to chat message

Tan · Natpakan Sirirat

Product Designer & AI Builder — designing user experiences and building AI tools that actually work.

0%