2.3 KiB
2.3 KiB
PriceForge Bible
The main architectural reference for developers and AI agents. Source of truth for the project.
What is PriceForge
PriceForge is a price and pricelist manager built on top of MariaDB.
- Runtime: MariaDB-only, fail-fast (if DB is unavailable at startup — server exits)
- Main UI:
/admin/pricing - Default port:
8084 - Go module:
git.mchus.pro/mchus/priceforge
Table of Contents
| File | Description |
|---|---|
| architecture.md | Stack, project structure, modules, routes |
| pricelist.md | Pricelist types (Estimate / Warehouse / Competitor) and creation rules |
| vendor-mapping.md | partnumber → LOT mapping, bundles, ignore logic |
| background-tasks.md | Task Manager: Submit, polling, task types |
| data-rules.md | Categories, data integrity rules |
| patterns.md | Code patterns: CSV export, streaming, virtual fields |
| api.md | All API endpoints |
| operations.md | Config, commands, build, release |
| history.md | Architectural decisions and change log |
Documentation Standards
- Language: All documentation in
bible/is written in English. - Architectural decisions: Every architectural decision MUST be recorded in history.md with date, rationale, constraints, and affected files. No exceptions.
- Before user-requested commits: If a user asks to create a commit, update relevant
bible/docs in the same change set before committing.
Hard Rules (for AI agents)
These rules MUST NOT be violated when writing code.
- Warehouse pricelist — only mapped partnumbers from
lot_partnumbers. Unmapped partnumbers are excluded entirely. - Categories — always from
lot.lot_category. Never derive from LOT name. - Background tasks — Task Manager only (
taskManager.Submit()). Never use SSE. - Vendor mapping — 1:1 key
(vendor, partnumber). Composite mappings only via bundles. - Home page — redirect to
/admin/pricing. Configurator, projects, export must not appear in the UI. - Document decisions — every architectural decision must be added to
bible/history.md.