Find a file
nurdotnet d3aa13dcbf ui: sticky sidebar + scroll only inside pages; cleaner product edit form
AppLayout is now h-screen with overflow-hidden; main area is flex-col so each
page controls its own scroll region. The sidebar and page header stay put no
matter how long the content.

New ListPageShell wraps every list page: sticky title/actions bar at top,
scrollable body (with sticky table thead via DataTable update), optional
sticky pagination footer. Converted 10 list pages (products, countries,
currencies, price-types, units, vat-rates, stores, retail-points, product-
groups, counterparties).

ProductEditPage rebuilt around the same pattern:
- Sticky top bar with back arrow, title, and Save/Delete buttons — no more
  hunting for the save button after scrolling a long form.
- Body is a max-w-5xl centered column with evenly spaced section cards.
- Sections get header strips (title + optional action on the right).
- Grid is a consistent 3-col (or 4 for stock/покупка) on md+, single column
  on mobile. Field sizes line up across sections.
- Flags collapse into a single wrap row under classification.
- Prices/Barcodes tables use a 12-col grid so columns align horizontally.

DataTable: thead is now position:sticky top-0, backdrop-blurred; rows use
border-bottom on cells for consistent separator in the scrolled body.

PageHeader gained a `variant="bar"` mode for shell usage.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 00:28:27 +05:00
deploy Phase 0: project scaffolding and end-to-end auth 2026-04-21 13:59:13 +05:00
docs Phase 0: project scaffolding and end-to-end auth 2026-04-21 13:59:13 +05:00
src ui: sticky sidebar + scroll only inside pages; cleaner product edit form 2026-04-22 00:28:27 +05:00
.editorconfig Phase 0: project scaffolding and end-to-end auth 2026-04-21 13:59:13 +05:00
.gitattributes Phase 0: project scaffolding and end-to-end auth 2026-04-21 13:59:13 +05:00
.gitignore fix(auth): return 401 instead of 302 for API challenges; persist dev signing key across restarts 2026-04-21 21:42:53 +05:00
.nvmrc Phase 0: project scaffolding and end-to-end auth 2026-04-21 13:59:13 +05:00
CLAUDE.md Phase 0: project scaffolding and end-to-end auth 2026-04-21 13:59:13 +05:00
Directory.Build.props Phase 0: project scaffolding and end-to-end auth 2026-04-21 13:59:13 +05:00
Directory.Packages.props Phase 0: project scaffolding and end-to-end auth 2026-04-21 13:59:13 +05:00
food-market.sln Phase 0: project scaffolding and end-to-end auth 2026-04-21 13:59:13 +05:00
global.json Phase 0: project scaffolding and end-to-end auth 2026-04-21 13:59:13 +05:00
README.md Phase 0: project scaffolding and end-to-end auth 2026-04-21 13:59:13 +05:00

food-market

Аналог системы МойСклад для розничной торговли в Казахстане.

Состав системы

  • Сервер (ASP.NET Core 8 + PostgreSQL) — мультитенантный API, web-админка на React
  • Web-админка (React 18 + Vite + shadcn/ui) — управление магазином, справочниками, документами, отчётами
  • Кассовая программа (WPF на .NET 8) — офлайн-работоспособная касса для Windows 10+, синхронизируется с сервером, работает с весами (Масса-К в первую очередь)

Структура репозитория

food-market/
├── src/
│   ├── food-market.domain/          # доменные сущности, enum'ы, события
│   ├── food-market.application/     # use cases (MediatR), DTO, интерфейсы
│   ├── food-market.infrastructure/  # EF Core, PostgreSQL, внешние сервисы
│   ├── food-market.api/             # ASP.NET Core + OpenIddict + SignalR
│   ├── food-market.web/             # React + Vite + shadcn/ui (SPA)
│   ├── food-market.shared/          # DTO-контракты сервер ↔ POS
│   ├── food-market.pos.core/        # логика POS (независима от UI)
│   └── food-market.pos/             # WPF + .NET 8 кассовая программа
├── tests/
├── deploy/
│   ├── docker-compose.yml           # PostgreSQL для локальной разработки
│   └── Dockerfile.api
└── docs/

Именование

  • Папки, проекты, csproj, docker-образы, URL — lowercase: food-market, food-market.api
  • C# namespacefoodmarket.Api, foodmarket.Domain (lowercase root; C# не допускает дефис в идентификаторах)
  • Отображаемое имя в UI — "Food Market"

Стек

Сервер

  • .NET 8 LTS (до ноября 2026), ASP.NET Core Minimal APIs + Controllers
  • EF Core 8 + Npgsql + PostgreSQL 16
  • OpenIddict 5 (OAuth2/OIDC — password + refresh tokens)
  • MediatR + FluentValidation (CQRS-lite)
  • SignalR (real-time синхронизация)
  • Hangfire (фоновые задачи)
  • Serilog (структурированное логирование)

Web

  • React 18 + Vite + TypeScript
  • shadcn/ui + Tailwind CSS
  • TanStack Query + TanStack Table
  • AG Grid Community (для тяжёлых grid'ов)
  • Recharts / Tremor (графики)
  • react-hook-form + Zod

POS

  • .NET 8 WPF, Windows 10+
  • CommunityToolkit.Mvvm (source-generated MVVM)
  • SQLite (локальная БД)
  • Refit + Polly (API-клиент с retry)
  • System.IO.Ports (драйверы весов: Масса-К и др.)

Мультитенантность

Каждая сущность имеет OrganizationId. Пользователь scoped к организации. EF Core query filter автоматически изолирует данные между тенантами.

Локальная разработка

# Поднять PostgreSQL
cd deploy && docker compose up -d

# Мигрировать БД
cd src/food-market.api && dotnet ef database update

# Запустить API
dotnet run --project src/food-market.api

# Запустить Web
cd src/food-market.web && pnpm install && pnpm dev

Статус

🚧 Phase 0: фундамент (scaffolding, auth, multi-tenancy)