Commit Graph

234 Commits

Author SHA1 Message Date
sdarbinyan
439d3d3c95 feat(design-system): add reusable FormField wrapper primitive
Standalone, OnPush. Label/hint/error slots, required marker, aria-describedby
wiring, role=alert on error. Colors via existing tenant CSS vars with fallbacks.
2026-07-15 03:39:19 +04:00
sdarbinyan
27ff3169b9 feat(design-system): add reusable Dialog primitive
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Standalone, OnPush. Backdrop click and Escape close, focus trap with
return-focus on close, role=dialog/aria-modal. Sizes sm/md/lg. Colors/
radius/shadow/spacing via existing tenant CSS vars with fallbacks.
2026-07-15 03:34:52 +04:00
sdarbinyan
5cbc9e4873 feat(design-system): add reusable Badge primitive
Standalone, OnPush. Variants neutral/primary/success/warning/danger/info.
Colors consumed via existing tenant CSS vars with fallbacks.
2026-07-15 03:33:09 +04:00
sdarbinyan
b309afbe8e feat(design-system): add reusable Card primitive
Standalone, OnPush, content-projection container. Padding none/sm/md/lg,
bordered and interactive variants. Colors/radius/shadow/spacing consumed
via existing tenant CSS vars with fallbacks.
2026-07-15 03:31:31 +04:00
sdarbinyan
2fc9051f86 feat(design-system): add reusable Input primitive
ControlValueAccessor-based, standalone, OnPush. Sizes sm/md/lg, states default/error/success.
Colors/radius/spacing/transitions consumed via existing tenant CSS vars (--border-color,
--primary-color, --error-color, --success-color, etc) with fallbacks - compatible with
bootstrap JSON theming and Project Editor live preview.
2026-07-15 03:30:05 +04:00
sdarbinyan
4e63ff97bb feat(design-system): add reusable Button primitive
Sprint 6 (pulled forward as prerequisite to Sprint 3). First Design
System component: app-button, standalone/OnPush, variants
(primary/secondary/ghost/danger), sizes (sm/md/lg), loading + disabled
states, focus-visible ring, reduced-motion-aware spinner. Colors/radius/
shadow/spacing consumed via existing tenant-driven CSS vars
(--primary-color, --bg-primary, --radius-md, --shadow-sm, --space-*) —
no new hardcoded palette, fully compatible with bootstrap JSON theming
and Project Editor live preview.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 03:22:40 +04:00
sdarbinyan
cc885c009a refactor: route catalog-container localStorage calls through LocalStorageService
Sprint 2 high-priority cleanup: layout preference read/write called raw
localStorage from a component, violating the no-raw-localStorage rule.
Now uses the shared core/storage/LocalStorageService (same as
cart/language/location services).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 03:01:25 +04:00
sdarbinyan
3cf732797c refactor: route localStorage access through shared LocalStorageService
Sprint 2 high-priority cleanup: cart/language/location services called
localStorage directly, bypassing the try/catch safety and core/<domain>
pattern used elsewhere (e.g. ProjectEditorDraftStorageService). New
core/storage/LocalStorageService centralizes get/set/remove and JSON
helpers with private-mode/quota error handling, reused across all three.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 02:58:39 +04:00
sdarbinyan
96a338ef6f chore: remove orphaned backoffice/builder dead code
Sprint 2 high-priority cleanup: backoffice-dashboard.component.ts and
builder-sandbox.component.ts were not routed anywhere, superseded by
features/backoffice and features/project-editor. Their sole facades
(BackofficeFacade, BuilderConfigFacade) had no other consumers.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 02:43:46 +04:00
sdarbinyan
2b52965f2f feat(admin-auth): add dev-only QR bypass via ?devBypassAdmin=true
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Fabricates a local admin session and activates it directly, skipping the
Telegram QR flow, for local testing without a reachable session backend.
Guarded by environment.production at runtime - no-ops in production
builds even if this code ships.
2026-07-15 00:58:21 +04:00
sdarbinyan
677dfb73e8 chore: ignore .claude/ worktrees and graphify-out/ knowledge-graph output
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
2026-07-15 00:53:42 +04:00
sdarbinyan
170243a480 feat(project-editor): finish field descriptions + enum dropdowns across all sections
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Wires up the remaining editor sections (theme, header, footer, homepage,
widgets, features, languages, navigation) with the description text and
dropdown UX started for General/Branding:

