fix: mobile UX improvements - scroll restoration, OTP autofill, swipe direction, back button
Some checks failed
Deploy Canina / deploy (push) Successful in 2m27s
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 0s

- ClientLayout: implement proper manual scroll restoration using module-level
  _wasPopNavigation flag and sessionStorage. Fixes scroll jumping to top/bottom
  on Back navigation. Scroll position saved on scroll (debounced) and cleanup,
  restored via double-rAF on popstate navigation.

- AuthModal/LoginModal: fix Android back button to push only ONE history sentinel
  on modal open (not on every subView/step change). Prevents stacking of extra
  history entries. Back in sub-views re-pushes sentinel for next back press.

- AuthModal/LoginModal: remove navigator.credentials.get (WebOTP API) which was
  showing an intrusive permission modal. The native autoComplete=one-time-code
  on the first OTP input provides the suggestion bar above the keyboard instead.

- AuthModal/LoginModal: add isVerifyingRef guard to prevent double toast on
  successful login. Both onComplete callback and form submit were calling
  triggerVerifyOtp/handleVerifyOtpWithCode simultaneously.

- AuthModal: remove triggerVerifyOtp from handleOtpChange to eliminate the second
  duplicate call (only onComplete now triggers verification).

- OtpInput5: remove maxLength=1 restriction from first input so browser can
  inject the full 5-digit OTP code. Multi-char input is already handled by
  handleDigitChange which distributes digits across all boxes.

- ProductPage: fix swipe gesture direction in media gallery. Swipe right -> next
  item, swipe left -> previous item (matches RTL intuition for Persian users).
This commit is contained in:
parsa aghaei 2026-09-05 18:19:11 +03:30
parent 1d2d141514
commit 86e8101d8c
16 changed files with 10175 additions and 9886 deletions

View File

