# 05 — Model danych i mock content Dane trzymane w `content/` jako typowane pliki TS. Typy w `types/`. Bez backendu na tym etapie. --- ## Typy (`types/`) ### Product (`types/product.ts`) ```ts type Product = { slug: string; name: string; brand: string; category: "scienne" | "multisplit" | "przenosne" | "kasetonowe" | "konsolowe"; power: number; // kW price: number; // cena urządzenia (brutto) priceWithInstall: number; // cena z montażem (8% VAT) variants?: { label: string; power: number; price: number }[]; image: string; // placeholder na razie features: string[]; // np. ["Wi-Fi", "jonizacja", "grzanie"] heating: boolean; description: string; specs: Record; // dane techniczne (klucz: wartość) }; ``` ### Project / realizacja (`types/project.ts`) ```ts type Project = { slug: string; title: string; category: "klimatyzacja" | "pompy-ciepla" | "remonty" | "hydraulika"; location: string; // np. "Wrocław" image: string; images?: string[]; // galeria description: string; scope?: string[]; // zakres prac beforeAfter?: { before: string; after: string }; // dla remontów }; ``` ### Post / wpis blogowy (`types/post.ts`) ```ts type Post = { slug: string; title: string; category: "klimatyzacja" | "pompy-ciepla" | "remonty" | "hydraulika" | "porady"; excerpt: string; date: string; // ISO author: string; image: string; content: string; // markdown lub HTML — render w [slug] featured?: boolean; }; ``` ### FAQ (`types/faq.ts`) ```ts type FaqItem = { question: string; answer: string }; ``` ### Service step / krok procesu ```ts type ProcessStep = { number: number; title: string; description: string; icon?: string }; ``` --- ## Mock content (`content/`) Wygeneruj realistyczne, ale przykładowe dane (oznacz komentarzem `// MOCK`): - **`products.ts`** — ok. 8 klimatyzatorów różnych marek i kategorii, z wariantami mocy i cenami. - **`projects.ts`** — ok. 6 realizacji w różnych kategoriach (w tym 1–2 z before/after dla remontów). - **`posts.ts`** — ok. 4 wpisy blogowe (1 oznaczony `featured`), z krótką treścią. - **`faq.ts`** — zestawy FAQ per temat: klimatyzacja (8–10 pytań), pompy ciepła, remonty, hydraulika, serwis AGD. - **`services.ts`** — definicje 6 usług na stronę główną (tytuł, opis, ikona, link). - **`process.ts`** — kroki procesów (montaż klimatyzacji, wdrożenie pompy, remont, zgłoszenie serwisu). - **`company.ts`** — dane firmy: nazwa, adres, NIP, telefon, e-mail, godziny, social, statystyki (lata, realizacje, miasta), certyfikaty. Użyj placeholderów, oznacz `// TODO: dane firmy`. - **`pricing.ts`** — pozycje cennika montażu (split, multisplit, usługi dodatkowe) jak w tabeli na stronie klimatyzacji. --- ## Zasady - Dane importowane do stron przez funkcje pomocnicze w `lib/` (np. `getProducts()`, `getProductBySlug()`). - `generateStaticParams` dla `blog/[slug]` i `sklep/[slug]` korzysta z tych danych. - Ceny i treści to placeholdery — wyraźnie oznaczone, łatwe do podmiany przez właściciela. - Nie wymyślaj prawdziwych danych firmy (adres, NIP) — zostaw oznaczone pola do uzupełnienia.