A production-oriented full-stack storefront with a public RU/RO catalog, protected administration, Supabase data, Telegram lead delivery and a grounded catalog assistant.
Tehnosklad is not only a product grid. It models the complete path from catalog discovery to an operator-managed customer lead.
Discover → Search / filter → Inspect product → Contact → Store lead → Deliver to Telegram → Manage in admin
- 🇷🇺 / 🇷🇴 Russian and Romanian storefront
- 🔎 URL-driven search, filters, sorting and pagination
- 🧩 categories, subcategories and configurable attributes
- 🔗 stable localized product URLs with historical-slug redirects
- 🖼 product/category media
- 📱 responsive UI
- 🔍 canonical URLs,
hreflang, JSON-LD, sitemap, robots and Open Graph - 🤖 grounded catalog assistant
The lead flow includes:
- localized forms;
- product context;
- server-side validation;
- honeypot protection;
- rate limiting;
- idempotency;
- durable storage;
- Telegram outbox/history;
- audited retry/requeue behavior.
Protected /admin tooling covers:
- dashboard;
- categories and subcategories;
- attribute builder;
- product CRUD;
- images/media;
- customer leads;
- assistant knowledge base and request statistics;
- public site settings;
- storage / metadata reconciliation.
The assistant is designed around published catalog context, not free-form access to private application data.
A deterministic fallback can run without a paid external AI provider:
AI_PROVIDER=fallbackStore policies — delivery, payment, warranty, returns — come from a bilingual knowledge base (assistant_knowledge) that admins edit at /admin/assistant-knowledge; the assistant answers from those articles instead of inventing terms, and anonymous request telemetry is summarized at /admin/assistant-logs.
Customer lead records are not passed into assistant context.
flowchart LR
C[Customer] --> WEB[Next.js storefront]
A[Admin] --> ADM[/admin]
WEB --> DATA[Server data layer]
ADM --> DATA
DATA --> DB[(Supabase PostgreSQL)]
DATA --> ST[Supabase Storage]
WEB --> LEAD[Lead endpoint]
LEAD --> DB
LEAD --> TG[Telegram outbox]
WEB --> AI[Grounded assistant]
AI --> PUB[Published catalog]
| Area | Technology |
|---|---|
| Framework | Next.js 16.3 / App Router |
| UI | React 19 |
| Language | TypeScript 5.9 |
| Styling | Tailwind CSS 4 |
| Database | Supabase PostgreSQL |
| Authentication | Supabase SSR Auth |
| Storage | Supabase Storage |
| Tests | Vitest + Playwright |
| Deployment | Vercel |
Requires Node.js 22.x and npm 10+.
git clone https://github.com/xondell/tehnosklad.git
cd tehnosklad
npm ci
cp .env.example .env.localDemo mode:
CATALOG_DATA_SOURCE=demoRun:
npm run devThe root redirects to /ru; Romanian is available at /ro.
A Docker-compatible runtime is required.
npm run db:start
npm run db:reset:localThen configure .env.local and use:
CATALOG_DATA_SOURCE=supabaseSee docs/supabase-setup.md.
npm run typecheck
npm run lint
npm run format:check
npm test
npm run test:e2e
npm run buildDatabase tooling:
npm run db:start
npm run db:reset:local
npm run db:lint:local
npm run db:types:local
npm run test:integration:local
npm run db:stopThe project includes:
- Row Level Security;
- explicit grants;
- server-only privileged operations;
- admin role re-checks;
- atomic RPCs;
- media validation;
- lead rate limiting and idempotency;
- privacy-preserving HMAC identifiers;
- assistant rate limiting;
- retention procedures;
- durable Telegram delivery state.
tehnosklad/
├── docs/ # Architecture, security and deployment documentation
├── e2e/ # Playwright tests
├── scripts/ # Integration / build helpers
├── src/ # Next.js application
├── supabase/
│ ├── migrations/ # Versioned production schema
│ ├── verification/ # RLS assertions
│ └── seed.sql # Deterministic seed data
├── ADMIN_GUIDE.md
├── .env.example
└── package.json
Before enabling real customer leads, configure the operator's verified legal/company details through the documented LEGAL_* variables. The repository intentionally avoids inventing legal identities.
Tehnosklad — catalog UX backed by a real data, admin and lead-delivery system.