fix(types): strictly type prescriptions, orders and media, clear lint errors
All checks were successful
Deploy Canina / deploy (push) Successful in 30s

This commit is contained in:
parsa aghaei 2026-08-18 16:00:46 +03:30
parent 6977f1d6e4
commit b494f95760
15 changed files with 3959 additions and 3945 deletions

View File

@ -1,5 +1,5 @@
import { useState, useEffect, useRef, useCallback } from 'react';
import { Upload, Image as ImageIcon, Trash2, Copy, CheckCircle2, Search, X, FolderOpen, Video, FileText, Music, Play, Eye } from 'lucide-react';
import { Upload, Image as ImageIcon, Trash2, Copy, CheckCircle2, Search, X, FolderOpen, FileText, Music, Play } from 'lucide-react';
import { toast } from 'react-hot-toast';
import api, { BASE_DOMAIN } from '../services/api';
import Spinner from '../components/ui/Spinner';
@ -342,7 +342,7 @@ export default function MediaManager() {
<button
key={tab.id}
type="button"
onClick={() => { setFilterType(tab.id as any); setPage(1); }}
onClick={() => { setFilterType(tab.id as 'all' | 'image' | 'video' | 'audio' | 'pdf'); setPage(1); }}
className={`px-3 py-1.5 rounded-xl text-xs font-bold transition-all cursor-pointer ${
filterType === tab.id
? 'bg-purple-600 text-white shadow-xs'

View File

@ -74,6 +74,7 @@ export interface Order {
firstName?: string;
lastName?: string;
mobile?: string;
phone?: string;
email?: string;
};
address?: {

View File

@ -1,5 +1,5 @@
import { useState, useEffect } from 'react';
import { FileText, Eye, CheckCircle2, XCircle, Clock, Filter, X, ExternalLink, Plus, Package, Phone, User, Dog, Cat } from 'lucide-react';
import { FileText, Eye, CheckCircle2, XCircle, Clock, Filter, X, Package, User, Dog, Cat } from 'lucide-react';
import { toast } from 'react-hot-toast';
import api, { BASE_DOMAIN } from '../services/api';
import Spinner from '../components/ui/Spinner';
@ -189,7 +189,7 @@ export default function PrescriptionsManager() {
<td colSpan={6} className="py-12 text-center text-gray-500 font-medium">هیچ نسخهای با این فیلتر یافت نشد</td>
</tr>
) : (
filteredPrescriptions.map((rx: any) => {
filteredPrescriptions.map((rx: Prescription) => {
const fullFile = getFileFullUrl(rx.fileUrl);
return (
<tr key={rx.id} className="hover:bg-gray-50/50 transition-colors">
@ -285,13 +285,13 @@ export default function PrescriptionsManager() {
{/* Pet & User Details Card */}
<div className="p-4 bg-gray-50 rounded-2xl border border-gray-200 text-xs space-y-2">
<div className="flex items-center justify-between">
<span className="font-bold text-gray-700">سرپرست: {(selectedRx as any).user ? `${(selectedRx as any).user.firstName || ''} ${(selectedRx as any).user.lastName || ''}`.trim() || (selectedRx as any).user.mobile : 'کاربر مهمان'}</span>
<span className="font-mono text-gray-600">{(selectedRx as any).user?.mobile || '-'}</span>
<span className="font-bold text-gray-700">سرپرست: {selectedRx.user ? `${selectedRx.user.firstName || ''} ${selectedRx.user.lastName || ''}`.trim() || selectedRx.user.mobile : 'کاربر مهمان'}</span>
<span className="font-mono text-gray-600">{selectedRx.user?.mobile || '-'}</span>
</div>
{(selectedRx as any).pet && (
{selectedRx.pet && (
<div className="pt-2 border-t border-gray-200 flex items-center justify-between text-purple-900 font-bold">
<span>همدم: {(selectedRx as any).pet.name} ({(selectedRx as any).pet.type} - {(selectedRx as any).pet.breed})</span>
<span>وزن: {(selectedRx as any).pet.weight} kg | سن: {(selectedRx as any).pet.age} سال</span>
<span>همدم: {selectedRx.pet.name} ({selectedRx.pet.type} - {selectedRx.pet.breed})</span>
<span>وزن: {selectedRx.pet.weight} kg | سن: {selectedRx.pet.age} سال</span>
</div>
)}
{selectedRx.notes && (

View File

@ -131,6 +131,21 @@ export interface Prescription {
adminNotes?: string;
createdAt: string;
updatedAt: string;
user?: {
id?: string;
firstName?: string;
lastName?: string;
mobile?: string;
email?: string;
};
pet?: {
id?: string;
name?: string;
type?: string;
breed?: string;
weight?: number;
age?: number;
};
}
export interface B2BInquiry {

View File

@ -13,12 +13,12 @@
"11": "useSettingsStore",
"12": "adminRoutes.tsx",
"13": "PrismaService",
"14": "BlogsController",
"14": "videos.controller.ts",
"15": "ProductsService",
"16": "lib/services/api.ts",
"17": "CreateVideoDto",
"18": "src/services/api.ts",
"19": "eslint-plugin-prettier",
"19": "LoginDto",
"20": "BE-001",
"21": "Roles",
"22": "FE-001",
@ -70,7 +70,7 @@
"68": "Operational Rules & Boundaries",
"69": "WikiController",
"70": "ApiOperation",
"71": "pets/pets.controller.ts",
"71": "PetsController",
"72": "seo.module.ts",
"73": "admin.service.ts",
"74": "🏢 AI Software Agency — Master Orchestration Protocol v3",
@ -101,17 +101,17 @@
"99": "Comprehensive Change Log",
"100": "Operational Rules & Boundaries",
"101": "CreateOrderDto",
"102": ".update",
"102": "eslint",
"103": ".handleZibalCallback",
"104": "auth.service.ts",
"105": "1. Summary of Integrity Repairs Performed",
"106": "eslint-config-prettier",
"106": "reflect-metadata",
"107": "Operational Rules & Boundaries",
"108": "Operational Rules & Boundaries",
"109": "Operational Rules & Boundaries",
"110": "AppService",
"111": "auth.controller.ts",
"112": "@types/react-dom",
"111": "AdminLoginDto",
"112": "eslint-plugin-prettier",
"113": "Vazirmatn Changelog",
"114": "Vazirmatn Font فونت وزیرمتن",
"115": "Operational Rules & Boundaries",
@ -128,7 +128,7 @@
"126": "Role & Core Objective",
"127": "orchestrate.py",
"128": "backend/package.json",
"129": "PetsService",
"129": "eslint-config-next",
"130": "graphify reference: extra exports and benchmark",
"131": "Phase 2 Final Quality Gate Summary Report",
"132": "Task Modifications Log",
@ -212,7 +212,7 @@
"210": "sync_manifest.js",
"211": "@types/multer",
"212": "ProductDto",
"213": "PetsController",
"213": "@testing-library/jest-dom",
"214": "RedisService",
"215": "WikiService",
"216": "FormField.tsx",
@ -231,7 +231,6 @@
"229": "eslint-plugin-react-refresh",
"230": "@tailwindcss/postcss",
"231": "typescript",
"232": "@testing-library/jest-dom",
"233": "@testing-library/react",
"234": "@types/react",
"235": "typescript",
@ -288,13 +287,10 @@
"286": "Shabnam Font Sample",
"287": "Production Docker Compose",
"288": "Staging Docker Compose",
"289": "CreateHealthLogDto",
"290": "CreateReminderDto",
"291": "NetworkBanner.tsx",
"292": "bcryptjs",
"293": "helmet",
"294": "js-yaml",
"295": "@nestjs/core",
"296": "@nestjs/jwt",
"297": "@nestjs/swagger",
"298": "@nestjs/throttler",

File diff suppressed because one or more lines are too long

View File

@ -13,12 +13,12 @@
"11": "useSettingsStore",
"12": "adminRoutes.tsx",
"13": "PrismaService",
"14": "BlogsController",
"14": "videos.controller.ts",
"15": "ProductsService",
"16": "lib/services/api.ts",
"17": "CreateVideoDto",
"18": "src/services/api.ts",
"19": "eslint",
"19": "LoginDto",
"20": "BE-001",
"21": "Roles",
"22": "FE-001",
@ -70,7 +70,7 @@
"68": "Operational Rules & Boundaries",
"69": "WikiController",
"70": "ApiOperation",
"71": "pets/pets.controller.ts",
"71": "PetsController",
"72": "seo.module.ts",
"73": "admin.service.ts",
"74": "🏢 AI Software Agency — Master Orchestration Protocol v3",
@ -101,7 +101,7 @@
"99": "Comprehensive Change Log",
"100": "Operational Rules & Boundaries",
"101": "CreateOrderDto",
"102": ".update",
"102": "eslint",
"103": ".handleZibalCallback",
"104": "auth.service.ts",
"105": "1. Summary of Integrity Repairs Performed",
@ -110,7 +110,7 @@
"108": "Operational Rules & Boundaries",
"109": "Operational Rules & Boundaries",
"110": "AppService",
"111": "auth.controller.ts",
"111": "AdminLoginDto",
"112": "@types/react-dom",
"113": "Vazirmatn Changelog",
"114": "Vazirmatn Font فونت وزیرمتن",
@ -128,7 +128,7 @@
"126": "Role & Core Objective",
"127": "orchestrate.py",
"128": "backend/package.json",
"129": "PetsService",
"129": "eslint-config-next",
"130": "graphify reference: extra exports and benchmark",
"131": "Phase 2 Final Quality Gate Summary Report",
"132": "Task Modifications Log",
@ -212,7 +212,6 @@
"210": "sync_manifest.js",
"211": "@types/multer",
"212": "ProductDto",
"213": "PetsController",
"214": "RedisService",
"215": "WikiService",
"216": "FormField.tsx",
@ -231,7 +230,6 @@
"229": "eslint-plugin-react-refresh",
"230": "@tailwindcss/postcss",
"231": "typescript",
"232": "@testing-library/jest-dom",
"233": "@testing-library/react",
"234": "@types/react",
"235": "typescript",
@ -288,8 +286,6 @@
"286": "Shabnam Font Sample",
"287": "Production Docker Compose",
"288": "Staging Docker Compose",
"289": "CreateHealthLogDto",
"290": "CreateReminderDto",
"291": "NetworkBanner.tsx",
"292": "bcryptjs",
"293": "helmet",
@ -311,5 +307,5 @@
"309": "tsconfig-paths",
"310": "@types/bcryptjs",
"311": "typescript-eslint",
"312": "globals"
"312": "tailwindcss"
}

View File

@ -1,16 +1,16 @@
# Graph Report - canina (2026-08-18)
## Corpus Check
- 511 files · ~734,432 words
- 511 files · ~734,435 words
- Verdict: corpus is large enough that graph structure adds value.
## Summary
- 3634 nodes · 6166 edges · 313 communities (196 shown, 117 thin omitted)
- 3635 nodes · 6167 edges · 309 communities (192 shown, 117 thin omitted)
- Extraction: 96% EXTRACTED · 4% INFERRED · 0% AMBIGUOUS · INFERRED: 228 edges (avg confidence: 0.79)
- Token cost: 0 input · 0 output
## Graph Freshness
- Built from commit: `95d79518`
- Built from commit: `0c2d104c`
- Run `git rev-parse HEAD` and compare to check if the graph is stale.
- Run `graphify update .` after code changes (no API cost).
@ -29,12 +29,12 @@
- useSettingsStore
- adminRoutes.tsx
- PrismaService
- BlogsController
- videos.controller.ts
- ProductsService
- lib/services/api.ts
- CreateVideoDto
- src/services/api.ts
- eslint
- LoginDto
- BE-001
- Roles
- FE-001
@ -86,7 +86,7 @@
- Operational Rules & Boundaries
- WikiController
- ApiOperation
- pets/pets.controller.ts
- PetsController
- seo.module.ts
- admin.service.ts
- 🏢 AI Software Agency — Master Orchestration Protocol v3
@ -117,7 +117,7 @@
- Comprehensive Change Log
- Operational Rules & Boundaries
- CreateOrderDto
- .update
- eslint
- .handleZibalCallback
- auth.service.ts
- 1. Summary of Integrity Repairs Performed
@ -126,7 +126,7 @@
- Operational Rules & Boundaries
- Operational Rules & Boundaries
- AppService
- auth.controller.ts
- AdminLoginDto
- @types/react-dom
- Vazirmatn Changelog
- Vazirmatn Font فونت وزیرمتن
@ -144,7 +144,7 @@
- Role & Core Objective
- orchestrate.py
- backend/package.json
- PetsService
- eslint-config-next
- graphify reference: extra exports and benchmark
- Phase 2 Final Quality Gate Summary Report
- Task Modifications Log
@ -228,7 +228,6 @@
- sync_manifest.js
- @types/multer
- ProductDto
- PetsController
- RedisService
- WikiService
- FormField.tsx
@ -247,7 +246,6 @@
- eslint-plugin-react-refresh
- @tailwindcss/postcss
- typescript
- @testing-library/jest-dom
- @testing-library/react
- @types/react
- typescript
@ -289,8 +287,6 @@
- Shabnam Font Sample
- Production Docker Compose
- Staging Docker Compose
- CreateHealthLogDto
- CreateReminderDto
- NetworkBanner.tsx
- bcryptjs
- helmet
@ -312,7 +308,7 @@
- tsconfig-paths
- @types/bcryptjs
- typescript-eslint
- globals
- tailwindcss
## God Nodes (most connected - your core abstractions)
1. `PrismaService` - 81 edges
@ -347,7 +343,7 @@
- **Rastikerdar Font Ecosystem** — frontend_application_public_fonts_shabnam_font_v5_0_1_readme, frontend_application_public_fonts_vazirmatn_v33_003_readme, vazir_font [EXTRACTED 0.95]
- **Canina Deployment Stack** — scripts_compose_prod, scripts_compose_stage [EXTRACTED 1.00]
## Communities (313 total, 117 thin omitted)
## Communities (309 total, 117 thin omitted)
### Community 0 - "AdminController"
Cohesion: 0.13
@ -362,8 +358,8 @@ Cohesion: 0.09
Nodes (24): CmsController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Delete, Get (+16 more)
### Community 3 - "app.module.ts"
Cohesion: 0.07
Nodes (36): B2BModule, Module, BannersModule, Module, CmsModule, Module, SmsModule, Global (+28 more)
Cohesion: 0.08
Nodes (34): B2BModule, Module, BannersModule, Module, CmsModule, Module, SmsModule, Global (+26 more)
### Community 4 - "CreateReviewDto"
Cohesion: 0.07
@ -405,9 +401,9 @@ Nodes (14): App(), ContactInfoItem, ContactSubmission, CategoryDist, DashboardDa
Cohesion: 0.09
Nodes (14): MeliPayamakPattern, MeliPayamakResponse, SendPatternSmsOptions, SmsConfig, SmsLogQuery, CreateContactSubmissionDto, UpdateContactInfoItemDto, DoctorQuery (+6 more)
### Community 14 - "BlogsController"
Cohesion: 0.13
Nodes (13): BlogsController, ApiNotFoundResponse, ApiOkResponse, ApiOperation, ApiTags, Controller, Get, Param (+5 more)
### Community 14 - "videos.controller.ts"
Cohesion: 0.22
Nodes (7): GetVideosQueryDto, ApiPropertyOptional, IsBoolean, IsOptional, Module, VideosModule, Transform
### Community 15 - "ProductsService"
Cohesion: 0.09
@ -422,8 +418,12 @@ Cohesion: 0.09
Nodes (24): CreateVideoDto, ApiProperty, ApiPropertyOptional, IsBoolean, IsNotEmpty, IsOptional, IsString, UpdateVideoDto (+16 more)
### Community 18 - "src/services/api.ts"
Cohesion: 0.12
Nodes (21): ProtectedRoute(), SEARCHABLE_PAGES, Topbar(), TopbarProps, Login(), B2BManager, SmartAdvisorManager, ApiErrorPayload (+13 more)
Cohesion: 0.10
Nodes (23): ProtectedRoute(), SEARCHABLE_PAGES, Topbar(), TopbarProps, Login(), B2BManager, SmartAdvisorManager, SystemSettingsPage (+15 more)
### Community 19 - "LoginDto"
Cohesion: 0.33
Nodes (5): LoginDto, ApiProperty, IsNotEmpty, IsString, MinLength
### Community 20 - "BE-001"
Cohesion: 0.06
@ -466,11 +466,11 @@ Cohesion: 0.10
Nodes (20): ApiProperty, ApiPropertyOptional, IsNotEmpty, IsOptional, IsString, WholesaleApplyDto, ApiBearerAuth, ApiOperation (+12 more)
### Community 30 - "main.ts"
Cohesion: 0.14
Nodes (9): CustomHttpExceptionFilter, Catch, PrismaExceptionFilter, Catch, DecimalInterceptor, Injectable, ApiErrorResponse, ErrorDetailField (+1 more)
Cohesion: 0.11
Nodes (11): AppModule, Module, CustomHttpExceptionFilter, Catch, PrismaExceptionFilter, Catch, DecimalInterceptor, Injectable (+3 more)
### Community 31 - "JwtAuthGuard"
Cohesion: 0.14
Cohesion: 0.15
Nodes (8): JwtAuthGuard, Injectable, B2BWholesaleOrderItem, ROLES_KEY, RequestWithUser, RolesGuard, Injectable, UserReqPayload
### Community 32 - "ZibalService"
@ -518,7 +518,7 @@ Cohesion: 0.13
Nodes (14): IngredientsController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Delete, Get (+6 more)
### Community 43 - "AuthService"
Cohesion: 0.18
Cohesion: 0.20
Nodes (3): AuthService, Injectable, normalizeMobile()
### Community 44 - "MediaController"
@ -566,16 +566,16 @@ Cohesion: 0.09
Nodes (20): Badge(), BadgeProps, BadgeVariant, variantStyles, ImagePreviewModal(), ImagePreviewModalProps, ToggleSwitch(), ToggleSwitchProps (+12 more)
### Community 56 - "compilerOptions"
Cohesion: 0.09
Nodes (22): compilerOptions, allowImportingTsExtensions, erasableSyntaxOnly, jsx, lib, module, moduleDetection, moduleResolution (+14 more)
Cohesion: 0.08
Nodes (23): compilerOptions, allowImportingTsExtensions, erasableSyntaxOnly, jsx, lib, module, moduleDetection, moduleResolution (+15 more)
### Community 57 - "admin.module.ts"
Cohesion: 0.06
Nodes (23): AdminModule, Module, BlogQuery, BlogsService, Injectable, PetsController, ApiBearerAuth, ApiOperation (+15 more)
### Community 58 - "PaginationDto"
Cohesion: 0.07
Nodes (24): PaginationDto, SortOrder, ApiPropertyOptional, IsEnum, IsInt, IsOptional, IsString, Min (+16 more)
Cohesion: 0.06
Nodes (32): BlogsController, ApiNotFoundResponse, ApiOkResponse, ApiOperation, ApiTags, Controller, Get, Param (+24 more)
### Community 59 - "dependencies"
Cohesion: 0.10
@ -606,8 +606,8 @@ Cohesion: 0.10
Nodes (19): 10. Orders Backend, 11. Settings & Administrative Backend, 12. Prisma Schema, Migrations & Seed, 13. Redis & Temporary Auth State, 14. Unit & E2E Tests, 15. Docker, NGINX, Prometheus & Deployment Config, 16. Documentation & OpenAPI Artifacts, 1. Storefront Shell & Routing (+11 more)
### Community 66 - "Coupons.tsx"
Cohesion: 0.10
Nodes (15): formatPriceWithCommas(), PriceInput(), PriceInputProps, toEnglishDigits(), Coupon, CouponFormData, CouponModalProps, CouponTarget (+7 more)
Cohesion: 0.12
Nodes (14): formatPriceWithCommas(), PriceInput(), PriceInputProps, toEnglishDigits(), Coupon, CouponFormData, CouponModalProps, CouponTarget (+6 more)
### Community 67 - "Operational Rules & Boundaries"
Cohesion: 0.11
@ -622,12 +622,12 @@ Cohesion: 0.13
Nodes (14): ApiBearerAuth, ApiOperation, ApiQuery, ApiTags, Body, Controller, Delete, Get (+6 more)
### Community 70 - "ApiOperation"
Cohesion: 0.15
Cohesion: 0.14
Nodes (8): ApiOperation, ApiQuery, Get, Query, AdminQueryDto, ApiPropertyOptional, IsOptional, IsString
### Community 71 - "pets/pets.controller.ts"
Cohesion: 0.16
Nodes (13): CreatePetDto, ApiProperty, ApiPropertyOptional, IsArray, IsNotEmpty, IsNumber, IsOptional, IsString (+5 more)
### Community 71 - "PetsController"
Cohesion: 0.05
Nodes (47): CreateHealthLogDto, ApiProperty, ApiPropertyOptional, IsNotEmpty, IsOptional, IsString, CreatePetDto, ApiProperty (+39 more)
### Community 72 - "seo.module.ts"
Cohesion: 0.16
@ -667,7 +667,7 @@ Nodes (9): GatewayHealthResult, IPaymentGateway, PaymentInquiryResult, PaymentRe
### Community 81 - "devDependencies"
Cohesion: 0.13
Nodes (15): eslint-config-next, devDependencies, eslint, eslint-config-next, jsdom, tailwindcss, @tailwindcss/postcss, @types/node (+7 more)
Nodes (15): devDependencies, eslint, jsdom, tailwindcss, @tailwindcss/postcss, @testing-library/jest-dom, @types/node, @vitejs/plugin-react (+7 more)
### Community 82 - "api"
Cohesion: 0.29
@ -679,7 +679,7 @@ Nodes (13): Skeleton(), getPaymentMethodLabel(), Order, ORDER_STATUS_MAP, OrderI
### Community 84 - "devDependencies"
Cohesion: 0.11
Nodes (19): autoprefixer, devDependencies, autoprefixer, eslint, @eslint/js, postcss, tailwindcss, @types/node (+11 more)
Nodes (19): autoprefixer, devDependencies, autoprefixer, eslint, @eslint/js, globals, postcss, @types/node (+11 more)
### Community 85 - "seed-products.ts"
Cohesion: 0.17
@ -745,16 +745,12 @@ Nodes (11): 1. Detect Test Runner from Tech Stack, 2. Execution Output Capture (
Cohesion: 0.22
Nodes (11): CreateOrderDto, OrderItemDto, ApiProperty, ApiPropertyOptional, IsArray, IsNotEmpty, IsNumber, IsOptional (+3 more)
### Community 102 - ".update"
Cohesion: 0.24
Nodes (11): ApiNotFoundResponse, ApiOkResponse, ApiOperation, Body, Delete, Get, Param, Patch (+3 more)
### Community 103 - ".handleZibalCallback"
Cohesion: 0.24
Nodes (8): ApiPropertyOptional, IsOptional, IsString, ZibalCallbackQueryDto, Query, Res, Headers, Ip
### Community 104 - "auth.service.ts"
Cohesion: 0.13
Cohesion: 0.15
Nodes (14): AdminLoginInput, LoginInput, RegisterInput, SendOtpDto, ApiProperty, IsNotEmpty, IsString, Matches (+6 more)
### Community 105 - "1. Summary of Integrity Repairs Performed"
@ -777,9 +773,9 @@ Nodes (10): 1. Pre-Deployment Checklist, 2. Build Verification, 3. Deployment St
Cohesion: 0.29
Nodes (5): AppController, Controller, Get, AppService, Injectable
### Community 111 - "auth.controller.ts"
Cohesion: 0.16
Nodes (11): AdminLoginDto, ApiProperty, IsEmail, IsNotEmpty, IsString, MinLength, LoginDto, ApiProperty (+3 more)
### Community 111 - "AdminLoginDto"
Cohesion: 0.29
Nodes (6): AdminLoginDto, ApiProperty, IsEmail, IsNotEmpty, IsString, MinLength
### Community 113 - "Vazirmatn Changelog"
Cohesion: 0.18
@ -899,7 +895,7 @@ Nodes (6): Attempted Command Execution Log, Backend `backend/package.json` Scrip
### Community 145 - "Spinner.tsx"
Cohesion: 0.10
Nodes (16): Spinner(), ProductReview, Reviews(), toPersianDigits(), PatternItem, SmsConfigState, SmsLogItem, SmsLogStats (+8 more)
Nodes (15): Spinner(), ProductReview, Reviews(), toPersianDigits(), PatternItem, SmsConfigState, SmsLogItem, SmsLogStats (+7 more)
### Community 147 - "with-vpn.sh"
Cohesion: 0.62
@ -1041,14 +1037,6 @@ Nodes (3): ADR-AUTH-001: Admin Panel Authentication Architecture & Token Managem
Cohesion: 0.22
Nodes (7): ProductDto, ApiPropertyOptional, IsArray, IsBoolean, IsNumber, IsOptional, IsString
### Community 213 - "PetsController"
Cohesion: 0.18
Nodes (9): PetsController, ApiBadRequestResponse, ApiBearerAuth, ApiCreatedResponse, ApiTags, Controller, UploadedFile, UseGuards (+1 more)
### Community 214 - "RedisService"
Cohesion: 0.14
Nodes (4): AppModule, Module, RedisService, Injectable
### Community 215 - "WikiService"
Cohesion: 0.22
Nodes (3): Injectable, WikiQuery, WikiService
@ -1065,16 +1053,8 @@ Nodes (8): RegisterDto, ApiProperty, ApiPropertyOptional, IsEmail, IsNotEmpty, I
Cohesion: 0.29
Nodes (5): ApiExcludeController, MetricsController, Controller, Get, Res
### Community 289 - "CreateHealthLogDto"
Cohesion: 0.29
Nodes (6): CreateHealthLogDto, ApiProperty, ApiPropertyOptional, IsNotEmpty, IsOptional, IsString
### Community 290 - "CreateReminderDto"
Cohesion: 0.29
Nodes (6): CreateReminderDto, ApiProperty, ApiPropertyOptional, IsNotEmpty, IsOptional, IsString
## Knowledge Gaps
- **1239 isolated node(s):** `$schema`, `collection`, `sourceRoot`, `deleteOutDir`, `name` (+1234 more)
- **1240 isolated node(s):** `$schema`, `collection`, `sourceRoot`, `deleteOutDir`, `name` (+1235 more)
These have ≤1 connection - possible missing edges or undocumented components.
- **117 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
@ -1083,12 +1063,12 @@ _Questions this graph is uniquely positioned to answer:_
- **Why does `Roles()` connect `Roles` to `BannersService`, `CmsController`, `B2BService`, `CreateReviewDto`, `tickets.controller.ts`, `SslController`, `IngredientsService`, `ProductsService`, `PrescriptionsService`, `SmartAdvisorService`, `TestimonialsService`, `ContactService`, `PaymentController`, `WholesaleApplyDto`, `JwtAuthGuard`?**
_High betweenness centrality (0.048) - this node is a cross-community bridge._
- **Why does `ApiResponse` connect `src/services/api.ts` to `UsersService`, `WikiController`, `BlogsController`, `HomeController`, `OrdersController`, `ProductsService`, `PetsController`, `AuthController`?**
- **Why does `ApiResponse` connect `src/services/api.ts` to `UsersService`, `PetsController`, `WikiController`, `OrdersController`, `HomeController`, `ProductsService`, `PaginationDto`, `AuthController`?**
_High betweenness centrality (0.037) - this node is a cross-community bridge._
- **Why does `PrismaService` connect `PrismaService` to `PetsService`, `CmsController`, `app.module.ts`, `CreateReviewDto`, `tickets.controller.ts`, `ReportsController`, `DoctorsService`, `BlogsController`, `ProductsService`, `CreateVideoDto`, `Roles`, `WholesaleApplyDto`, `JwtAuthGuard`, `ZibalService`, `CategoriesController`, `B2BService`, `UsersService`, `IngredientsService`, `AuthService`, `MediaController`, `SmsService`, `PrescriptionsService`, `SmartAdvisorService`, `TestimonialsService`, `ContactService`, `admin.module.ts`, `PaginationDto`, `BannersService`, `pets/pets.controller.ts`, `seo.module.ts`, `admin.service.ts`, `HomeController`, `zibal.service.ts`, `RedisService`, `WikiService`, `OrdersService`, `auth.service.ts`, `AdminService`, `MetricsController`?**
- **Why does `PrismaService` connect `PrismaService` to `CmsController`, `app.module.ts`, `CreateReviewDto`, `tickets.controller.ts`, `ReportsController`, `DoctorsService`, `ProductsService`, `CreateVideoDto`, `Roles`, `WholesaleApplyDto`, `JwtAuthGuard`, `ZibalService`, `CategoriesController`, `B2BService`, `UsersService`, `IngredientsService`, `AuthService`, `MediaController`, `SmsService`, `PrescriptionsService`, `SmartAdvisorService`, `TestimonialsService`, `ContactService`, `admin.module.ts`, `PaginationDto`, `BannersService`, `PetsController`, `seo.module.ts`, `admin.service.ts`, `HomeController`, `zibal.service.ts`, `RedisService`, `WikiService`, `OrdersService`, `auth.service.ts`, `AdminService`, `MetricsController`?**
_High betweenness centrality (0.024) - this node is a cross-community bridge._
- **What connects `$schema`, `collection`, `sourceRoot` to the rest of the system?**
_1239 weakly-connected nodes found - possible documentation gaps or missing edges._
_1240 weakly-connected nodes found - possible documentation gaps or missing edges._
- **Should `AdminController` be split into smaller, more focused modules?**
_Cohesion score 0.13043478260869565 - nodes in this community are weakly interconnected._
- **Should `productService.ts` be split into smaller, more focused modules?**

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,16 @@
# Graph Report - canina (2026-08-18)
## Corpus Check
- 511 files · ~734,434 words
- 511 files · ~734,446 words
- Verdict: corpus is large enough that graph structure adds value.
## Summary
- 3634 nodes · 6166 edges · 313 communities (196 shown, 117 thin omitted)
- 3635 nodes · 6167 edges · 309 communities (192 shown, 117 thin omitted)
- Extraction: 96% EXTRACTED · 4% INFERRED · 0% AMBIGUOUS · INFERRED: 228 edges (avg confidence: 0.79)
- Token cost: 0 input · 0 output
## Graph Freshness
- Built from commit: `36e382cf`
- Built from commit: `6977f1d6`
- Run `git rev-parse HEAD` and compare to check if the graph is stale.
- Run `graphify update .` after code changes (no API cost).
@ -29,12 +29,12 @@
- useSettingsStore
- adminRoutes.tsx
- PrismaService
- BlogsController
- videos.controller.ts
- ProductsService
- lib/services/api.ts
- CreateVideoDto
- src/services/api.ts
- eslint-plugin-prettier
- LoginDto
- BE-001
- Roles
- FE-001
@ -86,7 +86,7 @@
- Operational Rules & Boundaries
- WikiController
- ApiOperation
- pets/pets.controller.ts
- PetsController
- seo.module.ts
- admin.service.ts
- 🏢 AI Software Agency — Master Orchestration Protocol v3
@ -117,17 +117,17 @@
- Comprehensive Change Log
- Operational Rules & Boundaries
- CreateOrderDto
- .update
- eslint
- .handleZibalCallback
- auth.service.ts
- 1. Summary of Integrity Repairs Performed
- eslint-config-prettier
- reflect-metadata
- Operational Rules & Boundaries
- Operational Rules & Boundaries
- Operational Rules & Boundaries
- AppService
- auth.controller.ts
- @types/react-dom
- AdminLoginDto
- eslint-plugin-prettier
- Vazirmatn Changelog
- Vazirmatn Font فونت وزیرمتن
- Operational Rules & Boundaries
@ -144,7 +144,7 @@
- Role & Core Objective
- orchestrate.py
- backend/package.json
- PetsService
- eslint-config-next
- graphify reference: extra exports and benchmark
- Phase 2 Final Quality Gate Summary Report
- Task Modifications Log
@ -228,7 +228,7 @@
- sync_manifest.js
- @types/multer
- ProductDto
- PetsController
- @testing-library/jest-dom
- RedisService
- WikiService
- FormField.tsx
@ -247,7 +247,6 @@
- eslint-plugin-react-refresh
- @tailwindcss/postcss
- typescript
- @testing-library/jest-dom
- @testing-library/react
- @types/react
- typescript
@ -289,13 +288,10 @@
- Shabnam Font Sample
- Production Docker Compose
- Staging Docker Compose
- CreateHealthLogDto
- CreateReminderDto
- NetworkBanner.tsx
- bcryptjs
- helmet
- js-yaml
- @nestjs/core
- @nestjs/jwt
- @nestjs/swagger
- @nestjs/throttler
@ -339,15 +335,15 @@
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`
## Hyperedges (group relationships)
- **Rastikerdar Font Ecosystem** — frontend_application_public_fonts_shabnam_font_v5_0_1_readme, frontend_application_public_fonts_vazirmatn_v33_003_readme, vazir_font [EXTRACTED 0.95]
- **Canina Deployment Stack** — scripts_compose_prod, scripts_compose_stage [EXTRACTED 1.00]
## Communities (313 total, 117 thin omitted)
## Communities (309 total, 117 thin omitted)
### Community 0 - "AdminController"
Cohesion: 0.13
@ -362,8 +358,8 @@ Cohesion: 0.09
Nodes (24): CmsController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Delete, Get (+16 more)
### Community 3 - "app.module.ts"
Cohesion: 0.07
Nodes (36): B2BModule, Module, BannersModule, Module, CmsModule, Module, SmsModule, Global (+28 more)
Cohesion: 0.08
Nodes (34): B2BModule, Module, BannersModule, Module, CmsModule, Module, SmsModule, Global (+26 more)
### Community 4 - "CreateReviewDto"
Cohesion: 0.07
@ -405,9 +401,9 @@ Nodes (14): App(), ContactInfoItem, ContactSubmission, CategoryDist, DashboardDa
Cohesion: 0.09
Nodes (14): MeliPayamakPattern, MeliPayamakResponse, SendPatternSmsOptions, SmsConfig, SmsLogQuery, CreateContactSubmissionDto, UpdateContactInfoItemDto, DoctorQuery (+6 more)
### Community 14 - "BlogsController"
Cohesion: 0.13
Nodes (13): BlogsController, ApiNotFoundResponse, ApiOkResponse, ApiOperation, ApiTags, Controller, Get, Param (+5 more)
### Community 14 - "videos.controller.ts"
Cohesion: 0.22
Nodes (7): GetVideosQueryDto, ApiPropertyOptional, IsBoolean, IsOptional, Module, VideosModule, Transform
### Community 15 - "ProductsService"
Cohesion: 0.09
@ -425,6 +421,10 @@ Nodes (24): CreateVideoDto, ApiProperty, ApiPropertyOptional, IsBoolean, IsNotEm
Cohesion: 0.10
Nodes (23): ProtectedRoute(), SEARCHABLE_PAGES, Topbar(), TopbarProps, Login(), B2BManager, SmartAdvisorManager, SystemSettingsPage (+15 more)
### Community 19 - "LoginDto"
Cohesion: 0.33
Nodes (5): LoginDto, ApiProperty, IsNotEmpty, IsString, MinLength
### Community 20 - "BE-001"
Cohesion: 0.06
Nodes (32): Acceptance Criteria, Affected Application, Affected Files, Alternative Direction, BE-001, Category, Completion Statement, Confidence (+24 more)
@ -466,11 +466,11 @@ Cohesion: 0.10
Nodes (20): ApiProperty, ApiPropertyOptional, IsNotEmpty, IsOptional, IsString, WholesaleApplyDto, ApiBearerAuth, ApiOperation (+12 more)
### Community 30 - "main.ts"
Cohesion: 0.14
Nodes (9): CustomHttpExceptionFilter, Catch, PrismaExceptionFilter, Catch, DecimalInterceptor, Injectable, ApiErrorResponse, ErrorDetailField (+1 more)
Cohesion: 0.11
Nodes (11): AppModule, Module, CustomHttpExceptionFilter, Catch, PrismaExceptionFilter, Catch, DecimalInterceptor, Injectable (+3 more)
### Community 31 - "JwtAuthGuard"
Cohesion: 0.14
Cohesion: 0.15
Nodes (8): JwtAuthGuard, Injectable, B2BWholesaleOrderItem, ROLES_KEY, RequestWithUser, RolesGuard, Injectable, UserReqPayload
### Community 32 - "ZibalService"
@ -518,7 +518,7 @@ Cohesion: 0.13
Nodes (14): IngredientsController, ApiBearerAuth, ApiOperation, ApiTags, Body, Controller, Delete, Get (+6 more)
### Community 43 - "AuthService"
Cohesion: 0.18
Cohesion: 0.20
Nodes (3): AuthService, Injectable, normalizeMobile()
### Community 44 - "MediaController"
@ -566,20 +566,20 @@ Cohesion: 0.09
Nodes (20): Badge(), BadgeProps, BadgeVariant, variantStyles, ImagePreviewModal(), ImagePreviewModalProps, ToggleSwitch(), ToggleSwitchProps (+12 more)
### Community 56 - "compilerOptions"
Cohesion: 0.09
Nodes (22): compilerOptions, allowImportingTsExtensions, erasableSyntaxOnly, jsx, lib, module, moduleDetection, moduleResolution (+14 more)
Cohesion: 0.08
Nodes (23): compilerOptions, allowImportingTsExtensions, erasableSyntaxOnly, jsx, lib, module, moduleDetection, moduleResolution (+15 more)
### Community 57 - "admin.module.ts"
Cohesion: 0.06
Nodes (23): AdminModule, Module, BlogQuery, BlogsService, Injectable, PetsController, ApiBearerAuth, ApiOperation (+15 more)
### Community 58 - "PaginationDto"
Cohesion: 0.07
Nodes (24): PaginationDto, SortOrder, ApiPropertyOptional, IsEnum, IsInt, IsOptional, IsString, Min (+16 more)
Cohesion: 0.06
Nodes (32): BlogsController, ApiNotFoundResponse, ApiOkResponse, ApiOperation, ApiTags, Controller, Get, Param (+24 more)
### Community 59 - "dependencies"
Cohesion: 0.10
Nodes (21): dependencies, bcrypt, class-transformer, class-validator, ioredis, @nestjs/common, @nestjs/passport, @nestjs/platform-express (+13 more)
Nodes (21): dependencies, bcrypt, class-transformer, class-validator, ioredis, @nestjs/common, @nestjs/core, @nestjs/passport (+13 more)
### Community 60 - "compilerOptions"
Cohesion: 0.10
@ -622,12 +622,12 @@ Cohesion: 0.13
Nodes (14): ApiBearerAuth, ApiOperation, ApiQuery, ApiTags, Body, Controller, Delete, Get (+6 more)
### Community 70 - "ApiOperation"
Cohesion: 0.15
Cohesion: 0.14
Nodes (8): ApiOperation, ApiQuery, Get, Query, AdminQueryDto, ApiPropertyOptional, IsOptional, IsString
### Community 71 - "pets/pets.controller.ts"
Cohesion: 0.16
Nodes (13): CreatePetDto, ApiProperty, ApiPropertyOptional, IsArray, IsNotEmpty, IsNumber, IsOptional, IsString (+5 more)
### Community 71 - "PetsController"
Cohesion: 0.05
Nodes (47): CreateHealthLogDto, ApiProperty, ApiPropertyOptional, IsNotEmpty, IsOptional, IsString, CreatePetDto, ApiProperty (+39 more)
### Community 72 - "seo.module.ts"
Cohesion: 0.16
@ -667,7 +667,7 @@ Nodes (9): GatewayHealthResult, IPaymentGateway, PaymentInquiryResult, PaymentRe
### Community 81 - "devDependencies"
Cohesion: 0.13
Nodes (15): eslint-config-next, devDependencies, eslint, eslint-config-next, jsdom, tailwindcss, @tailwindcss/postcss, @types/node (+7 more)
Nodes (15): devDependencies, eslint, jsdom, tailwindcss, @tailwindcss/postcss, @types/node, @types/react-dom, @vitejs/plugin-react (+7 more)
### Community 82 - "api"
Cohesion: 0.29
@ -745,16 +745,12 @@ Nodes (11): 1. Detect Test Runner from Tech Stack, 2. Execution Output Capture (
Cohesion: 0.22
Nodes (11): CreateOrderDto, OrderItemDto, ApiProperty, ApiPropertyOptional, IsArray, IsNotEmpty, IsNumber, IsOptional (+3 more)
### Community 102 - ".update"
Cohesion: 0.24
Nodes (11): ApiNotFoundResponse, ApiOkResponse, ApiOperation, Body, Delete, Get, Param, Patch (+3 more)
### Community 103 - ".handleZibalCallback"
Cohesion: 0.24
Nodes (8): ApiPropertyOptional, IsOptional, IsString, ZibalCallbackQueryDto, Query, Res, Headers, Ip
### Community 104 - "auth.service.ts"
Cohesion: 0.13
Cohesion: 0.15
Nodes (14): AdminLoginInput, LoginInput, RegisterInput, SendOtpDto, ApiProperty, IsNotEmpty, IsString, Matches (+6 more)
### Community 105 - "1. Summary of Integrity Repairs Performed"
@ -777,9 +773,9 @@ Nodes (10): 1. Pre-Deployment Checklist, 2. Build Verification, 3. Deployment St
Cohesion: 0.29
Nodes (5): AppController, Controller, Get, AppService, Injectable
### Community 111 - "auth.controller.ts"
Cohesion: 0.16
Nodes (11): AdminLoginDto, ApiProperty, IsEmail, IsNotEmpty, IsString, MinLength, LoginDto, ApiProperty (+3 more)
### Community 111 - "AdminLoginDto"
Cohesion: 0.29
Nodes (6): AdminLoginDto, ApiProperty, IsEmail, IsNotEmpty, IsString, MinLength
### Community 113 - "Vazirmatn Changelog"
Cohesion: 0.18
@ -807,7 +803,7 @@ Nodes (9): Compile and run the project, Deployment, Description, License, Projec
### Community 119 - "devDependencies"
Cohesion: 0.22
Nodes (9): devDependencies, eslint, @types/passport-jwt, @types/supertest, typescript, eslint, typescript, @types/passport-jwt (+1 more)
Nodes (9): devDependencies, eslint-config-prettier, @types/passport-jwt, @types/supertest, typescript, typescript, eslint-config-prettier, @types/passport-jwt (+1 more)
### Community 120 - "Repository Map"
Cohesion: 0.20
@ -1041,14 +1037,6 @@ Nodes (3): ADR-AUTH-001: Admin Panel Authentication Architecture & Token Managem
Cohesion: 0.22
Nodes (7): ProductDto, ApiPropertyOptional, IsArray, IsBoolean, IsNumber, IsOptional, IsString
### Community 213 - "PetsController"
Cohesion: 0.18
Nodes (9): PetsController, ApiBadRequestResponse, ApiBearerAuth, ApiCreatedResponse, ApiTags, Controller, UploadedFile, UseGuards (+1 more)
### Community 214 - "RedisService"
Cohesion: 0.14
Nodes (4): AppModule, Module, RedisService, Injectable
### Community 215 - "WikiService"
Cohesion: 0.22
Nodes (3): Injectable, WikiQuery, WikiService
@ -1065,16 +1053,8 @@ Nodes (8): RegisterDto, ApiProperty, ApiPropertyOptional, IsEmail, IsNotEmpty, I
Cohesion: 0.29
Nodes (5): ApiExcludeController, MetricsController, Controller, Get, Res
### Community 289 - "CreateHealthLogDto"
Cohesion: 0.29
Nodes (6): CreateHealthLogDto, ApiProperty, ApiPropertyOptional, IsNotEmpty, IsOptional, IsString
### Community 290 - "CreateReminderDto"
Cohesion: 0.29
Nodes (6): CreateReminderDto, ApiProperty, ApiPropertyOptional, IsNotEmpty, IsOptional, IsString
## Knowledge Gaps
- **1239 isolated node(s):** `$schema`, `collection`, `sourceRoot`, `deleteOutDir`, `name` (+1234 more)
- **1240 isolated node(s):** `$schema`, `collection`, `sourceRoot`, `deleteOutDir`, `name` (+1235 more)
These have ≤1 connection - possible missing edges or undocumented components.
- **117 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
@ -1083,12 +1063,12 @@ _Questions this graph is uniquely positioned to answer:_
- **Why does `Roles()` connect `Roles` to `BannersService`, `CmsController`, `B2BService`, `CreateReviewDto`, `tickets.controller.ts`, `SslController`, `IngredientsService`, `ProductsService`, `PrescriptionsService`, `SmartAdvisorService`, `TestimonialsService`, `ContactService`, `PaymentController`, `WholesaleApplyDto`, `JwtAuthGuard`?**
_High betweenness centrality (0.048) - this node is a cross-community bridge._
- **Why does `ApiResponse` connect `src/services/api.ts` to `UsersService`, `WikiController`, `BlogsController`, `HomeController`, `OrdersController`, `ProductsService`, `PetsController`, `AuthController`?**
- **Why does `ApiResponse` connect `src/services/api.ts` to `UsersService`, `PetsController`, `WikiController`, `OrdersController`, `HomeController`, `ProductsService`, `PaginationDto`, `AuthController`?**
_High betweenness centrality (0.037) - this node is a cross-community bridge._
- **Why does `PrismaService` connect `PrismaService` to `PetsService`, `CmsController`, `app.module.ts`, `CreateReviewDto`, `tickets.controller.ts`, `ReportsController`, `DoctorsService`, `BlogsController`, `ProductsService`, `CreateVideoDto`, `Roles`, `WholesaleApplyDto`, `JwtAuthGuard`, `ZibalService`, `CategoriesController`, `B2BService`, `UsersService`, `IngredientsService`, `AuthService`, `MediaController`, `SmsService`, `PrescriptionsService`, `SmartAdvisorService`, `TestimonialsService`, `ContactService`, `admin.module.ts`, `PaginationDto`, `BannersService`, `pets/pets.controller.ts`, `seo.module.ts`, `admin.service.ts`, `HomeController`, `zibal.service.ts`, `RedisService`, `WikiService`, `OrdersService`, `auth.service.ts`, `AdminService`, `MetricsController`?**
- **Why does `PrismaService` connect `PrismaService` to `CmsController`, `app.module.ts`, `CreateReviewDto`, `tickets.controller.ts`, `ReportsController`, `DoctorsService`, `ProductsService`, `CreateVideoDto`, `Roles`, `WholesaleApplyDto`, `JwtAuthGuard`, `ZibalService`, `CategoriesController`, `B2BService`, `UsersService`, `IngredientsService`, `AuthService`, `MediaController`, `SmsService`, `PrescriptionsService`, `SmartAdvisorService`, `TestimonialsService`, `ContactService`, `admin.module.ts`, `PaginationDto`, `BannersService`, `PetsController`, `seo.module.ts`, `admin.service.ts`, `HomeController`, `zibal.service.ts`, `RedisService`, `WikiService`, `OrdersService`, `auth.service.ts`, `AdminService`, `MetricsController`?**
_High betweenness centrality (0.024) - this node is a cross-community bridge._
- **What connects `$schema`, `collection`, `sourceRoot` to the rest of the system?**
_1239 weakly-connected nodes found - possible documentation gaps or missing edges._
_1240 weakly-connected nodes found - possible documentation gaps or missing edges._
- **Should `AdminController` be split into smaller, more focused modules?**
_Cohesion score 0.13043478260869565 - nodes in this community are weakly interconnected._
- **Should `productService.ts` be split into smaller, more focused modules?**

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