@ -21,6 +21,12 @@ import { useUIStore } from "../lib/store/uiStore";
import MaintenancePage from "../components/MaintenancePage";
import { NavigationTarget } from "../lib/types";
// Module-level flag: survives across effect re-runs because it lives outside the component.
// When the user presses Back/Forward, popstate fires BEFORE pathname changes.
// The flag is read (and reset) in the pathname effect which runs AFTER.
let _wasPopNavigation = false;
export default function ClientLayout({ children }: { children: React.ReactNode }) {
const isCartOpen = useUIStore((state) => state.isCartOpen);
const isLoginModalOpen = useUIStore((state) => state.isLoginModalOpen);
@ -52,36 +58,68 @@ export default function ClientLayout({ children }: { children: React.ReactNode }
useUserStore.getState().logout();
}
// Preserve scroll restoration on back/forward
// Let the browser handle scroll restoration on Back/Forward navigation.
// We separately implement push-navigation scroll-to-top below.
if (typeof window !== 'undefined' && 'scrollRestoration' in window.history) {
window.history.scrollRestoration = 'auto';
window.history.scrollRestoration = 'manual';
}
// Permanent listener: set the flag whenever any popstate fires.
// This includes modal sentinel pops - those don't change pathname so they
// are harmless (the pathname effect won't run, flag stays set until the
// next real back navigation that DOES change pathname).
const handlePopState = () => { _wasPopNavigation = true; };
window.addEventListener('popstate', handlePopState);
return () => window.removeEventListener('popstate', handlePopState);
}, [fetchProfile, fetchSettings]);
// Track navigation type (push vs pop) to allow smooth scroll restoration on Back/Forward
// Scroll-to-top only on PUSH navigation, not on Back/Forward.
// _wasPopNavigation is set by the permanent popstate listener above
// BEFORE this effect runs for the new pathname.
useEffect(() => {
if (typeof window === 'undefined') return;
let popstateTriggered = false;
const handlePopState = () => {
popstateTriggered = true;
};
window.addEventListener('popstate', handlePopState);
// Give microtask/frame for popstate event to register before checking
const timeoutId = setTimeout(() => {
if (!popstateTriggered) {
window.scrollTo({ top: 0, left: 0, behavior: 'instant' });
if (_wasPopNavigation) {
// Back/Forward: restore the previously saved scroll position.
_wasPopNavigation = false;
const savedY = sessionStorage.getItem(`__scroll_${pathname}`);
if (savedY) {
const y = parseInt(savedY, 10);
// Double rAF: first waits for React commit, second waits for paint
requestAnimationFrame(() =>
requestAnimationFrame(() =>
window.scrollTo({ top: y, behavior: 'instant' })
)
);
}
}, 0);
return;
}
// Push navigation (link click, router.push): scroll to top immediately.
window.scrollTo({ top: 0, left: 0, behavior: 'instant' });
}, [pathname]);
// Save current scroll position to sessionStorage (debounced + on cleanup)
// so it can be restored on Back navigation.
useEffect(() => {
if (typeof window === 'undefined') return;
const key = `__scroll_${pathname}`;
let debounceTimer: ReturnType<typeof setTimeout>;
const handleScroll = () => {
clearTimeout(debounceTimer);
debounceTimer = setTimeout(() => {
sessionStorage.setItem(key, String(window.scrollY));
}, 100);
};
window.addEventListener('scroll', handleScroll, { passive: true });
return () => {
window.removeEventListener('popstate', handlePopState);
clearTimeout(timeoutId);
clearTimeout(debounceTimer);
// Save immediately on exit (before pathname changes)
sessionStorage.setItem(key, String(window.scrollY));
window.removeEventListener('scroll', handleScroll);
};
}, [pathname]);
// Check Maintenance Mode (Admin / Partner bypass)
const isMaintenanceMode = getText('MAINTENANCE_MODE', 'false') === 'true' || getText('maintenance_mode', 'false') === 'true';
const isAdmin = role === 'User_Partner' || (typeof window !== 'undefined' && Boolean(localStorage.getItem('adminToken')));

View File

@ -77,6 +77,8 @@ export default function AuthModal({ isOpen, onClose }: AuthModalProps) {
const phoneNumberRef = useRef(phoneNumber);
const subViewRef = useRef(subView);
const isOpenRef = useRef(isOpen);
// Guard against double-verify (onComplete fires, then form submit also fires)
const isVerifyingRef = useRef(false);
const isB2BEnabled = useSettingsStore((s) => s.getBoolean('b2bRegistrationOpen', true) && s.getBoolean('b2b_enabled', true));
useEffect(() => {
@ -92,17 +94,17 @@ export default function AuthModal({ isOpen, onClose }: AuthModalProps) {
}, [isOpen]);
// Handle hardware / browser back button for Android & mobile navigation
// IMPORTANT: only depend on isOpen here — NOT subView. If we depend on subView,
// every subView change pushes a new history entry and back button never closes the modal.
useEffect(() => {
if (!isOpen) return;
// Push a state for this modal level
const currentState = window.history.state || {};
window.history.pushState({ ...currentState, __authModalOpen: true, __subView: subView }, "");
// Push ONE history entry when the modal opens so back button hits this entry first
window.history.pushState({ __authModalOpen: true }, "");
const handlePopState = (e: PopStateEvent) => {
// If user hit Android back button
const handlePopState = () => {
if (subViewRef.current !== "main") {
// Go back inside modal
// Navigate back within the modal
if (subViewRef.current === "forgot-otp") {
setSubView("forgot-phone");
} else if (subViewRef.current === "reset-password") {
@ -110,8 +112,10 @@ export default function AuthModal({ isOpen, onClose }: AuthModalProps) {
} else {
setSubView("main");
}
// Push another sentinel so the next back also hits this handler
window.history.pushState({ __authModalOpen: true }, "");
} else {
// In main view: close modal without navigating the page behind
// Already at main view — close the modal
onClose();
}
};
@ -120,7 +124,8 @@ export default function AuthModal({ isOpen, onClose }: AuthModalProps) {
return () => {
window.removeEventListener("popstate", handlePopState);
};
}, [isOpen, subView, onClose]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isOpen]);
// Reset modal state on open/close
useEffect(() => {
@ -160,6 +165,9 @@ export default function AuthModal({ isOpen, onClose }: AuthModalProps) {
const cleanCode = extractOtpFromText(codeToVerify);
const cleanPhone = toEnglishDigits(phoneNumberRef.current).replace(/[^0-9]/g, "");
if (cleanCode.length !== 5 || !cleanPhone) return;
// Prevent double-call from onComplete + form submit firing simultaneously
if (isVerifyingRef.current) return;
isVerifyingRef.current = true;
setIsLoading(true);
try {
@ -172,6 +180,7 @@ export default function AuthModal({ isOpen, onClose }: AuthModalProps) {
} catch (err: unknown) {
const errObj = err as { message?: string };
toast.error(errObj.message || "کد تایید نامعتبر است");
isVerifyingRef.current = false;
} finally {
setIsLoading(false);
}
@ -179,48 +188,20 @@ export default function AuthModal({ isOpen, onClose }: AuthModalProps) {
[fetchProfile, onClose],
);
// WebOTP API SMS Auto-read
useEffect(() => {
if (subView !== "otp-verify" && subView !== "forgot-otp") return;
let isMounted = true;
const ac = new AbortController();
if (typeof window !== "undefined" && "OTPCredential" in window) {
(navigator as unknown as { credentials: { get: (opts: unknown) => Promise<{ code?: string }> } }).credentials
?.get({
otp: { transport: ["sms"] },
signal: ac.signal,
})
.then((otp) => {
if (!isMounted) return;
if (otp && typeof otp.code === "string") {
const clean = extractOtpFromText(otp.code);
if (clean) {
setOtpCode(clean);
if (clean.length === 5 && subView === "otp-verify") {
triggerVerifyOtp(clean);
}
}
}
})
.catch(() => {});
}
return () => {
isMounted = false;
ac.abort();
};
}, [subView, triggerVerifyOtp]);
// NOTE: We intentionally do NOT use navigator.credentials.get (WebOTP API) here
// because it shows an intrusive browser permission modal that is poor UX.
// autoComplete="one-time-code" on the first OTP input provides the native
// suggestion bar above the keyboard on Android without any permission dialog.
const handleOtpChange = (val: string) => {
const clean = extractOtpFromText(val);
setOtpCode(clean);
if (clean.length === 5 && subView === "otp-verify") {
triggerVerifyOtp(clean);
}
// Auto-verify is handled by OtpInput5's onComplete callback only
// to prevent double-submission
};
const handleSendOtp = async (e?: React.FormEvent) => {
if (e) e.preventDefault();
const cleanPhone = toEnglishDigits(phoneNumber).trim();
@ -915,6 +896,7 @@ export default function AuthModal({ isOpen, onClose }: AuthModalProps) {
disabled={isLoading}
autoFocus={true}
/>
</div>
<button

View File

@ -28,20 +28,24 @@ export default function LoginModal({ isOpen, onClose, onLogin, petName, isAdviso
const { fetchProfile } = useUserStore();
const stepRef = useRef(step);
const isVerifyingRef = useRef(false);
useEffect(() => {
stepRef.current = step;
}, [step]);
// Handle hardware / Android back button
// IMPORTANT: only depend on isOpen — NOT step, to avoid stacking extra history entries
useEffect(() => {
if (!isOpen) return;
const currentState = window.history.state || {};
window.history.pushState({ ...currentState, __loginModalOpen: true, __loginStep: step }, "");
window.history.pushState({ __loginModalOpen: true }, "");
const handlePopState = () => {
if (stepRef.current === "otp") {
setStep("phone");
// Push sentinel again so next back also hits this handler
window.history.pushState({ __loginModalOpen: true }, "");
} else {
onClose();
}
@ -51,7 +55,9 @@ export default function LoginModal({ isOpen, onClose, onLogin, petName, isAdviso
return () => {
window.removeEventListener("popstate", handlePopState);
};
}, [isOpen, step, onClose]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isOpen]);
const handleVerifyOtpWithCode = React.useCallback(async (code: string) => {
const cleanCode = code.trim();
@ -59,6 +65,9 @@ export default function LoginModal({ isOpen, onClose, onLogin, petName, isAdviso
toast.error("کد تایید باید ۵ رقم باشد");
return;
}
// Guard against double-fire from onComplete + WebOTP
if (isVerifyingRef.current) return;
isVerifyingRef.current = true;
setIsLoading(true);
try {
@ -72,36 +81,16 @@ export default function LoginModal({ isOpen, onClose, onLogin, petName, isAdviso
} catch (err: unknown) {
const errObj = err as { message?: string };
toast.error(errObj.message || "کد تایید اشتباه است");
isVerifyingRef.current = false;
} finally {
setIsLoading(false);
}
}, [phoneNumber, fetchProfile, onLogin, onClose]);
// WebOTP API & Auto-Submit
useEffect(() => {
if (step === "otp" && typeof window !== "undefined" && "OTPCredential" in window) {
const ac = new AbortController();
const creds = (navigator as unknown as { credentials?: { get?: (opt: unknown) => Promise<{ code?: string }> } }).credentials;
if (creds && creds.get) {
creds.get({
otp: { transport: ["sms"] },
signal: ac.signal,
})
.then((otp) => {
if (otp && otp.code) {
const clean = otp.code.replace(/[^0-9]/g, "").slice(0, 5);
setOtpCode(clean);
if (clean.length === 5) {
handleVerifyOtpWithCode(clean);
}
}
})
.catch(() => {});
}
return () => ac.abort();
}
}, [step, handleVerifyOtpWithCode]);
// NOTE: We intentionally do NOT use navigator.credentials.get (WebOTP API) here.
// autoComplete="one-time-code" on the first OTP input provides the native
// suggestion bar above the keyboard on Android without any permission dialog.
// Reset modal state when closed or opened
useEffect(() => {

View File

@ -121,7 +121,9 @@ export default function OtpInput5({
type="tel"
inputMode="numeric"
pattern="[0-9]*"
maxLength={1}
// idx === 0: no maxLength so browser OTP autofill can inject the full code.
// The handleDigitChange handler distributes multi-char input across all boxes.
maxLength={idx === 0 ? undefined : 1}
autoComplete={idx === 0 ? "one-time-code" : "off"}
value={val}
disabled={disabled}

View File

@ -460,18 +460,18 @@ export default function ProductPage({ productSlug }: { productSlug: string }) {
onDragEnd={(e, info) => {
const swipeThreshold = 50;
if (info.offset.x > swipeThreshold || info.velocity.x > 300) {
// Swipe right -> in RTL, swipe right goes to previous item, or left/right intuitive navigation
if (activeMediaIndex > 0) {
const newIdx = activeMediaIndex - 1;
// Swipe right → next item (RTL intuition: user slides right to advance)
if (activeMediaIndex < galleryMedia.length - 1) {
const newIdx = activeMediaIndex + 1;
setActiveMediaIndex(newIdx);
if (galleryMedia[newIdx]?.type === 'image') {
setActiveImage(galleryMedia[newIdx].url);
}
}
} else if (info.offset.x < -swipeThreshold || info.velocity.x < -300) {
// Swipe left -> go to next item
if (activeMediaIndex < galleryMedia.length - 1) {
const newIdx = activeMediaIndex + 1;
// Swipe left → previous item
if (activeMediaIndex > 0) {
const newIdx = activeMediaIndex - 1;
setActiveMediaIndex(newIdx);
if (galleryMedia[newIdx]?.type === 'image') {
setActiveImage(galleryMedia[newIdx].url);

View File

@ -1,7 +1,7 @@
{
"0": "Roles",
"1": "app.module.ts",
"2": "VetGallery.tsx",
"2": "BlogsService",
"3": "productService.ts",
"4": "useSettingsStore",
"5": "CmsController",
@ -17,7 +17,7 @@
"15": "src/services/api.ts",
"16": "DoctorQueryDto",
"17": "schema.ts",
"18": "JwtAuthGuard",
"18": "admin.module.ts",
"19": "admin.controller.ts",
"20": "CreateVideoDto",
"21": "pets/pets.controller.ts",
@ -33,7 +33,7 @@
"31": "DOC-001",
"32": "adminRoutes.tsx",
"33": "WholesaleApplyDto",
"34": "B2BController",
"34": "B2BService",
"35": "ContactService",
"36": "FaqController",
"37": "راهنمای تست سیستم (Software Testing)",
@ -42,11 +42,11 @@
"40": "MediaController",
"41": "What You Must Do When Invoked",
"42": "SslController",
"43": "BannersController",
"44": "TestimonialsController",
"43": "BannersService",
"44": "TestimonialsService",
"45": "What You Must Do When Invoked",
"46": "20260526145407_init/migration.sql",
"47": "IngredientsController",
"47": "IngredientsService",
"48": "WikiController",
"49": "devDependencies",
"50": "devDependencies",
@ -65,8 +65,8 @@
"63": "dependencies",
"64": "compilerOptions",
"65": "admin.service.ts",
"66": "ApiOperation",
"67": "admin.module.ts",
"66": "AdminQueryDto",
"67": "PetsController",
"68": "HomeClient.tsx",
"69": "Required Review Group Closures",
"70": "compilerOptions",
@ -75,7 +75,7 @@
"73": "Operational Rules & Boundaries",
"74": "WikiController",
"75": "PetsController",
"76": "ProductsService",
"76": "RevalidationService",
"77": "seo.module.ts",
"78": "rss.xml/route.ts",
"79": "🏢 AI Software Agency — Master Orchestration Protocol v3",
@ -84,17 +84,17 @@
"82": "scripts",
"83": "dependencies",
"84": "Role & Core Objective",
"85": "auth.service.ts",
"85": ".sendOtp",
"86": "zibal.service.ts",
"87": "dependencies",
"88": "CreateEBankCheckoutDto",
"89": "seed-products.ts",
"90": "cartStore.ts",
"90": "lib/services/api.ts",
"91": "Reconciled Audit Roles & Assignments",
"92": "OrdersService",
"93": "components/Skeleton.tsx",
"94": "Phase 3.1 — Human Review Preparation and Master Backlog Critique",
"95": "getSeoConfig",
"95": "wiki/[slug]/page.tsx",
"96": "compilerOptions",
"97": "PaymentService",
"98": "scripts",
@ -112,7 +112,7 @@
"110": "Operational Rules & Boundaries",
"111": "Operational Rules & Boundaries",
"112": "Operational Rules & Boundaries",
"113": "MetricsController",
"113": "auth.controller.ts",
"114": "AppService",
"115": "Spinner.tsx",
"116": "Vazirmatn Changelog",
@ -122,12 +122,12 @@
"120": "compilerOptions",
"121": "backend/README.md",
"122": "AdminService",
"123": "B2BService",
"123": "Body",
"124": "Repository Map",
"125": "validate_integrity.js",
"126": "admin-panel/package.json",
"127": "Sahel-Font",
"128": "zibal-ebank.service.ts",
"128": "torob.controller.ts",
"129": "Reports.tsx",
"130": "Sahel-Font",
"131": "Role & Core Objective",
@ -143,15 +143,15 @@
"141": "application/package.json",
"142": "start-dev.js",
"143": "generate-openapi.js",
"144": "lib/services/api.ts",
"145": "trust-seals/page.tsx",
"144": "SafeImage.tsx",
"145": "auth.service.ts",
"146": "System Discovery",
"147": "HomeController",
"148": "RouteErrorBoundary",
"149": "wiki/[slug]/page.tsx",
"149": "RegisterDto",
"150": "Product Requirement Document (PRD)",
"151": "@nestjs/swagger",
"152": "RevalidationService",
"152": "RedisService",
"153": "exclude",
"154": "Baseline Command Plan & Reconciled Command History",
"155": "seo-backfill.ts",
@ -178,7 +178,7 @@
"176": "uploads/[...path]/route.ts",
"177": "app/page.tsx",
"178": "نقشه جامع پوشش تست‌های سرتاسری (E2E Test Coverage Map) — پروژه Canina",
"179": "app.e2e-spec.js",
"179": "WikiService",
"180": "API Contract Specification",
"181": "⚙️ Backend Technical Review (05_dev_backend)",
"182": "🎨 Frontend & Admin Panel Technical Review (06_dev_frontend)",
@ -196,14 +196,14 @@
"194": "Raw Finding Verification & Disposition Report",
"195": "React + TypeScript + Vite",
"196": "Select.tsx",
"197": "toPersian",
"197": "AuthModal.tsx",
"198": "@tailwindcss/postcss",
"199": "prisma",
"200": "application/README.md",
"201": "deploy.sh",
"202": "🔒 Security & Performance Review (09_devops_security)",
"203": "👁️ UX & Persona Interface Review (08_visual_qa)",
"204": "bcrypt",
"204": "VerifyOtpDto",
"205": "prisma/scientificTerms.ts",
"206": "seed-blogs.ts",
"207": "seed-custom.ts",
@ -219,7 +219,7 @@
"217": "sync_honest_manifest.js",
"218": "sync_manifest.js",
"219": "FormField.tsx",
"220": "eslint-config-next",
"220": "AuthController",
"221": "Textarea.tsx",
"222": "admin-panel/tsconfig.json",
"223": "tailwindcss",
@ -303,8 +303,9 @@
"301": "reflect-metadata",
"302": "typescript-eslint",
"303": "swagger-ui-express",
"304": "track/page.tsx",
"305": "eslint-config-prettier",
"306": "@eslint/js",
"306": "class-transformer",
"307": "@eslint/eslintrc",
"308": "jest",
"309": "axios",
@ -326,5 +327,7 @@
"325": "@types/react-dom",
"326": "@types/supertest",
"327": "eslint-plugin-react-refresh",
"329": "typescript-eslint"
"328": "eslint",
"329": "typescript-eslint",
"330": "tailwindcss"
}

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,9 @@
{
"0": "Roles",
"1": "app.module.ts",
"2": "getMediaUrl",
"2": "VetGallery.tsx",
"3": "productService.ts",
"4": "PetProfile.tsx",
"4": "useSettingsStore",
"5": "CmsController",
"6": "tickets.controller.ts",
"7": "SmsSettingsPage.tsx",
@ -20,7 +20,7 @@
"18": "JwtAuthGuard",
"19": "admin.controller.ts",
"20": "CreateVideoDto",
"21": "auth.module.ts",
"21": "pets/pets.controller.ts",
"22": "ProductDto",
"23": "MenuService",
"24": "BE-001",
@ -33,7 +33,7 @@
"31": "DOC-001",
"32": "adminRoutes.tsx",
"33": "WholesaleApplyDto",
"34": "B2BService",
"34": "B2BController",
"35": "ContactService",
"36": "FaqController",
"37": "راهنمای تست سیستم (Software Testing)",
@ -42,12 +42,12 @@
"40": "MediaController",
"41": "What You Must Do When Invoked",
"42": "SslController",
"43": "BannersService",
"44": "TestimonialsService",
"43": "BannersController",
"44": "TestimonialsController",
"45": "What You Must Do When Invoked",
"46": "20260526145407_init/migration.sql",
"47": "IngredientsService",
"48": "AuthController",
"47": "IngredientsController",
"48": "WikiController",
"49": "devDependencies",
"50": "devDependencies",
"51": "BlogsController",
@ -57,17 +57,17 @@
"55": "UITexts.tsx",
"56": "Orders.tsx",
"57": "Role & Core Objective",
"58": "auth.service.ts",
"58": "AuthService",
"59": "compilerOptions",
"60": "CreateUserDto",
"61": "ProductPage.tsx",
"62": "torob.controller.ts",
"62": "ReportsController",
"63": "dependencies",
"64": "compilerOptions",
"65": "admin.service.ts",
"66": "AdminQueryDto",
"66": "ApiOperation",
"67": "admin.module.ts",
"68": "useSettingsStore",
"68": "HomeClient.tsx",
"69": "Required Review Group Closures",
"70": "compilerOptions",
"71": "getPageMetadata",
@ -84,12 +84,12 @@
"82": "scripts",
"83": "dependencies",
"84": "Role & Core Objective",
"85": "auth.controller.ts",
"85": "auth.service.ts",
"86": "zibal.service.ts",
"87": "dependencies",
"88": "CreateEBankCheckoutDto",
"89": "seed-products.ts",
"90": "orderService.ts",
"90": "cartStore.ts",
"91": "Reconciled Audit Roles & Assignments",
"92": "OrdersService",
"93": "components/Skeleton.tsx",
@ -112,7 +112,7 @@
"110": "Operational Rules & Boundaries",
"111": "Operational Rules & Boundaries",
"112": "Operational Rules & Boundaries",
"113": "PetsController",
"113": "MetricsController",
"114": "AppService",
"115": "Spinner.tsx",
"116": "Vazirmatn Changelog",
@ -122,12 +122,12 @@
"120": "compilerOptions",
"121": "backend/README.md",
"122": "AdminService",
"123": "UsersController",
"123": "B2BService",
"124": "Repository Map",
"125": "validate_integrity.js",
"126": "admin-panel/package.json",
"127": "Sahel-Font",
"128": "Body",
"128": "zibal-ebank.service.ts",
"129": "Reports.tsx",
"130": "Sahel-Font",
"131": "Role & Core Objective",
@ -144,14 +144,14 @@
"142": "start-dev.js",
"143": "generate-openapi.js",
"144": "lib/services/api.ts",
"145": "orders.service.ts",
"145": "trust-seals/page.tsx",
"146": "System Discovery",
"147": "HomeController",
"148": "RouteErrorBoundary",
"149": "wiki/[slug]/page.tsx",
"150": "Product Requirement Document (PRD)",
"151": "AddressDto",
"152": "RedisService",
"151": "@nestjs/swagger",
"152": "RevalidationService",
"153": "exclude",
"154": "Baseline Command Plan & Reconciled Command History",
"155": "seo-backfill.ts",
@ -196,9 +196,9 @@
"194": "Raw Finding Verification & Disposition Report",
"195": "React + TypeScript + Vite",
"196": "Select.tsx",
"197": "ClientLayout.tsx",
"197": "toPersian",
"198": "@tailwindcss/postcss",
"199": "track/page.tsx",
"199": "prisma",
"200": "application/README.md",
"201": "deploy.sh",
"202": "🔒 Security & Performance Review (09_devops_security)",
@ -219,7 +219,7 @@
"217": "sync_honest_manifest.js",
"218": "sync_manifest.js",
"219": "FormField.tsx",
"220": "class-transformer",
"220": "eslint-config-next",
"221": "Textarea.tsx",
"222": "admin-panel/tsconfig.json",
"223": "tailwindcss",
@ -303,7 +303,6 @@
"301": "reflect-metadata",
"302": "typescript-eslint",
"303": "swagger-ui-express",
"304": "eslint",
"305": "eslint-config-prettier",
"306": "@eslint/js",
"307": "@eslint/eslintrc",
@ -327,6 +326,5 @@
"325": "@types/react-dom",
"326": "@types/supertest",
"327": "eslint-plugin-react-refresh",
"328": "tailwindcss",
"329": "typescript-eslint"
}

View File

@ -1,25 +1,25 @@
# Graph Report - canina (2026-09-05)
## Corpus Check
- 602 files · ~1,114,472 words
- 603 files · ~1,115,636 words
- Verdict: corpus is large enough that graph structure adds value.
## Summary
- 4240 nodes · 7765 edges · 330 communities (217 shown, 113 thin omitted)
- 4245 nodes · 7776 edges · 328 communities (215 shown, 113 thin omitted)
- Extraction: 96% EXTRACTED · 4% INFERRED · 0% AMBIGUOUS · INFERRED: 298 edges (avg confidence: 0.79)
- Token cost: 0 input · 0 output
## Graph Freshness
- Built from commit: `330d9605`
- Built from commit: `00cfd1a2`
- Run `git rev-parse HEAD` and compare to check if the graph is stale.
- Run `graphify update .` after code changes (no API cost).
## Community Hubs (Navigation)
- Roles
- app.module.ts
- getMediaUrl
- VetGallery.tsx
- productService.ts
- PetProfile.tsx
- useSettingsStore
- CmsController
- tickets.controller.ts
- SmsSettingsPage.tsx
@ -36,7 +36,7 @@
- JwtAuthGuard
- admin.controller.ts
- CreateVideoDto
- auth.module.ts
- pets/pets.controller.ts
- ProductDto
- MenuService
- BE-001
@ -49,7 +49,7 @@
- DOC-001
- adminRoutes.tsx
- WholesaleApplyDto
- B2BService
- B2BController
- ContactService
- FaqController
- راهنمای تست سیستم (Software Testing)
@ -58,12 +58,12 @@
- MediaController
- What You Must Do When Invoked
- SslController
- BannersService
- TestimonialsService
- BannersController
- TestimonialsController
- What You Must Do When Invoked
- 20260526145407_init/migration.sql
- IngredientsService
- AuthController
- IngredientsController
- WikiController
- devDependencies
- devDependencies
- BlogsController
@ -73,17 +73,17 @@
- UITexts.tsx
- Orders.tsx
- Role & Core Objective
- auth.service.ts
- AuthService
- compilerOptions
- CreateUserDto
- ProductPage.tsx
- torob.controller.ts
- ReportsController
- dependencies
- compilerOptions
- admin.service.ts
- AdminQueryDto
- ApiOperation
- admin.module.ts
- useSettingsStore
- HomeClient.tsx
- Required Review Group Closures
- compilerOptions
- getPageMetadata
@ -100,12 +100,12 @@
- scripts
- dependencies
- Role & Core Objective
- auth.controller.ts
- auth.service.ts
- zibal.service.ts
- dependencies
- CreateEBankCheckoutDto
- seed-products.ts
- orderService.ts
- cartStore.ts
- Reconciled Audit Roles & Assignments
- OrdersService
- components/Skeleton.tsx
@ -128,7 +128,7 @@
- Operational Rules & Boundaries
- Operational Rules & Boundaries
- Operational Rules & Boundaries
- PetsController
- MetricsController
- AppService
- Spinner.tsx
- Vazirmatn Changelog
@ -138,12 +138,12 @@
- compilerOptions
- backend/README.md
- AdminService
- UsersController
- B2BService
- Repository Map
- validate_integrity.js
- admin-panel/package.json
- Sahel-Font
- Body
- zibal-ebank.service.ts
- Reports.tsx
- Sahel-Font
- Role & Core Objective
@ -160,14 +160,14 @@
- start-dev.js
- generate-openapi.js
- lib/services/api.ts
- orders.service.ts
- trust-seals/page.tsx
- System Discovery
- HomeController
- RouteErrorBoundary
- wiki/[slug]/page.tsx
- Product Requirement Document (PRD)
- AddressDto
- RedisService
- @nestjs/swagger
- RevalidationService
- exclude
- Baseline Command Plan & Reconciled Command History
- seo-backfill.ts
@ -211,9 +211,9 @@
- Raw Finding Verification & Disposition Report
- React + TypeScript + Vite
- Select.tsx
- ClientLayout.tsx
- toPersian
- @tailwindcss/postcss
- track/page.tsx
- prisma
- application/README.md
- deploy.sh
- 🔒 Security & Performance Review (09_devops_security)
@ -234,7 +234,7 @@
- sync_honest_manifest.js
- sync_manifest.js
- FormField.tsx
- class-transformer
- eslint-config-next
- Textarea.tsx
- admin-panel/tsconfig.json
- tailwindcss
@ -303,7 +303,6 @@
- reflect-metadata
- typescript-eslint
- swagger-ui-express
- eslint
- eslint-config-prettier
- @eslint/js
- @eslint/eslintrc
@ -323,7 +322,6 @@
- @types/react-dom
- @types/supertest
- eslint-plugin-react-refresh
- tailwindcss
- typescript-eslint
## God Nodes (most connected - your core abstractions)
@ -351,11 +349,11 @@
backend/src/orders/orders.controller.ts → frontend/admin-panel/src/types/admin.ts
## Import Cycles
- 3-file cycle: `frontend/application/lib/services/api.ts -> frontend/application/lib/store/userStore.ts -> frontend/application/lib/services/authService.ts -> frontend/application/lib/services/api.ts`
- 3-file cycle: `frontend/application/lib/services/api.ts -> frontend/application/lib/store/userStore.ts -> frontend/application/lib/store/cartStore.ts -> frontend/application/lib/services/api.ts`
- 3-file cycle: `frontend/application/lib/services/api.ts -> frontend/application/lib/store/userStore.ts -> frontend/application/lib/services/authService.ts -> frontend/application/lib/services/api.ts`
- 4-file cycle: `frontend/application/lib/services/api.ts -> frontend/application/lib/store/userStore.ts -> frontend/application/lib/store/cartStore.ts -> frontend/application/lib/services/orderService.ts -> frontend/application/lib/services/api.ts`
## Communities (330 total, 113 thin omitted)
## Communities (328 total, 113 thin omitted)
### Community 0 - "Roles"
Cohesion: 0.24
@ -363,19 +361,19 @@ Nodes (13): Roles(), PaymentController, ApiBearerAuth, ApiOperation, ApiTags, Bo
### Community 1 - "app.module.ts"
Cohesion: 0.07
Nodes (34): B2BModule, Module, BannersModule, Module, CmsModule, Module, SmsModule, Global (+26 more)
Nodes (32): BannersModule, Module, CmsModule, Module, SmsModule, Global, Module, ContactModule (+24 more)
### Community 2 - "getMediaUrl"
Cohesion: 0.10
Nodes (23): buildTorobProductSpec(), buildTorobProductTitle(), dynamic, GET(), revalidate, dynamic, GET(), revalidate (+15 more)
### Community 2 - "VetGallery.tsx"
Cohesion: 0.15
Nodes (13): BackButton(), BackButtonProps, VideoModalPlayer, DisplayVideoItem, FALLBACK_VIDEOS, TestimonialItem, VetGallery(), PLAYBACK_RATES (+5 more)
### Community 3 - "productService.ts"
Cohesion: 0.07
Nodes (32): DEFAULT_CATEGORIES, dynamic, revalidate, dynamic, revalidate, BlogCategory, BlogPostItem, CatalogPageSpread() (+24 more)
Cohesion: 0.06
Nodes (40): buildTorobProductSpec(), buildTorobProductTitle(), dynamic, GET(), revalidate, dynamic, GET(), revalidate (+32 more)
### Community 4 - "PetProfile.tsx"
Cohesion: 0.09
Nodes (31): VerifyContent(), metadata, CartDrawer(), Header(), MENU_ICONS, OrderSuccess(), PetProfile(), PrescriptionUploadModal() (+23 more)
### Community 4 - "useSettingsStore"
Cohesion: 0.08
Nodes (28): AuthModal, B2BPortal, CartDrawer, ClientLayout(), LoginModal, metadata, ArchivePage(), BrandLogo() (+20 more)
### Community 5 - "CmsController"
Cohesion: 0.09
@ -395,27 +393,27 @@ Nodes (27): SmsEventDefinition, SmsService, Injectable, SmsLogQueryDto, ApiPrope
### Community 9 - "devDependencies"
Cohesion: 0.22
Nodes (9): devDependencies, prisma, @types/bcryptjs, @types/node, typescript, @types/node, typescript, prisma (+1 more)
Nodes (9): devDependencies, eslint, @types/bcryptjs, @types/node, typescript, eslint, @types/node, typescript (+1 more)
### Community 10 - "reviews.controller.ts"
Cohesion: 0.07
Nodes (32): CreateReviewDto, ApiProperty, IsInt, IsNotEmpty, IsOptional, IsString, Min, ApiProperty (+24 more)
### Community 11 - "UsersService"
Cohesion: 0.12
Nodes (10): ApiPropertyOptional, IsEmail, IsOptional, IsString, MinLength, UpdateProfileDto, Injectable, Optional (+2 more)
Cohesion: 0.05
Nodes (43): DEFAULT_JWT_REFRESH_SECRET, DEFAULT_JWT_SECRET, getJwtSecret(), AuthModule, Module, JwtPayload, JwtStrategy, Injectable (+35 more)
### Community 12 - "index.ts"
Cohesion: 0.06
Nodes (24): backend, frontend, playwright.config.ts, @playwright/test, tests/**/*.ts, authFile, test, compilerOptions (+16 more)
### Community 13 - "app-audit-verification.e2e-spec.js"
Cohesion: 0.07
Nodes (26): EnvironmentVariables, IsNotEmpty, IsOptional, IsString, validateEnv(), CustomHttpExceptionFilter, Catch, PrismaExceptionFilter (+18 more)
Cohesion: 0.06
Nodes (28): AppModule, Module, EnvironmentVariables, IsNotEmpty, IsOptional, IsString, validateEnv(), CustomHttpExceptionFilter (+20 more)
### Community 14 - "UserDashboard.tsx"
Cohesion: 0.14
Nodes (23): AddressFormData, AddressModal(), AddressModalProps, normalizeDigits(), validateAddressForm(), BackButton(), BackButtonProps, CheckoutPage() (+15 more)
Cohesion: 0.13
Nodes (22): AddressFormData, AddressModal(), AddressModalProps, normalizeDigits(), validateAddressForm(), CheckoutPage(), DeleteConfirmModal(), DeleteConfirmModalProps (+14 more)
### Community 15 - "src/services/api.ts"
Cohesion: 0.06
@ -430,20 +428,20 @@ Cohesion: 0.14
Nodes (18): B2BPage(), generateMetadata(), ContactPage(), generateMetadata(), generateMetadata(), getInitialVideos(), Videos(), ContactFormClient() (+10 more)
### Community 18 - "JwtAuthGuard"
Cohesion: 0.21
Nodes (6): JwtAuthGuard, Injectable, ROLES_KEY, RequestWithUser, RolesGuard, Injectable
Cohesion: 0.18
Nodes (7): JwtAuthGuard, Injectable, ROLES_KEY, RequestWithUser, RolesGuard, Injectable, ScientificTermData
### Community 19 - "admin.controller.ts"
Cohesion: 0.29
Cohesion: 0.35
Nodes (12): ApplyGlobalMarginsDto, BulkPriceAdjustmentDto, ApiProperty, ApiPropertyOptional, IsArray, IsBoolean, IsIn, IsNumber (+4 more)
### Community 20 - "CreateVideoDto"
Cohesion: 0.09
Nodes (24): CreateVideoDto, ApiProperty, ApiPropertyOptional, IsBoolean, IsNotEmpty, IsOptional, IsString, UpdateVideoDto (+16 more)
### Community 21 - "auth.module.ts"
Cohesion: 0.15
Nodes (10): DEFAULT_JWT_REFRESH_SECRET, DEFAULT_JWT_SECRET, getJwtSecret(), AuthModule, Module, JwtPayload, JwtStrategy, Injectable (+2 more)
### Community 21 - "pets/pets.controller.ts"
Cohesion: 0.13
Nodes (15): CreatePetDto, ApiProperty, ApiPropertyOptional, IsArray, IsNotEmpty, IsNumber, IsOptional, IsString (+7 more)
### Community 22 - "ProductDto"
Cohesion: 0.16
@ -493,9 +491,9 @@ Nodes (21): App(), ContactInfoItem, ContactSubmission, CategoryDist, DashboardDa
Cohesion: 0.10
Nodes (20): ApiProperty, ApiPropertyOptional, IsNotEmpty, IsOptional, IsString, WholesaleApplyDto, ApiBearerAuth, ApiOperation (+12 more)
### Community 34 - "B2BService"
Cohesion: 0.13
Nodes (15): B2BController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Get, Param (+7 more)
### Community 34 - "B2BController"
Cohesion: 0.14
Nodes (13): B2BController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Get, Param (+5 more)
### Community 35 - "ContactService"
Cohesion: 0.13
@ -529,13 +527,13 @@ Nodes (26): For /graphify add and --watch, For /graphify query, For the commit h
Cohesion: 0.13
Nodes (14): SslController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Get, Post (+6 more)
### Community 43 - "BannersService"
### Community 43 - "BannersController"
Cohesion: 0.13
Nodes (15): BannersController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Delete, Get (+7 more)
Nodes (13): BannersController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Delete, Get (+5 more)
### Community 44 - "TestimonialsService"
### Community 44 - "TestimonialsController"
Cohesion: 0.13
Nodes (14): TestimonialsController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Delete, Get (+6 more)
Nodes (12): TestimonialsController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Delete, Get (+4 more)
### Community 45 - "What You Must Do When Invoked"
Cohesion: 0.07
@ -545,13 +543,13 @@ Nodes (26): For /graphify add and --watch, For /graphify query, For the commit h
Cohesion: 0.27
Nodes (14): "coupons", "health_logs", "order_items", "orders", "pet_medical_conditions", "pets", "product_ingredients", "product_symptoms" (+6 more)
### Community 47 - "IngredientsService"
### Community 47 - "IngredientsController"
Cohesion: 0.13
Nodes (14): IngredientsController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Delete, Get (+6 more)
Nodes (12): IngredientsController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Delete, Get (+4 more)
### Community 48 - "AuthController"
Cohesion: 0.23
Nodes (13): AuthController, ApiBadRequestResponse, ApiBearerAuth, ApiOkResponse, ApiOperation, ApiTags, Body, Controller (+5 more)
### Community 48 - "WikiController"
Cohesion: 0.13
Nodes (13): ApiNotFoundResponse, ApiOkResponse, ApiOperation, ApiTags, Controller, Get, Param, Query (+5 more)
### Community 49 - "devDependencies"
Cohesion: 0.11
@ -559,7 +557,7 @@ Nodes (19): autoprefixer, devDependencies, autoprefixer, eslint, @eslint/js, glo
### Community 50 - "devDependencies"
Cohesion: 0.12
Nodes (17): eslint-config-next, devDependencies, eslint, eslint-config-next, jsdom, @testing-library/jest-dom, @testing-library/react, @types/node (+9 more)
Nodes (17): devDependencies, eslint, jsdom, tailwindcss, @testing-library/jest-dom, @testing-library/react, @types/node, @types/react (+9 more)
### Community 51 - "BlogsController"
Cohesion: 0.07
@ -589,9 +587,9 @@ Nodes (15): Badge(), BadgeProps, BadgeVariant, variantStyles, Skeleton(), Monito
Cohesion: 0.09
Nodes (22): CREATE MODE — Normal Operation, Expected JSON Output Schema, File Scope Boundary, Forbidden Actions, MODE 1: REVIEW (called during Review Phase), MODE 2: CONTENT CREATION (standalone task from backlog), Operating Modes, Operational Rules & Boundaries (+14 more)
### Community 58 - "auth.service.ts"
Cohesion: 0.09
Nodes (17): AdminLoginInput, AuthService, LoginInput, RegisterInput, Injectable, SendOtpDto, ApiProperty, IsNotEmpty (+9 more)
### Community 58 - "AuthService"
Cohesion: 0.22
Nodes (3): AuthService, Injectable, normalizeMobile()
### Community 59 - "compilerOptions"
Cohesion: 0.06
@ -602,36 +600,36 @@ Cohesion: 0.21
Nodes (10): CreateUserDto, ApiProperty, ApiPropertyOptional, IsEmail, IsNotEmpty, IsNumber, IsOptional, IsString (+2 more)
### Community 61 - "ProductPage.tsx"
Cohesion: 0.18
Nodes (21): ArchiveProductCard(), CATEGORY_MAP, ICON_MAP, FeaturedProducts(), ProductCard(), ProductImageZoomModalProps, CalculatorState, GalleryMediaItem (+13 more)
Cohesion: 0.11
Nodes (32): ArchiveProductCard(), CATEGORY_MAP, ICON_MAP, FeaturedProducts(), ProductCard(), Header(), OrderSuccess(), OrderTracking() (+24 more)
### Community 62 - "torob.controller.ts"
Cohesion: 0.22
Nodes (8): buildTorobProductSpec(), buildTorobProductTitle(), TorobController, ApiOperation, ApiTags, Controller, Get, Query
### Community 62 - "ReportsController"
Cohesion: 0.14
Nodes (11): ReportsController, ApiBearerAuth, ApiOperation, ApiQuery, ApiTags, Controller, Get, Query (+3 more)
### Community 63 - "dependencies"
Cohesion: 0.09
Nodes (23): dependencies, bcryptjs, class-validator, compression, ioredis, @nestjs/common, @nestjs/passport, @nestjs/platform-express (+15 more)
Nodes (23): dependencies, bcryptjs, class-transformer, class-validator, compression, ioredis, @nestjs/common, @nestjs/passport (+15 more)
### Community 64 - "compilerOptions"
Cohesion: 0.10
Nodes (20): compilerOptions, allowImportingTsExtensions, erasableSyntaxOnly, lib, module, moduleDetection, moduleResolution, noEmit (+12 more)
### Community 65 - "admin.service.ts"
Cohesion: 0.33
Cohesion: 0.21
Nodes (8): CouponTargetInput, PaginationQuery, applyRounding(), calculateSellingPrice(), DEFAULT_PRICING_SETTINGS, PricingSettings, RoundingMode, CANONICAL_ALIASES
### Community 66 - "AdminQueryDto"
Cohesion: 0.18
Nodes (7): ApiQuery, Query, AdminProductQueryDto, AdminQueryDto, ApiPropertyOptional, IsOptional, IsString
### Community 66 - "ApiOperation"
Cohesion: 0.13
Nodes (9): ApiOperation, ApiQuery, Get, Query, AdminProductQueryDto, AdminQueryDto, ApiPropertyOptional, IsOptional (+1 more)
### Community 67 - "admin.module.ts"
Cohesion: 0.06
Nodes (23): AdminModule, Module, CategoryQuery, MediaService, Injectable, PetQuery, PetsService, Injectable (+15 more)
Nodes (23): AdminModule, Module, MediaService, Injectable, PetsController, ApiBearerAuth, ApiOperation, ApiQuery (+15 more)
### Community 68 - "useSettingsStore"
Cohesion: 0.07
Nodes (34): HomeClient(), HomeClientProps, ArchivePage(), B2BLandingClient(), BannerPlacement(), BannerPlacementProps, BrandLogo(), BrandLogoProps (+26 more)
### Community 68 - "HomeClient.tsx"
Cohesion: 0.11
Nodes (19): HomeClient(), HomeClientProps, BannerPlacement(), BannerPlacementProps, BlogPreviewSection(), FAQSection(), Hero(), StatCounter() (+11 more)
### Community 69 - "Required Review Group Closures"
Cohesion: 0.10
@ -658,12 +656,12 @@ Cohesion: 0.13
Nodes (14): ApiBearerAuth, ApiOperation, ApiQuery, ApiTags, Body, Controller, Delete, Get (+6 more)
### Community 75 - "PetsController"
Cohesion: 0.05
Nodes (47): CreateHealthLogDto, ApiProperty, ApiPropertyOptional, IsNotEmpty, IsOptional, IsString, CreatePetDto, ApiProperty (+39 more)
Cohesion: 0.08
Nodes (32): CreateHealthLogDto, ApiProperty, ApiPropertyOptional, IsNotEmpty, IsOptional, IsString, CreateReminderDto, ApiProperty (+24 more)
### Community 76 - "ProductsService"
Cohesion: 0.10
Nodes (19): GetProductsDto, ApiPropertyOptional, IsEnum, IsOptional, IsString, ProductsController, ApiOperation, ApiTags (+11 more)
Cohesion: 0.07
Nodes (27): GetProductsDto, ApiPropertyOptional, IsEnum, IsOptional, IsString, ProductsController, ApiOperation, ApiTags (+19 more)
### Community 77 - "seo.module.ts"
Cohesion: 0.16
@ -697,9 +695,9 @@ Nodes (21): dependencies, axios, lucide-react, react, react-dom, react-hot-toast
Cohesion: 0.12
Nodes (16): 1. Active Secret Scanning (All Modified Files), 2. Docker Container Verification (if Dockerfile exists), 3. CI/CD Basic Check (if `.github/workflows/` exists), 4. Failure Routing Protocol, 5. Forbidden Actions, ENFORCE MODE — Normal Operation, Expected JSON Output Schema, Operational Rules & Boundaries (+8 more)
### Community 85 - "auth.controller.ts"
Cohesion: 0.10
Nodes (19): AdminLoginDto, ApiProperty, IsEmail, IsNotEmpty, IsString, MinLength, LoginDto, ApiProperty (+11 more)
### Community 85 - "auth.service.ts"
Cohesion: 0.06
Nodes (46): AuthController, ApiBadRequestResponse, ApiBearerAuth, ApiOkResponse, ApiOperation, ApiTags, Body, Controller (+38 more)
### Community 86 - "zibal.service.ts"
Cohesion: 0.16
@ -717,17 +715,17 @@ Nodes (8): CreateEBankCheckoutDto, ApiProperty, ApiPropertyOptional, IsNotEmpty,
Cohesion: 0.17
Nodes (12): prisma, main(), prisma, determineSuitableFor(), findOrCreateCategory(), getProductImageUrl(), main(), parseSize() (+4 more)
### Community 90 - "orderService.ts"
Cohesion: 0.18
Nodes (5): ApiErr, Order, OrderItem, OrderService, mockProduct
### Community 90 - "cartStore.ts"
Cohesion: 0.15
Nodes (8): ApiErr, Order, OrderItem, OrderService, CartItem, CartStore, Order, mockProduct
### Community 91 - "Reconciled Audit Roles & Assignments"
Cohesion: 0.12
Nodes (15): 10. Documentation Engineer, 1. Lead Architect / Orchestrator, 2. React / Vite Storefront Auditor, 3. NestJS Backend Auditor, 4. Admin Features Auditor, 5. Database & Data Integrity Auditor, 6. Security Auditor, 7. TypeScript & Code Quality Auditor (+7 more)
### Community 92 - "OrdersService"
Cohesion: 0.07
Nodes (29): CreateOrderDto, OrderItemDto, ApiProperty, ApiPropertyOptional, IsArray, IsNotEmpty, IsNumber, IsOptional (+21 more)
Cohesion: 0.06
Nodes (35): CreateOrderDto, OrderItemDto, ApiProperty, ApiPropertyOptional, IsArray, IsNotEmpty, IsNumber, IsOptional (+27 more)
### Community 93 - "components/Skeleton.tsx"
Cohesion: 0.24
@ -786,12 +784,12 @@ Cohesion: 0.43
Nodes (7): InitiatePaymentDto, InitiateWalletTopupDto, ApiProperty, ApiPropertyOptional, IsNotEmpty, IsOptional, IsString
### Community 107 - "PaginationDto"
Cohesion: 0.05
Nodes (32): BlogsModule, Module, BlogFilterDto, BlogsService, Injectable, PaginationDto, SortOrder, ApiPropertyOptional (+24 more)
Cohesion: 0.07
Nodes (19): BlogsModule, Module, BlogFilterDto, BlogsService, Injectable, PaginationDto, SortOrder, ApiPropertyOptional (+11 more)
### Community 108 - "PrismaService"
Cohesion: 0.04
Nodes (35): ApiExcludeController, Optional, B2BWholesaleOrderItem, MetricsController, Controller, Get, Res, RevalidationModule (+27 more)
Cohesion: 0.06
Nodes (27): CategoryQuery, PetQuery, WikiQuery, BannersService, Injectable, DEFAULT_SMS_RULES, SMS_EVENT_DEFINITIONS, SmsEventVariable (+19 more)
### Community 109 - "1. Summary of Integrity Repairs Performed"
Cohesion: 0.17
@ -809,9 +807,9 @@ Nodes (10): 1. Mark Active Task as Complete, 2. Documentation Updates, 3. Dynami
Cohesion: 0.18
Nodes (10): 1. Pre-Deployment Checklist, 2. Build Verification, 3. Deployment Strategy (Based on Target), 4. Post-Deployment Health Check, 5. Forbidden Actions, Expected JSON Output Schema, Operational Rules & Boundaries, Required Output Artifacts (What files to write/update) (+2 more)
### Community 113 - "PetsController"
Cohesion: 0.15
Nodes (11): PetsController, ApiBearerAuth, ApiOperation, ApiQuery, ApiTags, Controller, Delete, Get (+3 more)
### Community 113 - "MetricsController"
Cohesion: 0.20
Nodes (5): ApiExcludeController, MetricsController, Controller, Get, Res
### Community 114 - "AppService"
Cohesion: 0.29
@ -847,11 +845,11 @@ Nodes (9): Compile and run the project, Deployment, Description, License, Projec
### Community 122 - "AdminService"
Cohesion: 0.09
Nodes (12): AdminController, ApiBearerAuth, ApiOperation, ApiTags, Controller, Delete, Get, Param (+4 more)
Nodes (13): AdminController, ApiBearerAuth, ApiTags, Body, Controller, Delete, Param, Post (+5 more)
### Community 123 - "UsersController"
Cohesion: 0.21
Nodes (16): ApiBadRequestResponse, ApiBearerAuth, ApiCreatedResponse, ApiOkResponse, ApiOperation, ApiTags, Body, Controller (+8 more)
### Community 123 - "B2BService"
Cohesion: 0.33
Nodes (5): B2BModule, Module, B2BService, B2BWholesaleOrderItem, Injectable
### Community 124 - "Repository Map"
Cohesion: 0.20
@ -869,9 +867,9 @@ Nodes (9): name, private, scripts, build, dev, lint, preview, type (+1 more)
Cohesion: 0.20
Nodes (9): Arch Linux, Contributors, Install, Known problems for variable version, License, Sahel-Font, To Do (variable), طریقه استفاده از نسخه متغیر variable (+1 more)
### Community 128 - "Body"
Cohesion: 0.17
Nodes (3): Body, Post, CouponInput
### Community 128 - "zibal-ebank.service.ts"
Cohesion: 0.40
Nodes (4): EBankCheckoutListFilter, EBankCheckoutOptions, EBankIdentifiedPaymentFilter, EBankStatementFilter
### Community 129 - "Reports.tsx"
Cohesion: 0.20
@ -934,12 +932,8 @@ Cohesion: 0.25
Nodes (6): app_module_1, core_1, fs, path, swagger_1, yaml
### Community 144 - "lib/services/api.ts"
Cohesion: 0.08
Nodes (24): B2BPortal(), BlogPostClientProps, BlogPost, BlogPreviewSection(), ContactInfoItem, OrderDetailsModal(), OrderDetailsModalProps, PLAYBACK_RATES (+16 more)
### Community 145 - "orders.service.ts"
Cohesion: 0.24
Nodes (6): IsNotEmpty, IsNumber, IsString, ValidateCouponDto, OrdersModule, Module
Cohesion: 0.09
Nodes (21): B2BLandingClient(), BlogPostClientProps, BlogPost, ContactInfoItem, FAQItem, OrderDetailsModalProps, PLAYBACK_RATES, PodcastInlinePlayer() (+13 more)
### Community 146 - "System Discovery"
Cohesion: 0.25
@ -961,13 +955,9 @@ Nodes (5): generateMetadata(), getRelatedProducts(), getWikiTerm(), WikiTermPage
Cohesion: 0.29
Nodes (6): 1. Executive Vision, 2. Target Audience, 3. Functional Requirements, 4. Non-Functional Requirements (Performance, Security), 5. Epic / Feature Breakdown, Product Requirement Document (PRD)
### Community 151 - "AddressDto"
Cohesion: 0.25
Nodes (7): AddressDto, ApiProperty, ApiPropertyOptional, IsBoolean, IsNotEmpty, IsOptional, IsString
### Community 152 - "RedisService"
Cohesion: 0.11
Nodes (7): AppModule, Module, RedisModule, Global, Module, RedisService, Injectable
### Community 152 - "RevalidationService"
Cohesion: 0.12
Nodes (8): Optional, RevalidationModule, Global, Module, RevalidationService, Injectable, RedisService, Injectable
### Community 153 - "exclude"
Cohesion: 0.22
@ -1117,9 +1107,9 @@ Nodes (3): Expanding the ESLint configuration, React Compiler, React + TypeScrip
Cohesion: 0.50
Nodes (3): Select, SelectOption, SelectProps
### Community 197 - "ClientLayout.tsx"
Cohesion: 0.08
Nodes (19): AuthModal, B2BPortal, CartDrawer, ClientLayout(), LoginModal, AuthModal(), AuthModalProps, extractOtpFromText() (+11 more)
### Community 197 - "toPersian"
Cohesion: 0.07
Nodes (33): VerifyContent(), AuthModal(), AuthModalProps, extractOtpFromText(), otpCooldownExpiries, B2BPortal(), CartDrawer(), HeaderButton() (+25 more)
### Community 200 - "application/README.md"
Cohesion: 0.50
@ -1146,24 +1136,24 @@ Cohesion: 0.83
Nodes (3): GET(), handleRevalidate(), POST()
## Knowledge Gaps
- **1352 isolated node(s):** `$schema`, `collection`, `sourceRoot`, `deleteOutDir`, `name` (+1347 more)
- **1355 isolated node(s):** `$schema`, `collection`, `sourceRoot`, `deleteOutDir`, `name` (+1350 more)
These have ≤1 connection - possible missing edges or undocumented components.
- **113 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
## Suggested Questions
_Questions this graph is uniquely positioned to answer:_
- **Why does `Roles()` connect `Roles` to `WholesaleApplyDto`, `B2BService`, `ContactService`, `FaqController`, `CmsController`, `tickets.controller.ts`, `SmsService`, `SslController`, `BannersService`, `ProductsService`, `reviews.controller.ts`, `TestimonialsService`, `IngredientsService`, `JwtAuthGuard`, `prescriptions.controller.ts`, `SmartAdvisorService`, `MenuService`?**
_High betweenness centrality (0.094) - this node is a cross-community bridge._
- **Why does `ApiResponse` connect `src/services/api.ts` to `BlogsController`, `PetsController`, `ProductsService`, `PaginationDto`, `AuthController`, `HomeController`, `UsersController`, `OrdersService`?**
- **Why does `Roles()` connect `Roles` to `WholesaleApplyDto`, `B2BController`, `ContactService`, `FaqController`, `CmsController`, `tickets.controller.ts`, `SmsService`, `SslController`, `BannersController`, `ProductsService`, `reviews.controller.ts`, `TestimonialsController`, `IngredientsController`, `JwtAuthGuard`, `prescriptions.controller.ts`, `SmartAdvisorService`, `MenuService`, `B2BService`?**
_High betweenness centrality (0.093) - this node is a cross-community bridge._
- **Why does `ApiResponse` connect `src/services/api.ts` to `BlogsController`, `PetsController`, `ProductsService`, `UsersService`, `WikiController`, `HomeController`, `auth.service.ts`, `OrdersService`?**
_High betweenness centrality (0.066) - this node is a cross-community bridge._
- **Why does `JwtAuthGuard` connect `JwtAuthGuard` to `admin.module.ts`, `CmsController`, `tickets.controller.ts`, `reviews.controller.ts`, `PaginationDto`, `PetsController`, `ProductsService`, `UsersService`, `DoctorQueryDto`, `orders.service.ts`, `admin.controller.ts`, `prescriptions.controller.ts`, `auth.controller.ts`?**
- **Why does `JwtAuthGuard` connect `JwtAuthGuard` to `app.module.ts`, `admin.module.ts`, `CmsController`, `tickets.controller.ts`, `reviews.controller.ts`, `PaginationDto`, `ProductsService`, `UsersService`, `admin.controller.ts`, `prescriptions.controller.ts`, `auth.service.ts`, `pets/pets.controller.ts`, `B2BService`, `OrdersService`?**
_High betweenness centrality (0.030) - this node is a cross-community bridge._
- **What connects `$schema`, `collection`, `sourceRoot` to the rest of the system?**
_1352 weakly-connected nodes found - possible documentation gaps or missing edges._
_1355 weakly-connected nodes found - possible documentation gaps or missing edges._
- **Should `app.module.ts` be split into smaller, more focused modules?**
_Cohesion score 0.07215686274509804 - nodes in this community are weakly interconnected._
- **Should `getMediaUrl` be split into smaller, more focused modules?**
_Cohesion score 0.09848484848484848 - nodes in this community are weakly interconnected._
_Cohesion score 0.07137254901960784 - nodes in this community are weakly interconnected._
- **Should `productService.ts` be split into smaller, more focused modules?**
_Cohesion score 0.06654567453115548 - nodes in this community are weakly interconnected._
_Cohesion score 0.05839727195225917 - nodes in this community are weakly interconnected._
- **Should `useSettingsStore` be split into smaller, more focused modules?**
_Cohesion score 0.0782608695652174 - nodes in this community are weakly interconnected._

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,23 +1,23 @@
# Graph Report - canina (2026-09-05)
## Corpus Check
- 603 files · ~1,115,636 words
- 603 files · ~1,115,875 words
- Verdict: corpus is large enough that graph structure adds value.
## Summary
- 4245 nodes · 7776 edges · 328 communities (215 shown, 113 thin omitted)
- 4249 nodes · 7780 edges · 331 communities (216 shown, 115 thin omitted)
- Extraction: 96% EXTRACTED · 4% INFERRED · 0% AMBIGUOUS · INFERRED: 298 edges (avg confidence: 0.79)
- Token cost: 0 input · 0 output
## Graph Freshness
- Built from commit: `00cfd1a2`
- Built from commit: `1d2d1415`
- Run `git rev-parse HEAD` and compare to check if the graph is stale.
- Run `graphify update .` after code changes (no API cost).
## Community Hubs (Navigation)
- Roles
- app.module.ts
- VetGallery.tsx
- BlogsService
- productService.ts
- useSettingsStore
- CmsController
@ -33,7 +33,7 @@
- src/services/api.ts
- DoctorQueryDto
- schema.ts
- JwtAuthGuard
- admin.module.ts
- admin.controller.ts
- CreateVideoDto
- pets/pets.controller.ts
@ -49,7 +49,7 @@
- DOC-001
- adminRoutes.tsx
- WholesaleApplyDto
- B2BController
- B2BService
- ContactService
- FaqController
- راهنمای تست سیستم (Software Testing)
@ -58,11 +58,11 @@
- MediaController
- What You Must Do When Invoked
- SslController
- BannersController
- TestimonialsController
- BannersService
- TestimonialsService
- What You Must Do When Invoked
- 20260526145407_init/migration.sql
- IngredientsController
- IngredientsService
- WikiController
- devDependencies
- devDependencies
@ -81,8 +81,8 @@
- dependencies
- compilerOptions
- admin.service.ts
- ApiOperation
- admin.module.ts
- AdminQueryDto
- PetsController
- HomeClient.tsx
- Required Review Group Closures
- compilerOptions
@ -91,7 +91,7 @@
- Operational Rules & Boundaries
- WikiController
- PetsController
- ProductsService
- RevalidationService
- seo.module.ts
- rss.xml/route.ts
- 🏢 AI Software Agency — Master Orchestration Protocol v3
@ -100,17 +100,17 @@
- scripts
- dependencies
- Role & Core Objective
- auth.service.ts
- .sendOtp
- zibal.service.ts
- dependencies
- CreateEBankCheckoutDto
- seed-products.ts
- cartStore.ts
- lib/services/api.ts
- Reconciled Audit Roles & Assignments
- OrdersService
- components/Skeleton.tsx
- Phase 3.1 — Human Review Preparation and Master Backlog Critique
- getSeoConfig
- wiki/[slug]/page.tsx
- compilerOptions
- PaymentService
- scripts
@ -128,7 +128,7 @@
- Operational Rules & Boundaries
- Operational Rules & Boundaries
- Operational Rules & Boundaries
- MetricsController
- auth.controller.ts
- AppService
- Spinner.tsx
- Vazirmatn Changelog
@ -138,12 +138,12 @@
- compilerOptions
- backend/README.md
- AdminService
- B2BService
- Body
- Repository Map
- validate_integrity.js
- admin-panel/package.json
- Sahel-Font
- zibal-ebank.service.ts
- torob.controller.ts
- Reports.tsx
- Sahel-Font
- Role & Core Objective
@ -159,15 +159,15 @@
- application/package.json
- start-dev.js
- generate-openapi.js
- lib/services/api.ts
- trust-seals/page.tsx
- SafeImage.tsx
- auth.service.ts
- System Discovery
- HomeController
- RouteErrorBoundary
- wiki/[slug]/page.tsx
- RegisterDto
- Product Requirement Document (PRD)
- @nestjs/swagger
- RevalidationService
- RedisService
- exclude
- Baseline Command Plan & Reconciled Command History
- seo-backfill.ts
@ -193,7 +193,7 @@
- uploads/[...path]/route.ts
- app/page.tsx
- نقشه جامع پوشش تست‌های سرتاسری (E2E Test Coverage Map) — پروژه Canina
- app.e2e-spec.js
- WikiService
- API Contract Specification
- ⚙️ Backend Technical Review (05_dev_backend)
- 🎨 Frontend & Admin Panel Technical Review (06_dev_frontend)
@ -211,14 +211,14 @@
- Raw Finding Verification & Disposition Report
- React + TypeScript + Vite
- Select.tsx
- toPersian
- AuthModal.tsx
- @tailwindcss/postcss
- prisma
- application/README.md
- deploy.sh
- 🔒 Security & Performance Review (09_devops_security)
- 👁️ UX & Persona Interface Review (08_visual_qa)
- bcrypt
- VerifyOtpDto
- prisma/scientificTerms.ts
- seed-blogs.ts
- seed-custom.ts
@ -234,7 +234,7 @@
- sync_honest_manifest.js
- sync_manifest.js
- FormField.tsx
- eslint-config-next
- AuthController
- Textarea.tsx
- admin-panel/tsconfig.json
- tailwindcss
@ -303,8 +303,9 @@
- reflect-metadata
- typescript-eslint
- swagger-ui-express
- track/page.tsx
- eslint-config-prettier
- @eslint/js
- class-transformer
- @eslint/eslintrc
- jest
- @nestjs/cli
@ -322,7 +323,9 @@
- @types/react-dom
- @types/supertest
- eslint-plugin-react-refresh
- eslint
- typescript-eslint
- tailwindcss
## God Nodes (most connected - your core abstractions)
1. `Roles()` - 108 edges
@ -349,31 +352,31 @@
backend/src/orders/orders.controller.ts → frontend/admin-panel/src/types/admin.ts
## Import Cycles
- 3-file cycle: `frontend/application/lib/services/api.ts -> frontend/application/lib/store/userStore.ts -> frontend/application/lib/store/cartStore.ts -> frontend/application/lib/services/api.ts`
- 3-file cycle: `frontend/application/lib/services/api.ts -> frontend/application/lib/store/userStore.ts -> frontend/application/lib/services/authService.ts -> frontend/application/lib/services/api.ts`
- 3-file cycle: `frontend/application/lib/services/api.ts -> frontend/application/lib/store/userStore.ts -> frontend/application/lib/store/cartStore.ts -> frontend/application/lib/services/api.ts`
- 4-file cycle: `frontend/application/lib/services/api.ts -> frontend/application/lib/store/userStore.ts -> frontend/application/lib/store/cartStore.ts -> frontend/application/lib/services/orderService.ts -> frontend/application/lib/services/api.ts`
## Communities (328 total, 113 thin omitted)
## Communities (331 total, 115 thin omitted)
### Community 0 - "Roles"
Cohesion: 0.24
Nodes (13): Roles(), PaymentController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Get (+5 more)
### Community 1 - "app.module.ts"
Cohesion: 0.07
Nodes (32): BannersModule, Module, CmsModule, Module, SmsModule, Global, Module, ContactModule (+24 more)
Cohesion: 0.06
Nodes (39): AdminModule, Module, B2BModule, Module, BannersModule, Module, CmsModule, Module (+31 more)
### Community 2 - "VetGallery.tsx"
Cohesion: 0.15
Nodes (13): BackButton(), BackButtonProps, VideoModalPlayer, DisplayVideoItem, FALLBACK_VIDEOS, TestimonialItem, VetGallery(), PLAYBACK_RATES (+5 more)
### Community 2 - "BlogsService"
Cohesion: 0.13
Nodes (5): BlogsModule, Module, BlogFilterDto, BlogsService, Injectable
### Community 3 - "productService.ts"
Cohesion: 0.06
Nodes (40): buildTorobProductSpec(), buildTorobProductTitle(), dynamic, GET(), revalidate, dynamic, GET(), revalidate (+32 more)
Nodes (35): revalidate, DEFAULT_CATEGORIES, dynamic, revalidate, dynamic, revalidate, BlogCategory, BlogPostItem (+27 more)
### Community 4 - "useSettingsStore"
Cohesion: 0.08
Nodes (28): AuthModal, B2BPortal, CartDrawer, ClientLayout(), LoginModal, metadata, ArchivePage(), BrandLogo() (+20 more)
Cohesion: 0.07
Nodes (31): AuthModal, B2BPortal, CartDrawer, ClientLayout(), metadata, ArchivePage(), B2BLandingClient(), BrandLogo() (+23 more)
### Community 5 - "CmsController"
Cohesion: 0.09
@ -393,7 +396,7 @@ Nodes (27): SmsEventDefinition, SmsService, Injectable, SmsLogQueryDto, ApiPrope
### Community 9 - "devDependencies"
Cohesion: 0.22
Nodes (9): devDependencies, eslint, @types/bcryptjs, @types/node, typescript, eslint, @types/node, typescript (+1 more)
Nodes (9): devDependencies, @eslint/js, @types/bcryptjs, @types/node, typescript, @eslint/js, @types/node, typescript (+1 more)
### Community 10 - "reviews.controller.ts"
Cohesion: 0.07
@ -408,12 +411,12 @@ Cohesion: 0.06
Nodes (24): backend, frontend, playwright.config.ts, @playwright/test, tests/**/*.ts, authFile, test, compilerOptions (+16 more)
### Community 13 - "app-audit-verification.e2e-spec.js"
Cohesion: 0.06
Nodes (28): AppModule, Module, EnvironmentVariables, IsNotEmpty, IsOptional, IsString, validateEnv(), CustomHttpExceptionFilter (+20 more)
Cohesion: 0.07
Nodes (26): EnvironmentVariables, IsNotEmpty, IsOptional, IsString, validateEnv(), CustomHttpExceptionFilter, Catch, PrismaExceptionFilter (+18 more)
### Community 14 - "UserDashboard.tsx"
Cohesion: 0.13
Nodes (22): AddressFormData, AddressModal(), AddressModalProps, normalizeDigits(), validateAddressForm(), CheckoutPage(), DeleteConfirmModal(), DeleteConfirmModalProps (+14 more)
Cohesion: 0.09
Nodes (32): AddressFormData, AddressModal(), AddressModalProps, normalizeDigits(), validateAddressForm(), BackButton(), BackButtonProps, BlogPreviewSection() (+24 more)
### Community 15 - "src/services/api.ts"
Cohesion: 0.06
@ -427,12 +430,12 @@ Nodes (24): DoctorsController, ApiBearerAuth, ApiOperation, ApiTags, Body, Contr
Cohesion: 0.14
Nodes (18): B2BPage(), generateMetadata(), ContactPage(), generateMetadata(), generateMetadata(), getInitialVideos(), Videos(), ContactFormClient() (+10 more)
### Community 18 - "JwtAuthGuard"
Cohesion: 0.18
Nodes (7): JwtAuthGuard, Injectable, ROLES_KEY, RequestWithUser, RolesGuard, Injectable, ScientificTermData
### Community 18 - "admin.module.ts"
Cohesion: 0.10
Nodes (12): MediaService, Injectable, SslCertInfo, JwtAuthGuard, Injectable, B2BWholesaleOrderItem, ROLES_KEY, SortOrder (+4 more)
### Community 19 - "admin.controller.ts"
Cohesion: 0.35
Cohesion: 0.29
Nodes (12): ApplyGlobalMarginsDto, BulkPriceAdjustmentDto, ApiProperty, ApiPropertyOptional, IsArray, IsBoolean, IsIn, IsNumber (+4 more)
### Community 20 - "CreateVideoDto"
@ -491,9 +494,9 @@ Nodes (21): App(), ContactInfoItem, ContactSubmission, CategoryDist, DashboardDa
Cohesion: 0.10
Nodes (20): ApiProperty, ApiPropertyOptional, IsNotEmpty, IsOptional, IsString, WholesaleApplyDto, ApiBearerAuth, ApiOperation (+12 more)
### Community 34 - "B2BController"
Cohesion: 0.14
Nodes (13): B2BController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Get, Param (+5 more)
### Community 34 - "B2BService"
Cohesion: 0.13
Nodes (15): B2BController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Get, Param (+7 more)
### Community 35 - "ContactService"
Cohesion: 0.13
@ -527,13 +530,13 @@ Nodes (26): For /graphify add and --watch, For /graphify query, For the commit h
Cohesion: 0.13
Nodes (14): SslController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Get, Post (+6 more)
### Community 43 - "BannersController"
### Community 43 - "BannersService"
Cohesion: 0.13
Nodes (13): BannersController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Delete, Get (+5 more)
Nodes (15): BannersController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Delete, Get (+7 more)
### Community 44 - "TestimonialsController"
### Community 44 - "TestimonialsService"
Cohesion: 0.13
Nodes (12): TestimonialsController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Delete, Get (+4 more)
Nodes (14): TestimonialsController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Delete, Get (+6 more)
### Community 45 - "What You Must Do When Invoked"
Cohesion: 0.07
@ -543,13 +546,13 @@ Nodes (26): For /graphify add and --watch, For /graphify query, For the commit h
Cohesion: 0.27
Nodes (14): "coupons", "health_logs", "order_items", "orders", "pet_medical_conditions", "pets", "product_ingredients", "product_symptoms" (+6 more)
### Community 47 - "IngredientsController"
### Community 47 - "IngredientsService"
Cohesion: 0.13
Nodes (12): IngredientsController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Delete, Get (+4 more)
Nodes (14): IngredientsController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Delete, Get (+6 more)
### Community 48 - "WikiController"
Cohesion: 0.13
Nodes (13): ApiNotFoundResponse, ApiOkResponse, ApiOperation, ApiTags, Controller, Get, Param, Query (+5 more)
Cohesion: 0.21
Nodes (9): ApiNotFoundResponse, ApiOkResponse, ApiOperation, ApiTags, Controller, Get, Param, Query (+1 more)
### Community 49 - "devDependencies"
Cohesion: 0.11
@ -557,7 +560,7 @@ Nodes (19): autoprefixer, devDependencies, autoprefixer, eslint, @eslint/js, glo
### Community 50 - "devDependencies"
Cohesion: 0.12
Nodes (17): devDependencies, eslint, jsdom, tailwindcss, @testing-library/jest-dom, @testing-library/react, @types/node, @types/react (+9 more)
Nodes (17): eslint-config-next, devDependencies, eslint, eslint-config-next, jsdom, @testing-library/jest-dom, @testing-library/react, @types/node (+9 more)
### Community 51 - "BlogsController"
Cohesion: 0.07
@ -587,21 +590,17 @@ Nodes (15): Badge(), BadgeProps, BadgeVariant, variantStyles, Skeleton(), Monito
Cohesion: 0.09
Nodes (22): CREATE MODE — Normal Operation, Expected JSON Output Schema, File Scope Boundary, Forbidden Actions, MODE 1: REVIEW (called during Review Phase), MODE 2: CONTENT CREATION (standalone task from backlog), Operating Modes, Operational Rules & Boundaries (+14 more)
### Community 58 - "AuthService"
Cohesion: 0.22
Nodes (3): AuthService, Injectable, normalizeMobile()
### Community 59 - "compilerOptions"
Cohesion: 0.06
Nodes (30): compilerOptions, allowSyntheticDefaultImports, baseUrl, declaration, emitDecoratorMetadata, esModuleInterop, experimentalDecorators, forceConsistentCasingInFileNames (+22 more)
### Community 60 - "CreateUserDto"
Cohesion: 0.21
Nodes (10): CreateUserDto, ApiProperty, ApiPropertyOptional, IsEmail, IsNotEmpty, IsNumber, IsOptional, IsString (+2 more)
Cohesion: 0.18
Nodes (11): CreateUserDto, ApiProperty, ApiPropertyOptional, IsEmail, IsNotEmpty, IsNumber, IsOptional, IsString (+3 more)
### Community 61 - "ProductPage.tsx"
Cohesion: 0.11
Nodes (32): ArchiveProductCard(), CATEGORY_MAP, ICON_MAP, FeaturedProducts(), ProductCard(), Header(), OrderSuccess(), OrderTracking() (+24 more)
Cohesion: 0.12
Nodes (30): ArchiveProductCard(), CATEGORY_MAP, ICON_MAP, FeaturedProducts(), ProductCard(), OrderSuccess(), PetProfile(), ProductImageZoomModalProps (+22 more)
### Community 62 - "ReportsController"
Cohesion: 0.14
@ -609,27 +608,27 @@ Nodes (11): ReportsController, ApiBearerAuth, ApiOperation, ApiQuery, ApiTags, C
### Community 63 - "dependencies"
Cohesion: 0.09
Nodes (23): dependencies, bcryptjs, class-transformer, class-validator, compression, ioredis, @nestjs/common, @nestjs/passport (+15 more)
Nodes (23): dependencies, bcrypt, bcryptjs, class-validator, compression, ioredis, @nestjs/common, @nestjs/passport (+15 more)
### Community 64 - "compilerOptions"
Cohesion: 0.10
Nodes (20): compilerOptions, allowImportingTsExtensions, erasableSyntaxOnly, lib, module, moduleDetection, moduleResolution, noEmit (+12 more)
### Community 65 - "admin.service.ts"
Cohesion: 0.21
Cohesion: 0.22
Nodes (8): CouponTargetInput, PaginationQuery, applyRounding(), calculateSellingPrice(), DEFAULT_PRICING_SETTINGS, PricingSettings, RoundingMode, CANONICAL_ALIASES
### Community 66 - "ApiOperation"
Cohesion: 0.13
Nodes (9): ApiOperation, ApiQuery, Get, Query, AdminProductQueryDto, AdminQueryDto, ApiPropertyOptional, IsOptional (+1 more)
### Community 66 - "AdminQueryDto"
Cohesion: 0.18
Nodes (8): ApiQuery, Get, Query, AdminProductQueryDto, AdminQueryDto, ApiPropertyOptional, IsOptional, IsString
### Community 67 - "admin.module.ts"
Cohesion: 0.06
Nodes (23): AdminModule, Module, MediaService, Injectable, PetsController, ApiBearerAuth, ApiOperation, ApiQuery (+15 more)
### Community 67 - "PetsController"
Cohesion: 0.11
Nodes (13): PetsController, ApiBearerAuth, ApiOperation, ApiQuery, ApiTags, Controller, Delete, Get (+5 more)
### Community 68 - "HomeClient.tsx"
Cohesion: 0.11
Nodes (19): HomeClient(), HomeClientProps, BannerPlacement(), BannerPlacementProps, BlogPreviewSection(), FAQSection(), Hero(), StatCounter() (+11 more)
Cohesion: 0.14
Nodes (17): HomeClient(), HomeClientProps, BannerPlacement(), BannerPlacementProps, Hero(), StatCounter(), B2BInquiry, Banner (+9 more)
### Community 69 - "Required Review Group Closures"
Cohesion: 0.10
@ -659,9 +658,9 @@ Nodes (14): ApiBearerAuth, ApiOperation, ApiQuery, ApiTags, Body, Controller, De
Cohesion: 0.08
Nodes (32): CreateHealthLogDto, ApiProperty, ApiPropertyOptional, IsNotEmpty, IsOptional, IsString, CreateReminderDto, ApiProperty (+24 more)
### Community 76 - "ProductsService"
### Community 76 - "RevalidationService"
Cohesion: 0.07
Nodes (27): GetProductsDto, ApiPropertyOptional, IsEnum, IsOptional, IsString, ProductsController, ApiOperation, ApiTags (+19 more)
Nodes (24): RevalidationModule, Global, Module, RevalidationService, Injectable, GetProductsDto, ApiPropertyOptional, IsEnum (+16 more)
### Community 77 - "seo.module.ts"
Cohesion: 0.16
@ -695,9 +694,9 @@ Nodes (21): dependencies, axios, lucide-react, react, react-dom, react-hot-toast
Cohesion: 0.12
Nodes (16): 1. Active Secret Scanning (All Modified Files), 2. Docker Container Verification (if Dockerfile exists), 3. CI/CD Basic Check (if `.github/workflows/` exists), 4. Failure Routing Protocol, 5. Forbidden Actions, ENFORCE MODE — Normal Operation, Expected JSON Output Schema, Operational Rules & Boundaries (+8 more)
### Community 85 - "auth.service.ts"
Cohesion: 0.06
Nodes (46): AuthController, ApiBadRequestResponse, ApiBearerAuth, ApiOkResponse, ApiOperation, ApiTags, Body, Controller (+38 more)
### Community 85 - ".sendOtp"
Cohesion: 0.32
Nodes (10): ApiBadRequestResponse, ApiBearerAuth, ApiOkResponse, ApiOperation, Body, Post, Req, Throttle (+2 more)
### Community 86 - "zibal.service.ts"
Cohesion: 0.16
@ -715,17 +714,17 @@ Nodes (8): CreateEBankCheckoutDto, ApiProperty, ApiPropertyOptional, IsNotEmpty,
Cohesion: 0.17
Nodes (12): prisma, main(), prisma, determineSuitableFor(), findOrCreateCategory(), getProductImageUrl(), main(), parseSize() (+4 more)
### Community 90 - "cartStore.ts"
Cohesion: 0.15
Nodes (8): ApiErr, Order, OrderItem, OrderService, CartItem, CartStore, Order, mockProduct
### Community 90 - "lib/services/api.ts"
Cohesion: 0.09
Nodes (26): VerifyContent(), B2BPortal(), ContactInfoItem, Header(), MENU_ICONS, PrescriptionUploadModal(), PrescriptionUploadModalProps, UserDashboard() (+18 more)
### Community 91 - "Reconciled Audit Roles & Assignments"
Cohesion: 0.12
Nodes (15): 10. Documentation Engineer, 1. Lead Architect / Orchestrator, 2. React / Vite Storefront Auditor, 3. NestJS Backend Auditor, 4. Admin Features Auditor, 5. Database & Data Integrity Auditor, 6. Security Auditor, 7. TypeScript & Code Quality Auditor (+7 more)
### Community 92 - "OrdersService"
Cohesion: 0.06
Nodes (35): CreateOrderDto, OrderItemDto, ApiProperty, ApiPropertyOptional, IsArray, IsNotEmpty, IsNumber, IsOptional (+27 more)
Cohesion: 0.07
Nodes (29): CreateOrderDto, OrderItemDto, ApiProperty, ApiPropertyOptional, IsArray, IsNotEmpty, IsNumber, IsOptional (+21 more)
### Community 93 - "components/Skeleton.tsx"
Cohesion: 0.24
@ -735,9 +734,9 @@ Nodes (4): OrderRowSkeleton(), PetProfileSkeleton(), Skeleton(), SkeletonProps
Cohesion: 0.13
Nodes (14): 10. Dependency & Wave Adjustments, 11. Acceptance Criteria Refinements, 12. Business and Product Decision Classification, 13. Final Recommended Backlog Summary, 1. Executive Assessment, 2. Findings That Require No Change, 3. Findings Requiring Task Refinements, 4. Tasks Requiring Splitting (+6 more)
### Community 95 - "getSeoConfig"
Cohesion: 0.26
Nodes (11): BlogPostPage(), generateMetadata(), getBlog(), revalidate, safeIso(), safeLocalDate(), generateMetadata(), revalidate (+3 more)
### Community 95 - "wiki/[slug]/page.tsx"
Cohesion: 0.24
Nodes (15): BlogPostPage(), generateMetadata(), getBlog(), revalidate, safeIso(), safeLocalDate(), generateMetadata(), generateMetadata() (+7 more)
### Community 96 - "compilerOptions"
Cohesion: 0.06
@ -785,11 +784,11 @@ Nodes (7): InitiatePaymentDto, InitiateWalletTopupDto, ApiProperty, ApiPropertyO
### Community 107 - "PaginationDto"
Cohesion: 0.07
Nodes (19): BlogsModule, Module, BlogFilterDto, BlogsService, Injectable, PaginationDto, SortOrder, ApiPropertyOptional (+11 more)
Nodes (23): PaginationDto, ApiPropertyOptional, IsEnum, IsInt, IsOptional, IsString, Min, Type (+15 more)
### Community 108 - "PrismaService"
Cohesion: 0.06
Nodes (27): CategoryQuery, PetQuery, WikiQuery, BannersService, Injectable, DEFAULT_SMS_RULES, SMS_EVENT_DEFINITIONS, SmsEventVariable (+19 more)
Nodes (25): CategoryQuery, PetQuery, WikiQuery, DEFAULT_SMS_RULES, SMS_EVENT_DEFINITIONS, SmsEventVariable, SmsRule, MeliPayamakPattern (+17 more)
### Community 109 - "1. Summary of Integrity Repairs Performed"
Cohesion: 0.17
@ -807,9 +806,9 @@ Nodes (10): 1. Mark Active Task as Complete, 2. Documentation Updates, 3. Dynami
Cohesion: 0.18
Nodes (10): 1. Pre-Deployment Checklist, 2. Build Verification, 3. Deployment Strategy (Based on Target), 4. Post-Deployment Health Check, 5. Forbidden Actions, Expected JSON Output Schema, Operational Rules & Boundaries, Required Output Artifacts (What files to write/update) (+2 more)
### Community 113 - "MetricsController"
Cohesion: 0.20
Nodes (5): ApiExcludeController, MetricsController, Controller, Get, Res
### Community 113 - "auth.controller.ts"
Cohesion: 0.16
Nodes (11): AdminLoginDto, ApiProperty, IsEmail, IsNotEmpty, IsString, MinLength, LoginDto, ApiProperty (+3 more)
### Community 114 - "AppService"
Cohesion: 0.29
@ -844,12 +843,12 @@ Cohesion: 0.20
Nodes (9): Compile and run the project, Deployment, Description, License, Project setup, Resources, Run tests, Stay in touch (+1 more)
### Community 122 - "AdminService"
Cohesion: 0.09
Nodes (13): AdminController, ApiBearerAuth, ApiTags, Body, Controller, Delete, Param, Post (+5 more)
Cohesion: 0.10
Nodes (11): AdminController, ApiBearerAuth, ApiOperation, ApiTags, Controller, Delete, Param, Put (+3 more)
### Community 123 - "B2BService"
Cohesion: 0.33
Nodes (5): B2BModule, Module, B2BService, B2BWholesaleOrderItem, Injectable
### Community 123 - "Body"
Cohesion: 0.21
Nodes (3): Body, Post, CouponInput
### Community 124 - "Repository Map"
Cohesion: 0.20
@ -867,9 +866,9 @@ Nodes (9): name, private, scripts, build, dev, lint, preview, type (+1 more)
Cohesion: 0.20
Nodes (9): Arch Linux, Contributors, Install, Known problems for variable version, License, Sahel-Font, To Do (variable), طریقه استفاده از نسخه متغیر variable (+1 more)
### Community 128 - "zibal-ebank.service.ts"
Cohesion: 0.40
Nodes (4): EBankCheckoutListFilter, EBankCheckoutOptions, EBankIdentifiedPaymentFilter, EBankStatementFilter
### Community 128 - "torob.controller.ts"
Cohesion: 0.22
Nodes (8): buildTorobProductSpec(), buildTorobProductTitle(), TorobController, ApiOperation, ApiTags, Controller, Get, Query
### Community 129 - "Reports.tsx"
Cohesion: 0.20
@ -931,9 +930,13 @@ Nodes (7): backend, distMainPath, fs, http, path, { spawn, execSync }, waitForBa
Cohesion: 0.25
Nodes (6): app_module_1, core_1, fs, path, swagger_1, yaml
### Community 144 - "lib/services/api.ts"
Cohesion: 0.09
Nodes (21): B2BLandingClient(), BlogPostClientProps, BlogPost, ContactInfoItem, FAQItem, OrderDetailsModalProps, PLAYBACK_RATES, PodcastInlinePlayer() (+13 more)
### Community 144 - "SafeImage.tsx"
Cohesion: 0.06
Nodes (34): buildTorobProductSpec(), buildTorobProductTitle(), dynamic, GET(), revalidate, dynamic, GET(), revalidate (+26 more)
### Community 145 - "auth.service.ts"
Cohesion: 0.22
Nodes (8): AdminLoginInput, LoginInput, RegisterInput, SendOtpDto, ApiProperty, IsNotEmpty, IsString, Matches
### Community 146 - "System Discovery"
Cohesion: 0.25
@ -947,17 +950,17 @@ Nodes (10): HomeController, ApiOkResponse, ApiOperation, ApiTags, Controller, Ge
Cohesion: 0.22
Nodes (3): Props, RouteErrorBoundary, State
### Community 149 - "wiki/[slug]/page.tsx"
Cohesion: 0.60
Nodes (5): generateMetadata(), getRelatedProducts(), getWikiTerm(), WikiTermPage(), generateMedicalWebPageSchema()
### Community 149 - "RegisterDto"
Cohesion: 0.22
Nodes (8): RegisterDto, ApiProperty, ApiPropertyOptional, IsEmail, IsNotEmpty, IsOptional, IsString, MinLength
### Community 150 - "Product Requirement Document (PRD)"
Cohesion: 0.29
Nodes (6): 1. Executive Vision, 2. Target Audience, 3. Functional Requirements, 4. Non-Functional Requirements (Performance, Security), 5. Epic / Feature Breakdown, Product Requirement Document (PRD)
### Community 152 - "RevalidationService"
Cohesion: 0.12
Nodes (8): Optional, RevalidationModule, Global, Module, RevalidationService, Injectable, RedisService, Injectable
### Community 152 - "RedisService"
Cohesion: 0.08
Nodes (13): ApiExcludeController, Optional, AppModule, Module, MetricsController, Controller, Get, Res (+5 more)
### Community 153 - "exclude"
Cohesion: 0.22
@ -1055,10 +1058,6 @@ Nodes (3): generateMetadata(), getHomeData(), Home()
Cohesion: 0.33
Nodes (5): نقشه جامع پوشش تست‌های سرتاسری (E2E Test Coverage Map) — پروژه Canina, ۱. معماری و نقش‌های کاربری (User Roles), ۲. ماتریس جریان‌ها و قابلیت‌های کاربرمحور (Feature & Flow Matrix), ۳. وضعیت پوشش نهایی سوئیت ۱۱گانه (Final 11 Test Suites Status), ۴. راهنمای نگهداری و افزودن فیچرهای جدید بدون شکستن تست‌ها (Developer Maintenance Guide)
### Community 179 - "app.e2e-spec.js"
Cohesion: 0.50
Nodes (3): app_module_1, supertest_1, testing_1
### Community 180 - "API Contract Specification"
Cohesion: 0.50
Nodes (3): 1. OpenAPI 3.0 (Swagger) Specification, 2. Endpoint Definitions & Data Types, API Contract Specification
@ -1076,7 +1075,7 @@ Cohesion: 0.50
Nodes (3): Overview & Content Foundation, SEO & Content Requirements, 🚀 SEO & Content Strategy Review (12_seo_content)
### Community 184 - "FaqService"
Cohesion: 0.33
Cohesion: 0.36
Nodes (4): FaqModule, Module, FaqService, Injectable
### Community 185 - "Reviews.tsx"
@ -1107,9 +1106,9 @@ Nodes (3): Expanding the ESLint configuration, React Compiler, React + TypeScrip
Cohesion: 0.50
Nodes (3): Select, SelectOption, SelectProps
### Community 197 - "toPersian"
Cohesion: 0.07
Nodes (33): VerifyContent(), AuthModal(), AuthModalProps, extractOtpFromText(), otpCooldownExpiries, B2BPortal(), CartDrawer(), HeaderButton() (+25 more)
### Community 197 - "AuthModal.tsx"
Cohesion: 0.09
Nodes (16): LoginModal, AuthModal(), AuthModalProps, extractOtpFromText(), otpCooldownExpiries, NOTE: We intentionally do NOT use navigator.credentials.get (WebOTP API) here, IMPORTANT: only depend on isOpen here — NOT subView. If we depend on subView,, LoginModal() (+8 more)
### Community 200 - "application/README.md"
Cohesion: 0.50
@ -1119,10 +1118,18 @@ Nodes (3): Deploy on Vercel, Getting Started, Learn More
Cohesion: 0.50
Nodes (3): COMPOSE_DOCKER_CLI_BUILD, DOCKER_BUILDKIT, deploy.sh script
### Community 204 - "VerifyOtpDto"
Cohesion: 0.29
Nodes (6): ApiProperty, IsNotEmpty, IsString, Matches, VerifyOtpDto, Length
### Community 211 - "Master Task Backlog (Phase 3.3)"
Cohesion: 0.67
Nodes (3): ADR-AUTH-001: Admin Panel Authentication Architecture & Token Management, Master Task Backlog (Phase 3.3), Phase 3 Master Execution Plan
### Community 220 - "AuthController"
Cohesion: 0.40
Nodes (3): AuthController, ApiTags, Controller
### Community 226 - "Shabnam Font README"
Cohesion: 0.67
Nodes (3): Shabnam Font README, Shabnam Font Sample, Vazir Font
@ -1138,22 +1145,22 @@ Nodes (3): GET(), handleRevalidate(), POST()
## Knowledge Gaps
- **1355 isolated node(s):** `$schema`, `collection`, `sourceRoot`, `deleteOutDir`, `name` (+1350 more)
These have ≤1 connection - possible missing edges or undocumented components.
- **113 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
- **115 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
## Suggested Questions
_Questions this graph is uniquely positioned to answer:_
- **Why does `Roles()` connect `Roles` to `WholesaleApplyDto`, `B2BController`, `ContactService`, `FaqController`, `CmsController`, `tickets.controller.ts`, `SmsService`, `SslController`, `BannersController`, `ProductsService`, `reviews.controller.ts`, `TestimonialsController`, `IngredientsController`, `JwtAuthGuard`, `prescriptions.controller.ts`, `SmartAdvisorService`, `MenuService`, `B2BService`?**
- **Why does `Roles()` connect `Roles` to `WholesaleApplyDto`, `B2BService`, `ContactService`, `FaqController`, `CmsController`, `tickets.controller.ts`, `SmsService`, `SslController`, `BannersService`, `RevalidationService`, `reviews.controller.ts`, `TestimonialsService`, `IngredientsService`, `admin.module.ts`, `prescriptions.controller.ts`, `SmartAdvisorService`, `MenuService`, `FaqService`?**
_High betweenness centrality (0.093) - this node is a cross-community bridge._
- **Why does `ApiResponse` connect `src/services/api.ts` to `BlogsController`, `PetsController`, `ProductsService`, `UsersService`, `WikiController`, `HomeController`, `auth.service.ts`, `OrdersService`?**
- **Why does `ApiResponse` connect `src/services/api.ts` to `BlogsController`, `PetsController`, `RevalidationService`, `UsersService`, `OrdersService`, `WikiController`, `HomeController`, `AuthController`?**
_High betweenness centrality (0.066) - this node is a cross-community bridge._
- **Why does `JwtAuthGuard` connect `JwtAuthGuard` to `app.module.ts`, `admin.module.ts`, `CmsController`, `tickets.controller.ts`, `reviews.controller.ts`, `PaginationDto`, `ProductsService`, `UsersService`, `admin.controller.ts`, `prescriptions.controller.ts`, `auth.service.ts`, `pets/pets.controller.ts`, `B2BService`, `OrdersService`?**
- **Why does `JwtAuthGuard` connect `admin.module.ts` to `CmsController`, `tickets.controller.ts`, `reviews.controller.ts`, `PaginationDto`, `RevalidationService`, `UsersService`, `DoctorQueryDto`, `auth.controller.ts`, `admin.controller.ts`, `prescriptions.controller.ts`, `pets/pets.controller.ts`, `FaqService`?**
_High betweenness centrality (0.030) - this node is a cross-community bridge._
- **What connects `$schema`, `collection`, `sourceRoot` to the rest of the system?**
_1355 weakly-connected nodes found - possible documentation gaps or missing edges._
- **Should `app.module.ts` be split into smaller, more focused modules?**
_Cohesion score 0.07137254901960784 - nodes in this community are weakly interconnected._
_Cohesion score 0.06140350877192982 - nodes in this community are weakly interconnected._
- **Should `BlogsService` be split into smaller, more focused modules?**
_Cohesion score 0.13333333333333333 - nodes in this community are weakly interconnected._
- **Should `productService.ts` be split into smaller, more focused modules?**
_Cohesion score 0.05839727195225917 - nodes in this community are weakly interconnected._
- **Should `useSettingsStore` be split into smaller, more focused modules?**
_Cohesion score 0.0782608695652174 - nodes in this community are weakly interconnected._
_Cohesion score 0.05961538461538462 - nodes in this community are weakly interconnected._

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff