Commit graph

5 commits

Author SHA1 Message Date
semianiakavy 1a55b18744 fix: serve product images from the W4C asset share base 2026-10-05 23:01:11 +00:00
semianiakavy 0f88522cd2 feat: rebuild info pages from source content in the new design
Scrape the 9 source info pages (R10: URLs 1:1) plus an updated FAQ into
CONTENT_PAGES — the single source of truth for both the seed SQL and the
storefront server — and render them with a structured layout.

- src/db/seed.ts: CONTENT_PAGES now carries the real content in a small
  line-based markup (`##` sections, `###` sub-headings, `- ` lists, `> `
  lead/callout, inline `**bold**` and `[label](href)`).
- scripts/generate-seed-sql.ts: derive the content-page INSERT from
  CONTENT_PAGES instead of a duplicated literal; db/seed/*.sql regenerated.
- public/app.js: map the source routes (/company, /company/b2b,
  /company/politika-konfidentsialnosti, /dostavka, /dostavka/oplata,
  /dostavka/zakaz, /vozvrat, /contacts, /contacts/vakansii) and keep
  /pages/<slug> as aliases; parse + render the markup in pageView with
  breadcrumbs, an overline lead and a contact CTA.
- public/index.html, public/styles.css: footer link columns (Компания) and
  the info-page/CTA styles (section cards, lists, callouts, sticky desktop
  sidebar); menu-panel separator for the info links group.
- Cache-bust the static assets (styles v14, app v15).

Card: #66
2026-10-05 18:40:20 +00:00
semianiakavy 33ae6aec18 chore(scripts): generate + verify gallery seed artifacts; ci runs tsc/tsx directly (#64) 2026-10-05 15:34:42 +00:00
semianiakavy 2cb49e91a3 fix(db): reproducible seed artifact via fixed bcrypt salt for demo accounts 2026-10-04 20:44:35 +00:00
semianiakavy 8c6236c8f1 feat(db): schema, migrations and idempotent seed for the catalog
Implement the data layer from docs/PLAN.md §4 (card #55):

- db/migrations/0001_init.sql: idempotent DDL for the 16 entities (category,
  product, product_category, product_image, product_variant, product_feature,
  cart, cart_item, customer, address, orders, order_item, payment, promo_code,
  content_page, delivery_option) with relations and indexes; explicit index on
  orders.number (product.slug/category.slug are unique-indexed by their keys).
- Currency BYN (R4/Q1): STORE_CURRENCY = 'BYN', money as integer minor units
  (BYN * 100), no float, no interim currency, no FX conversion.
- Idempotent seed: 14 categories (11 visible + 3 hidden visible=false, R13) and
  93 products from docs/CATALOG.md §3 (broken #59 excluded, R14) with prices,
  old prices and badges; cross-listing, images, variants, PDP fields (R9),
  store constants (CATALOG §6), 1 admin + 1 customer and 2 orders.
- scripts/{migrate,seed,verify}.ts + src/db: CLI entry points and an in-process
  Postgres verification harness (satisfies `migrate` + `seed` on a clean clone).
- db/seed/0001_seed.sql: generated single-file SQL for the platform Data Tables
  (`/db-forms`, run_sql) to converge tenant_1 without a Node process.
- Placeholder dev server + storefront currency/constants and money helpers.

Verified on a clean Postgres (PGlite): product = 93; category = 14 with
visible = 11; orders = 2; money integer BYN minor units (0 float rows).
2026-10-04 19:57:52 +00:00