Files
PriceForge/bible-local
Mikhail Chusavitin f48615e8a9 Modularize Go files, extract JS to static, implement competitor pricelists
Go refactoring:
- Split handlers/pricing.go (2446→291 lines) into 5 focused files
- Split services/stock_import.go (1334→~400 lines) into stock_mappings.go + stock_parse.go
- Split services/sync/service.go (1290→~250 lines) into 3 files

JS extraction:
- Move all inline <script> blocks to web/static/js/ (6 files)
- Templates reduced: admin_pricing 2873→521, lot 1531→304, vendor_mappings 1063→169, etc.

Competitor pricelists (migrations 033-039):
- qt_competitors + partnumber_log_competitors tables
- Excel import with column mapping, dedup, bulk insert
- p/n→lot resolution via weighted_median, discount applied
- Unmapped p/ns written to qt_vendor_partnumber_seen
- Quote counts (unique/total) shown on /admin/competitors
- price_method="weighted_median", price_period_days=0 stored explicitly

Fix price_method/price_period_days for warehouse items:
- warehouse: weighted_avg, period=0
- competitor: weighted_median, period=0
- Removes misleading DB defaults (was: median/90)

Update bible: architecture.md, pricelist.md, history.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 07:44:10 +03:00
..
2026-03-07 21:10:20 +03:00

UI Design Code

Submodule-first design-code kit for Go web applications and AI coding agents.

This repository is meant to be added to host projects as a git submodule and used to copy/sync canonical documentation, AI instruction templates, scaffolds, and UI pattern building blocks.

Intended Usage

  1. Add as submodule (recommended path: tools/ui-design-code)
  2. Use tools/designsync to list/plan/apply bundles into the host repo
  3. Review changes and commit in the host repo

Public Surface (stable)

  • kit/
  • exports/
  • tools/designsync/
  • README.md
  • VERSIONING.md
  • CHANGELOG.md

demo/ is a runnable reference app and may change faster.

Quick Start (this repo)

go test ./...
go build ./tools/designsync

cd demo
go test ./...
go run ./cmd/demo-server

Documentation

  • Architecture source of truth: bible/README.md
  • AI instructions: CLAUDE.md, AGENTS.md