Starter experience so the system is usable immediately after git clone → migrate → run. DemoCatalogSeeder (Development only, runs once — skips if tenant has any products): - 8 product groups: Напитки (Безалкогольные, Алкогольные), Молочка, Хлеб, Кондитерские, Бакалея, Снеки — hierarchical Path computed - 2 demo suppliers: ТОО «Продтрейд» (legal entity, KZ BIN, bank details), ИП Иванов (individual) - 35 realistic KZ-market products with: - Demo barcodes in 2xxx internal range (won't collide with real products) - Retail price + purchase price at 72% of retail - Country of origin (KZ / RU) - Хлеб marked as 0% VAT (socially important goods in KZ) - Сыр «Российский» marked as весовой - Articles in kebab-case: DR-SOD-001, DAI-MLK-002, SW-CHO-001 etc. Product form (full page /catalog/products/new and /:id, not modal): - 5 sections: Основное / Классификация / Остатки и закупка / Цены / Штрихкоды - Dropdowns for unit, VAT, group, country, supplier, currency via useLookups hooks - Defaults pre-filled for new product (default VAT, base unit, KZT) - Prices table: add/remove rows, pick price type + amount + currency - Barcodes table: EAN-13/8/CODE128/UPC options, "primary" enforces single - Server-side atomic save (existing Prices+Barcodes replaced on PUT) Products page: row click → edit page, Add button → new page. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .gitignore | ||
| eslint.config.js | ||
| index.html | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])