- Every enum-backed field is now a <select> with a description per option,
  not free text: theme.mode, the new site-wide layout.type (previously had
  no editor at all - added to the Theme section, and added to that
  section's reset-scope), homepage section layout.strategy, and
  catalog.navigationMode (also previously unedited, added to Features).
- Every other field (colors, header toggles, footer contact/company fields,
  widget props, feature flags, language add, nav link label/url/visible)
  gets a one-line plain-language description under its label via the new
  *Desc i18n keys (en/ru/hy) prepared earlier.
- Genuinely open text (widget layout variant strings, JSON props) stays
  free text, description-only, per the existing widgetLayoutDesc/widgetJsonDesc
  wording - not force-fit into a dropdown.

Verified: tsc --noEmit and ng build both clean.
2026-07-15 00:45:41 +04:00
sdarbinyan
ac83c4f57f feat(project-editor): add field descriptions to General and Branding sections (partial)
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Adds a short plain-language description under each field label (new
.field-desc style, section.shared.scss) so a non-developer admin
understands what each field affects, per i18n (en/ru/hy) convention.

Only General and Branding sections are wired up so far - the *Desc i18n
keys for the remaining sections (theme/header/footer/homepage/widgets/
features/languages/navigation) were prepared in translations.ts/en/ru/hy
but not yet wired into their templates. Follow-up work.
2026-07-14 16:05:09 +04:00
sdarbinyan
76831b8485 docs: consolidate scattered docs into canonical set
Replace ~35 organically-grown docs (docs/platform/*, docs/backend-platform/*,
one-off sprint reports, Search.md, Diagnostics.md, Content-Management.md,
Backend-Handoff-Sprint16.md, docs/superpowers/*, docs/Project-Editor.md,
untracked docs/total.md) with the six canonical docs declared in
.claude/CLAUDE.md: PROJECT.md, ARCHITECTURE.md, BACKEND.md, FRONTEND.md,
BOOTSTRAP.md, EDITOR.md, plus a new PROJECT-STRUCTURE.md.

- BACKEND.md is a punch list per domain (auth, bootstrap draft/publish,
  static pages, categories, products, orders, dashboard metrics, activity,
  translations, search, product engagement) plus a Known reliability issues
  section on the prod 502/504 root cause.
- ARCHITECTURE.md links to (does not duplicate) the enforced
  docs/architecture/foundation/** ADRs and standards docs.
- docs/ADMIN.md and docs/architecture/foundation/** and docs/context/** are
  left untouched per instructions.
- Updated the one dangling docs/Project-Editor.md reference in
  admin-auth.service.ts to point at docs/BACKEND.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 12:28:41 +04:00
sdarbinyan
94e59ab878 docs(nginx): clarify SPA fallback and API proxy patterns in onboarding template
Drop the misleading trailing `=404` on try_files (index.html always exists
so it never triggered) and document, inline, the two ways a tenant's
frontend can reach its API (proxied /api vs absolute apiUrl) plus a note
that a 502/504 on refresh/back-navigation for an absolute-apiUrl tenant
(e.g. dexarmarket.ru -> api.dexarmarket.ru:445) is that backend's own
reverse proxy, not this file.
2026-07-14 12:22:21 +04:00
sdarbinyan
325dc17911 feat(admin): sprint 19 admin dashboard, routing, i18n
- Add admin dashboard feature (models/gateway/facade/components/page)
- Wire admin/products routes and backoffice coming-soon placeholders
- Add lastPublishedAt to ProjectEditorFacade/state
- Add dashboard i18n keys (en/ru/hy) and docs/ADMIN.md

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 12:21:33 +04:00
sdarbinyan
6aec2ebcb2 fix(admin-auth): reuse exact same QR/session API and component for admin login
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
- Removed invented adminAuthApiUrl endpoint and separate AdminLoginComponent.
  Admin login now uses the exact same Telegram session backend
  (TelegramSessionApiService, {authApiUrl}/users/sessions) and the exact
  same TelegramLoginComponent (mode="customer" | "admin" input) as customer
  login - only the storage (cookie/localStorage/signals) stays separate.
- Extracted the shared HTTP+normalization logic from AuthService into
  TelegramSessionApiService so both AuthService and AdminAuthService call it
  instead of duplicating request/parsing code.
- Documented the resulting backend gap in docs/Project-Editor.md: since the
  session API has no concept of "admin", server-side role enforcement is
  required when admin API calls are made - the frontend only decides where
  to store the session, not whether the user is actually an admin.
2026-07-14 10:13:59 +04:00
sdarbinyan
3877b70fdf feat(sprint18): editor autosave/reset, admin auth, QR reuse, Ed25519 prep
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
- Project editor: persist draft to localStorage, restore on reload,
  last-saved/draft-restored status indicators, section/whole-draft reset
  with confirmation.
- Extract shared QR/polling/expiry engine from TelegramLoginComponent
  (shared/qr-login) and reuse it for a new admin login flow.
- Admin authentication kept fully separate from customer session:
  own cookie/localStorage keys, signals, guard, and header interceptor
  (core/admin-auth).
- ?login=true / ?adminLogin=true open the respective login dialog for
  manual testing.
- Ed25519 challenge/verify interfaces (fail-closed no-op binding) ready
  for backend delivery.
- Document autosave/reset/admin-auth/QR-reuse/Ed25519 model and the
  remaining full-field-coverage gap in docs/Project-Editor.md.
2026-07-14 09:50:03 +04:00
sdarbinyan
c6482f0037 docs: add nginx tenant onboarding template and backend handoff doc
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Adds a copy-paste server block template for onboarding a new marketplace
domain, and a Sprint 16 backend handoff doc covering the still-missing
draft/publish persistence endpoints, server-side validation expectations,
and the slug/route inconsistency in static-page data.
2026-07-13 16:44:34 +04:00
sdarbinyan
a7df1980ed fix(i18n): route dirty-guard and html-editor strings through TranslateService
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
window.confirm/window.prompt calls in projectEditorDirtyGuard and
MarketplaceHtmlEditorComponent, and the hardcoded Preview/Code toggle
label in its template, bypassed the app's translation pipeline. Add
builder.confirmLeaveUnsaved, promptLinkUrl, promptImageUrl,
htmlEditorCode and htmlEditorPreview keys (en/ru/hy), resolve them via
TranslateService.t() before passing to confirm/prompt, and use
TranslatePipe for the toggle button label.
2026-07-13 15:57:54 +04:00
sdarbinyan
68442919d3 fix(project-editor): preserve multilingual nav labels on edit
updateLabel() previously overwrote NavigationItemConfig.label with a bare
string via updateNavLink, destroying every other locale's translation
whenever a localized label object was edited. Add a facade method
updateNavLinkLabel() that inspects the existing label shape: plain
strings are replaced as before, but localized objects only have the
current default locale's key overwritten, leaving other locales intact.
2026-07-13 15:57:39 +04:00
sdarbinyan
a8b2b4bf0b docs(project-editor): document Sprint 16 tabs, draft/publish gap, and validation rules 2026-07-13 15:29:21 +04:00
sdarbinyan
26c07fb3e6 feat(project-editor): warn before leaving with unsaved changes 2026-07-13 15:21:39 +04:00
sdarbinyan
1e7add2fc8 feat(project-editor): add sticky save/publish bar with validation summary
Mounts a new ProjectEditorSaveBarComponent in the editor page that shows
draft/published status, unsaved-changes indicator, and validation issues,
wiring the Task 8 facade save()/publish()/dirty/status/validationIssues
signals to an actual UI for the first time.
2026-07-13 15:00:03 +04:00
sdarbinyan
85038df24a fix(project-editor): ProjectValidator duplicate-slug check falls back to route when slug is unset
Mock bootstrap seed data populates page.route but never page.slug, so
duplicateSlugIssues always collapsed every static page to the same
undefined key and reported a false-positive duplicate-slugs issue,
permanently blocking Publish. Fall back to route (leading slash
stripped) when slug is missing or empty.
2026-07-13 14:49:27 +04:00
sdarbinyan
223f908887 feat(project-editor): add draft/publish status, dirty tracking, save/publish to facade
Wires ProjectValidator into ProjectEditorFacade and extends ProjectEditorState
with status ('draft'|'published') and lastSavedBootstrap. Adds dirty computed
(diffed against lastSavedBootstrap), validationIssues computed, and save()/publish()
methods. publish() calls PlatformRuntimeService.reloadFromBootstrap() and refuses
when validation issues exist. loadBootstrap() seeds lastSavedBootstrap so a
freshly-loaded bootstrap is not dirty.
2026-07-13 11:01:04 +04:00
sdarbinyan
265f2fcbac feat(project-editor): add ProjectValidator with MVP validation rules
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-13 10:51:05 +04:00
sdarbinyan
646a68e9fd feat(content-management): use rich HTML editor for static page content 2026-07-13 10:44:47 +04:00
sdarbinyan
dc8c2eac91 fix(project-editor): keep html-editor surface always in DOM
The @if/@else toggle between the contentEditable surface and the code
textarea broke the static ViewChild('surface') query: Angular never
resolves a static query for an element inside a conditional block, so
surface stayed undefined and every keystroke threw in emitChange().
Render both elements always and toggle visibility with [hidden]
instead, and add an ngAfterViewInit sync as a safety net for the
initial html input on the first change-detection pass.
2026-07-13 09:31:04 +04:00
sdarbinyan
fdf11a7766 feat(project-editor): add reusable contentEditable HTML editor component 2026-07-13 09:12:59 +04:00
sdarbinyan
16a134ca42 feat(project-editor): add Navigation tab for header/flat footer nav 2026-07-13 08:57:42 +04:00
sdarbinyan
4d65386052 fix(content-management): static pages editor reads supported locales instead of hardcoding en/ru/hy 2026-07-13 08:20:06 +04:00
sdarbinyan
b166920ad7 feat(project-editor): add Languages tab with generic locale sync 2026-07-13 08:10:00 +04:00
sdarbinyan
74e5099b04 feat(project-editor): route-driven tabs under /edit/:section 2026-07-13 07:55:43 +04:00
sdarbinyan
e4a3ee25db docs: add Sprint 16 project editor implementation plan
11-task plan extending the existing /builder editor: route-driven
tabs, generic Languages/Navigation tabs, a dependency-free rich HTML
editor, client-side draft/publish + validation, and a dirty-state
guard. Notes the repo has no test runner configured, so tasks use
manual verification instead of automated specs.
2026-07-13 07:45:48 +04:00
sdarbinyan
637ae28d47 docs: add platform vision ADR and Sprint 16 project editor design spec
Records the multi-tenant marketplace platform architecture as ADR-0001
(bootstrap-driven, config-only frontend) with a source-backed fact pack,
and writes the approved Sprint 16 design for extending the existing
project editor with Languages/Navigation tabs, an HTML editor, and a
client-side draft/publish flow.
2026-07-13 04:01:48 +04:00
sdarbinyan
ee269a9e33 fixes
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
2026-07-10 15:55:38 +04:00
sdarbinyan
49d8226411 feat(admin): add product management 2026-07-10 14:14:43 +04:00
sdarbinyan
7d6c09a346 feat(cms): add static pages module 2026-07-10 13:52:01 +04:00
sdarbinyan
e2c8747fcc feat(builder): add project editor 2026-07-10 13:43:53 +04:00
sdarbinyan
7161a81068 feat(diagnostics): add health engine 2026-07-10 13:34:25 +04:00
sdarbinyan
7ecb19cb1a feat(search): add Search Intelligence module 2026-07-10 13:25:31 +04:00
sdarbinyan
494451bb96 search engien 2026-07-10 13:15:46 +04:00
sdarbinyan
aed0a47388 feat(product): add reusable Product Experience 2.0
Unify product details modules behind config-driven contracts so teams can
extend UX without changing runtime architecture or bootstrap flow.

Keep backward compatibility with existing product payloads by treating new
media/specification/variant/related structures as optional extensions.

Improve conversion and content discoverability with reusable actions,
typed media rendering, grouped specifications, dynamic variants, and
multi-collection related products.
2026-07-10 13:10:35 +04:00
sdarbinyan
86de2cc45b fix(catalog): filter UX and tablet layout
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
2026-07-09 02:57:48 +04:00
sdarbinyan
6409a91cb0 style(catalog): polish responsive UI 2026-07-09 02:43:39 +04:00
sdarbinyan
8d652c8259 feat(platform): sprint 11.5 standardization
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
2026-07-09 02:29:12 +04:00
sdarbinyan
a16c856537 feat(catalog): sprint 10.2 ux responsive empty-states polish
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
2026-07-09 01:46:32 +04:00
sdarbinyan
55216817b2 bug-fixes 2026-07-09 01:40:22 +04:00
sdarbinyan
92e1bdaff8 feat(ux): implement sprint 11 user experience module 2026-07-09 01:13:54 +04:00