<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Kelin Textile Notes]]></title><description><![CDATA[Kelin Textile Notes]]></description><link>https://kelintextile.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Dec 2026 00:11:18 GMT</lastBuildDate><atom:link href="https://kelintextile.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Modelling hotel linen specs as data: a field guide for developers]]></title><description><![CDATA[What thread count, yarn count, blends, GSM, sizes and hotel grades mean, and how to model them as typed data, with real catalogue examples.]]></description><link>https://kelintextile.hashnode.dev/modelling-hotel-linen-specs-as-data-a-field-guide-for-developers</link><guid isPermaLink="true">https://kelintextile.hashnode.dev/modelling-hotel-linen-specs-as-data-a-field-guide-for-developers</guid><category><![CDATA[data-modeling]]></category><category><![CDATA[TypeScript]]></category><category><![CDATA[json]]></category><category><![CDATA[ecommerce]]></category><dc:creator><![CDATA[Kelin Textile]]></dc:creator><pubDate>Thu, 26 Nov 2026 15:32:03 GMT</pubDate><content:encoded><![CDATA[<p>If you build a catalogue, procurement or PIM tool for hospitality, sooner or later a hotel linen spec sheet lands on your desk: columns such as Fabric, TC, Yarn Count, Fill Weight and Hotel Grade, where every short string hides a unit, a range or a list of options.</p>
<p>This guide goes through those fields one at a time: what they mean in textile terms, and how to represent them as typed data. The examples are real rows from our own catalogue at Kelin, a hotel textile manufacturer; the full tables are published as CSV and JSON on the <a href="https://kelintextile.design/data/">catalogue data page</a>. How those files are generated and versioned is a separate topic, so here we stay with the fields themselves.</p>
<h2>Split compound cells first</h2>
<p>A typical cell reads <code>300TC 100% Cotton</code> (model KL-BS01). That is two facts: a thread count and a fibre composition. Pillow rows write the same pair the other way round, <code>100% Cotton 233TC</code>, and a mattress protector row packs three facts into <code>80% Cotton/20% Poly Terry</code>: two fibres with percentages and a construction (terry).</p>
<p>The rule that saves the most trouble: one fact per field, with the original string kept as a <code>label</code> next to the parsed value, for display and for comparison when a new catalogue edition arrives.</p>
<h2>Fibre composition and blends</h2>
<p>Model composition as a list of <code>{ fibre, percent }</code> pairs. Real values:</p>
<ul>
<li><code>80% Cotton/20% Poly Terry</code> (KL-MP04)</li>
<li><code>45% Bamboo/55% Poly Jacquard</code> (KL-MP06)</li>
<li><code>200TC 100% Eucalyptus Bamboo</code> (KL-BS012), <code>300TC 100% Tencel</code> (KL-BS013)</li>
</ul>
<p>Blends also travel under trade names: CVC (chief value cotton, where cotton is the larger share), T/C (polyester/cotton) and polycotton. Kelin's custom bedding options, for example, are listed as <code>100% Cotton</code> or <code>CVC Blend</code> with no split given. So <code>percent</code> must be nullable, and a "sums to 100" check should run only when every percentage is known.</p>
<p>Tencel is a brand of lyocell, and Kelin's home range lists both <code>Tencel</code> and <code>Lyocell</code> products: normalise to a generic fibre for filtering and keep the brand in the label.</p>
<h2>Thread count: an integer, often a list</h2>
<p>Thread count is the number of threads woven into one square inch of fabric, counting both directions. Store it as an integer, not as <code>"400TC"</code>.</p>
<p>In practice it arrives in three shapes:</p>
<ul>
<li>a single value: <code>400TC</code> on KL-BS09;</li>
<li>a list of offered options: <code>250TC, 300TC, 400TC, 500TC</code> on an embroidered sateen set;</li>
<li>a custom range: Kelin quotes custom thread counts from 200TC to 1000TC.</li>
</ul>
<p>Give these three different shapes: <code>value</code>, <code>options: number[]</code> or <code>{ min, max }</code>. Multi-ply yarn may be counted per ply, so an optional <code>ply</code> field is worth adding.</p>
<h2>Yarn count has two axes</h2>
<p>Yarn count describes how fine each yarn is, and a higher number means a finer yarn. Cotton counts are written with an S and given warp × weft: <code>60S×40S</code> means 60s yarn in the warp and 40s in the weft. Store <code>{ warp: 60, weft: 40 }</code>.</p>
<p>Watch the variants. Option lists such as <code>40S, 60S, 80S</code> give no axes, and towels list a single count, <code>16s</code>, in lower case. Normalise case on parse, and leave warp and weft unset when the source gives only one number.</p>
<p>Grade names belong in a lookup table, not in the type. Kelin maps six yarn counts to grade names, from <code>40S×40S</code> (Standard) through <code>60S×40S</code> (Mid-High Grade) to <code>120S×120S</code> (Ultra Premium). Keep that table per supplier, keyed by the warp/weft pair.</p>
<h2>Weave, pattern and decoration are separate fields</h2>
<p>Percale is a plain one-over-one weave with a matte, crisp surface. Sateen floats more yarn on the face, which gives a smoother, more lustrous surface. Kelin weaves its hotel fabrics in plain, twill, satin (sateen), jacquard and satin-stripe weaves.</p>
<p>Listing data often puts several concepts into one "technique" column. Real values include <code>Plain</code>, <code>Embroidery</code>, <code>Printing</code>, <code>Reactive printing</code> and <code>3 cm stripe</code>. Split them:</p>
<ul>
<li><code>weave</code>: closed enum (plain, twill, sateen, jacquard, satin stripe);</li>
<li><code>pattern</code>: e.g. <code>{ kind: "stripe", widthCm: 3 }</code> for KL-BS010;</li>
<li><code>decoration</code>: e.g. <code>["embroidery"]</code>, with detail such as <code>3-line embroidery</code> (KL-BS02);</li>
<li><code>finish</code>: Oxford with a <code>5 cm flange</code>, or over locking. Store the flange width as a number in centimetres.</li>
</ul>
<h2>Weight: gsm, grams and ranges</h2>
<p>Weight fields use two units that look alike:</p>
<ul>
<li>gsm (grams per square metre): towels at <code>360–1100 gsm</code> (listing #42), duvet fill at <code>200–280 gsm</code> for down and <code>200–600 gsm</code> for microfiber. Because gsm is per square metre, one figure covers every duvet size.</li>
<li>grams per piece: pillows at <code>1000–1800 g</code>.</li>
</ul>
<p>Make <code>unit</code> a closed enum (<code>"gsm" | "g"</code>), store ranges as <code>{ min, max }</code> with a <code>min &lt;= max</code> check, and treat a single value as <code>min === max</code>. Some cells hold no number at all: pillow FP-ADJ-01 has weight <code>Adjustable</code>. A discriminated union handles that cleanly.</p>
<p>The duvet shell shows the same need. Cotton shells are specified by thread count (<code>233TC</code>), while polyester shells are specified by weight (<code>90 gsm</code>). One <code>shell</code> field, two kinds.</p>
<h2>Sizes: names are labels, centimetres are data</h2>
<p>A size name means different dimensions on different products:</p>
<ul>
<li>Queen duvet: <code>220×240</code> or <code>240×260</code> cm</li>
<li>Queen mattress protector: <code>180×200</code> cm</li>
<li>Bed runner for a 1.5 m (Double/Queen) bed: <code>50×210</code> cm</li>
</ul>
<p>Key sizes by product type, store width and length as integers in centimetres, and allow several options per name. Each of Kelin's standard duvet sizes has two width × length options. Fit limits get their own field: "fits up to 50 cm" becomes <code>maxMattressDepthCm: 50</code>.</p>
<h2>Hotel grade: a range plus a qualifier</h2>
<p>Real values: <code>3–4-star</code>, <code>6-star</code>, <code>5–6-star Luxury</code>, <code>3–4-star Business</code>, <code>5-star Suite</code>, <code>Budget – 3-star</code>, and in Application columns <code>4–5-star/Resort</code> or <code>Eco Hotels</code>. The column header changes too: Hotel Grade, Grade, Application.</p>
<p>Model it as <code>{ minStar, maxStar, segment }</code> with <code>minStar</code> nullable for budget entries. Parse with care: the source uses an en dash between numbers and a hyphen inside "star", so a naive split on <code>-</code> breaks <code>3–4-star</code>.</p>
<p>Record who assigned the grade, and keep it as a stored fact. Kelin grades by weave and finish as well as thread count: at 400TC, the jacquard KL-BS011 is graded 5-star and the plain white KL-BS09 4–5-star.</p>
<h2>Model codes are identifiers</h2>
<p>Model codes often look like specs: <code>MF-300TC-01</code> or <code>MF-POLY-80GSM</code> read like a thread count and a weight. Parse nothing from them. A code is assigned once and stays stable for ordering and repeat orders, while the spec behind it can be refined between catalogue editions, so the spec fields are the place to read values from.</p>
<p>Treat the code as an opaque key and keep every value in its own field with its own source.</p>
<h2>Provenance per field</h2>
<p>Sources differ field by field. In our data most values come from a page of the 2026 product catalogue, and a few were confirmed later in a separate product data sheet. Putting the source on the field, not only on the row, lets a UI show where each number came from and lets you re-check one field when a new edition arrives.</p>
<p>Here is the shape we would use, filled with the real values for MF-300TC-01:</p>
<pre><code class="language-ts">type Source = { doc: string; page?: number; date?: string };
type Sourced&lt;T&gt; = {
  value: T;
  label?: string;
  source: Source;
};
type Range = { min: number; max: number; unit: "gsm" | "g" };
type Shell = { kind: "tc"; tc: number } | { kind: "gsm"; gsm: number };

interface DuvetSpec {
  code: string;
  composition: { fibre: string; percent: number | null }[];
  shell: Sourced&lt;Shell&gt;;
  fill: string;
  fillWeight: Sourced&lt;Range&gt;;
  sizes: { label: string; optionsCm: [number, number][] }[];
  grade: { minStar: number | null; maxStar: number; segment?: string; gradedBy: string };
}
</code></pre>
<pre><code class="language-json">{
  "code": "MF-300TC-01",
  "composition": [{ "fibre": "cotton", "percent": 100 }],
  "shell": {
    "value": { "kind": "tc", "tc": 233 },
    "label": "233TC",
    "source": { "doc": "Kelin product data sheet", "date": "2026-11-01" }
  },
  "fill": "microfiber",
  "fillWeight": {
    "value": { "min": 200, "max": 600, "unit": "gsm" },
    "label": "200–600 gsm",
    "source": { "doc": "Kelin 2026 product catalogue", "page": 16 }
  },
  "sizes": [{ "label": "Queen", "optionsCm": [[220, 240], [240, 260]] }],
  "grade": { "minStar": 4, "maxStar": 5, "gradedBy": "Kelin" }
}
</code></pre>
<h2>Checklist</h2>
<ul>
<li>One fact per field, original string kept as a label.</li>
<li>Composition as fibre/percent pairs, percent nullable.</li>
<li>Thread count as an integer; value, options and range as distinct shapes.</li>
<li>Yarn count as warp and weft; grade names in a per-supplier table.</li>
<li>Weave, pattern, decoration and finish as separate fields.</li>
<li>Weight with a closed unit enum: gsm and grams per piece differ.</li>
<li>Sizes per product type, in integer centimetres.</li>
<li>Hotel grade as a star range plus segment and grader.</li>
<li>Model codes are keys; specs live in fields.</li>
<li>A source on every field.</li>
</ul>
<hr />
<p><em>Written by Kelin (Nantong Kelin Textile Co., Ltd.), a hotel textile manufacturer in Nantong, Jiangsu, China. More at <a href="https://kelintextile.design/">kelintextile.design</a>.</em></p>
]]></content:encoded></item></channel></rss>