Bỏ qua, tới nội dung chính

Kiến trúc · ADR 0012

Carve the product out of the clones (ADR-0011 pass two)

Trạng thái
proposed — team and mentor review pending
Ngày
2026-10-02
Người quyết định
Alex; team review pending

Context

ADR-0011 cloned the LearnUp site and the Fuse "Project" dashboard 1:1 as mockups, with the adaptation pass deferred. Since then main has trimmed the nav and promoted About/Blog/Contact to real top-nav links, made FAQ/Privacy/Contact real content, and added real auth pages — but the demo clone pages themselves still ship and are still linked from the LearnUp Courses ▾ dropdown and the admin shell nav. Before the carve apps/web had 91 pages; the demos are the bulk of them.

The real product components are self-contained (own shells, @smartlearn/ui, the @/lib/mock seam). The clone coupling is load-bearing only in the shells: (site)/layout.tsx → LearnUpFrame, the home page, and (fuse)/layout.tsx → FuseShell plus the admin dashboard's FuseIcon/FusePageHeader.

Decision

Tier A — remove the demo/duplicate clone pages and their components, keeping every real page and the load-bearing shells (replaced later in Tier B). No deletion of pages the team made real.

  • Removed: the Fuse admin demos ((fuse)/admin/apps/*, the analytics/crypto/finance dashboards, academy, project dashboard) and their components; the LearnUp course-list variants (full-width-course*, grid-with-sidebar*, list-with-sidebar), course-detail variants (course-detail, detail…detail-6), shop/product pages, the duplicate flat instructor-* / student-* portals, the duplicate profile-edit / settings / delete-account, the component elements demo, and pricing.
  • Kept: all real product pages (courses, course, learn, instructor, instructors, account, admin SmartLearn dashboards, docs, home); About/Blog/Contact/FAQ/Privacy (real content); real auth (login, register, forgot-password, reset-password); and become-tutor, find-instructor, error-404 (kept by decision). Pages went from 91 to 29.
  • Nav rewired, no dead links: Courses ▾ collapses to a real /courses link; the Fuse admin nav and toolbar point only at the real SmartLearn routes; /admin redirects to the SmartLearn overview; the frame map drops the removed routes; home/find-instructor card links point at real routes. EN/VI i18n keys and the role-scoped accountMenuFor are preserved.

M0 (packages/database) is already done on main, so the ADR-0020 database move is not part of this.

Alternatives considered

  • Delete every clone, including the shells. Breaks the public site and admin, which have no real shell yet. Rejected — the shells and home are Tier B, gated on design.
  • Adapt in place (rename/re-token, keep structure). Leaves the duplicate portals and demo apps as dead weight. Rejected — deletion concentrates the product.

Consequences

  • apps/web drops to 29 pages with the real product untouched; the (fuse) route-group name and the remaining clone shells survive only until Tier B replaces them with real chrome.
  • Tier B (real site-header/footer, real home, real admin shell) is a separate, design-gated task.
  • A follow-up should add a token-rule lint gate so hex/arbitrary values stop leaking into real code.