feat: add canonical URL handling and entity quality checks

- Implemented canonical URL strategies for city-specific domains and entities.
- Added helper functions for domain and city resolution.
- Created tests for canonical URL generation and domain resolution.
- Introduced entity quality checks for doctors and clinics to ensure meaningful content.
- Developed unique introductory texts for listing pages to avoid duplicate content.
- Established robots.txt policies for listing pages to manage indexing based on user filters.
- Enhanced specialty content with dynamic introductions and FAQs to improve SEO.
This commit is contained in:
hamed
2026-07-19 07:52:50 +03:30
parent 36816eded2
commit fd48b48613
48 changed files with 3951 additions and 733 deletions
+102 -59
View File
@@ -1,16 +1,16 @@
# Graph Report - nobat724_front (2026-07-18)
# Graph Report - nobat724_front (2026-07-19)
## Corpus Check
- 607 files · ~553,226 words
- 619 files · ~559,739 words
- Verdict: corpus is large enough that graph structure adds value.
## Summary
- 2187 nodes · 2167 edges · 376 communities (346 shown, 30 thin omitted)
- Extraction: 95% EXTRACTED · 5% INFERRED · 0% AMBIGUOUS · INFERRED: 100 edges (avg confidence: 0.8)
- 2261 nodes · 2301 edges · 384 communities (351 shown, 33 thin omitted)
- Extraction: 94% EXTRACTED · 6% INFERRED · 0% AMBIGUOUS · INFERRED: 137 edges (avg confidence: 0.8)
- Token cost: 0 input · 0 output
## Graph Freshness
- Built from commit: `b3709604`
- Built from commit: `36816ede`
- Run `git rev-parse HEAD` and compare to check if the graph is stale.
- Run `graphify update .` after code changes (no API cost).
@@ -135,6 +135,10 @@
- [[_COMMUNITY_Community 121|Community 121]]
- [[_COMMUNITY_Community 122|Community 122]]
- [[_COMMUNITY_Community 124|Community 124]]
- [[_COMMUNITY_Community 125|Community 125]]
- [[_COMMUNITY_Community 126|Community 126]]
- [[_COMMUNITY_Community 128|Community 128]]
- [[_COMMUNITY_Community 140|Community 140]]
- [[_COMMUNITY_Community 195|Community 195]]
- [[_COMMUNITY_Community 339|Community 339]]
- [[_COMMUNITY_Community 347|Community 347]]
@@ -143,6 +147,10 @@
- [[_COMMUNITY_Community 366|Community 366]]
- [[_COMMUNITY_Community 367|Community 367]]
- [[_COMMUNITY_Community 368|Community 368]]
- [[_COMMUNITY_Community 369|Community 369]]
- [[_COMMUNITY_Community 370|Community 370]]
- [[_COMMUNITY_Community 371|Community 371]]
- [[_COMMUNITY_Community 372|Community 372]]
- [[_COMMUNITY_Community 373|Community 373]]
- [[_COMMUNITY_Community 374|Community 374]]
- [[_COMMUNITY_Community 375|Community 375]]
@@ -150,63 +158,66 @@
- [[_COMMUNITY_Community 377|Community 377]]
- [[_COMMUNITY_Community 378|Community 378]]
- [[_COMMUNITY_Community 379|Community 379]]
- [[_COMMUNITY_Community 380|Community 380]]
- [[_COMMUNITY_Community 381|Community 381]]
- [[_COMMUNITY_Community 382|Community 382]]
## God Nodes (most connected - your core abstractions)
1. `getStateInfo()` - 24 edges
1. `getStateInfo()` - 26 edges
2. `🏥 نوبت724 (Nobat724) - سیستم نوبت‌دهی آنلاین پزشکی` - 19 edges
3. `تقسیم ممیزی SEO به پرامپت‌های کوچک اجرایی — nobat724` - 17 edges
4. `imageUrl()` - 15 edges
5. `Dashboard()` - 10 edges
6. `بهینه‌سازی SEO تک‌تک شهرها در city.json (سطح حرفه‌ای)` - 10 edges
7. `بازطراحی حرفه‌ای پوستر اشتراک‌گذاری پزشک (دانلود)` - 10 edges
8. `وظایف` - 10 edges
9. `وظایف` - 10 edges
5. `Doctor()` - 11 edges
6. `Blog()` - 10 edges
7. `Dashboard()` - 10 edges
8. `بهینه‌سازی SEO تک‌تک شهرها در city.json (سطح حرفه‌ای)` - 10 edges
9. `بازطراحی حرفه‌ای پوستر اشتراک‌گذاری پزشک (دانلود)` - 10 edges
10. `وظایف` - 10 edges
## Surprising Connections (you probably didn't know these)
- `Dashboard()` --calls--> `safeJsonParse()` [INFERRED]
app/dashboard/page.js → lib/sanitize.js
- `Doctor()` --calls--> `buildDoctorFaq()` [INFERRED]
app/doctor/[slug]/page.js → lib/specialtyContent.js
- `SpecialtyDetail()` --calls--> `buildSpecialtyFaq()` [INFERRED]
app/specialties/[slug]/page.js → lib/specialtyContent.js
- `AboutUsPage()` --calls--> `getStateInfo()` [INFERRED]
components/aboutUs/index.js → lib/getStateInfo.js
- `ContactUsPage()` --calls--> `getStateInfo()` [INFERRED]
components/contactUs/index.js → lib/getStateInfo.js
- `SearchBar()` --calls--> `getStateInfo()` [INFERRED]
components/home/search/index.js → lib/getStateInfo.js
- `StLayout()` --calls--> `getStateInfo()` [INFERRED]
components/layout/StLayout.js → lib/getStateInfo.js
- `generateMetadata()` --calls--> `getStateInfo()` [INFERRED]
app/about-us/page.js → lib/getStateInfo.js
## Import Cycles
- None detected.
## Communities (376 total, 30 thin omitted)
## Communities (384 total, 33 thin omitted)
### Community 0 - "Community 0"
Cohesion: 0.05
Nodes (27): BgGray(), ButtonMenu(), Col(), ModalLogout(), Footer(), head, LogoNamad(), Namads (+19 more)
### Community 1 - "Community 1"
Cohesion: 0.24
Nodes (8): Head(), convertTimestampToJalali(), convertTimestampToTime(), ButtonData(), DetailLg(), DetailSm(), Head(), Card()
Cohesion: 0.36
Nodes (5): convertTimestampToTime(), ButtonData(), DetailLg(), DetailSm(), Head()
### Community 2 - "Community 2"
Cohesion: 0.04
Nodes (48): dependencies, altcha, aos, axios, @casl/ability, @casl/react, date-fns, dayjs (+40 more)
### Community 3 - "Community 3"
Cohesion: 0.24
Nodes (14): getCurrentDomain(), robots(), cityFilterParams(), fetchAllPages(), getBlogUrls(), getCityScope(), getClinicUrls(), getCurrentDomain() (+6 more)
Cohesion: 0.21
Nodes (17): getCurrentDomain(), robots(), CITY_IDS_WITH_DOMAIN, cityFilterParams(), fetchAllPages(), getBlogUrls(), getCityScope(), getClinicUrls() (+9 more)
### Community 4 - "Community 4"
Cohesion: 0.07
Nodes (21): ContentDetail(), About(), ListBime(), Services(), Specialties(), TextDetail(), listTab, AddComment() (+13 more)
### Community 5 - "Community 5"
Cohesion: 0.07
Nodes (23): AppointmentList(), ItemAppointment(), AboutDcotor(), ClaimProfileSection(), currentUserMobile(), initialForm, DetailDoctor(), Link() (+15 more)
Cohesion: 0.06
Nodes (26): bookingState(), DAY_NAMES, formatJalali(), AppointmentList(), ItemAppointment(), AboutDcotor(), ClaimProfileSection(), currentUserMobile() (+18 more)
### Community 6 - "Community 6"
Cohesion: 0.12
Nodes (10): Dashboard(), metadata, defineAbilitiesFor(), getUser(), buildPatientUser(), safeJsonLd(), safeJsonParse(), getServerAccessToken() (+2 more)
Cohesion: 0.08
Nodes (13): Dashboard(), metadata, defineAbilitiesFor(), getUser(), buildPatientUser(), getServerAccessToken(), clearAccessToken(), LogIn() (+5 more)
### Community 8 - "Community 8"
Cohesion: 0.07
@@ -293,8 +304,8 @@ Cohesion: 0.12
Nodes (16): دیپلوی nobat724_front روی Liara (پلتفرم Next.js), زمینه, فایل‌های مرتبط, مشکل / هدف, نکات مهم, وضعیت فعلی, وظایف, پروژه (+8 more)
### Community 29 - "Community 29"
Cohesion: 0.12
Nodes (10): generateMetadata(), generateMetadata(), Appointment(), metadata, fetchSiteContext(), getStateInfo(), siteContextCache, ContentLogin() (+2 more)
Cohesion: 0.08
Nodes (20): generateMetadata(), generateMetadata(), Clinics(), generateMetadata(), Appointment(), metadata, Doctors(), generateMetadata() (+12 more)
### Community 30 - "Community 30"
Cohesion: 0.12
@@ -357,12 +368,12 @@ Cohesion: 0.14
Nodes (13): `hours/List.js`, آبجکت اسلات (از `adaptSlots` / API), تأیید و سخت‌سازی غیرفعال‌بودن اسلات‌های گذشته در صفحه‌ی نوبت, زمینه, فایل‌های مرتبط, مشکل / هدف, نکات مهم, وضعیت فعلی (کد واقعی) (+5 more)
### Community 45 - "Community 45"
Cohesion: 0.29
Nodes (6): generateMetadata(), imageUrl(), normalizeBlog(), ItemClinic(), Blog(), getBlog
Cohesion: 0.23
Nodes (16): generateMetadata(), generateMetadata(), generateMetadata(), imageUrl(), normalizeBlog(), extractEntityCityId(), getEntityOrigin(), Blog() (+8 more)
### Community 46 - "Community 46"
Cohesion: 0.09
Nodes (18): formatToman(), rialToToman(), Messages(), Message(), Paying(), Card(), PAYMENT_STATUS, TYPE_LABELS (+10 more)
Cohesion: 0.22
Nodes (6): Messages(), Message(), Head(), listTab, UserAccountPage(), NotfoundDashboard()
### Community 47 - "Community 47"
Cohesion: 0.15
@@ -382,7 +393,7 @@ Nodes (12): زمینه, فایل‌های مرتبط, مشکل / هدف, نما
### Community 51 - "Community 51"
Cohesion: 0.06
Nodes (20): ClinicsPage(), ProvinceContext, ProvinceProvider(), Probe(), useProvince(), Content(), Form(), SubmitData() (+12 more)
Nodes (21): ProvinceContext, ProvinceProvider(), Probe(), useProvince(), Content(), Form(), SubmitData(), EditField() (+13 more)
### Community 52 - "Community 52"
Cohesion: 0.24
@@ -457,16 +468,16 @@ Cohesion: 0.20
Nodes (9): رفع جهت تبدیل تاریخ تولد هنگام ایجاد پروفایل, زمینه, فایل‌های مرتبط, مشکل / هدف, نکات مهم, وضعیت فعلی (کد واقعی), وظایف, پروژه (+1 more)
### Community 70 - "Community 70"
Cohesion: 0.25
Nodes (7): Clinics(), FILTER_KEYS, generateMetadata(), listingRobots(), buildClinicParams(), axiosInstance, fetchReq()
Cohesion: 0.13
Nodes (13): ClinicsPage(), AutoComplete(), ButtonFilter(), Content(), ModalSearchCity(), AutoSearch(), FilterButton(), SearchBar() (+5 more)
### Community 71 - "Community 71"
Cohesion: 0.22
Nodes (7): degree, Form(), gender, degree, Form(), gender, filterList()
### Community 72 - "Community 72"
Cohesion: 0.39
Nodes (8): generateMetadata(), RootLayout(), buildCanonicalPath(), buildCanonicalUrl(), buildMainCanonicalUrl(), getCanonicalUrl(), getRequestOrigin(), normalizeHost()
Cohesion: 0.27
Nodes (13): generateMetadata(), buildCanonicalPath(), buildCanonicalQuery(), buildCanonicalUrl(), buildMainCanonicalUrl(), buildSpecialtyCanonicalPath(), CANONICAL_QUERY_KEYS, getCanonicalUrl() (+5 more)
### Community 73 - "Community 73"
Cohesion: 0.32
@@ -481,8 +492,8 @@ Cohesion: 0.29
Nodes (7): Authentication & Authorization, Development Tools, Frontend Framework, State Management & Data Fetching, UI/UX, 🏗️ معماری و تکنولوژی, کتابخانه‌های تخصصی
### Community 76 - "Community 76"
Cohesion: 0.07
Nodes (20): Allergies(), ItemAllergie(), HeadTab(), setNewData(), DetailUser(), Disease(), FamilyHistory(), ItemHistory() (+12 more)
Cohesion: 0.33
Nodes (5): HeadTab(), setNewData(), DetailUser(), Disease(), IsTurnsDetails()
### Community 79 - "Community 79"
Cohesion: 0.17
@@ -498,16 +509,20 @@ Nodes (11): رفع خطای `TypeError: fetch failed` در sitemap هنگام د
### Community 83 - "Community 83"
Cohesion: 0.24
Nodes (6): STATUS_LABELS, Head(), listTab, Turns(), List(), STATUS_LABELS
Nodes (7): Card(), STATUS_LABELS, Head(), listTab, Turns(), List(), STATUS_LABELS
### Community 86 - "Community 86"
Cohesion: 0.40
Nodes (5): Doctors(), FILTER_KEYS, generateMetadata(), listingRobots(), buildDoctorParams()
Cohesion: 0.21
Nodes (10): generateMetadata(), DoctorsPage(), findCityById(), findDomainByCityId(), resolveCityDisplayName(), isRootCity(), ListDoctors(), findSpecialty() (+2 more)
### Community 87 - "Community 87"
Cohesion: 0.33
Nodes (6): 1. افزودن صفحه جدید, 2. افزودن API Endpoint جدید, 3. افزودن کامپوننت جدید, 4. کار با تاریخ شمسی, 5. استفاده از Context, 📝 نکات توسعه
### Community 89 - "Community 89"
Cohesion: 0.28
Nodes (4): Head(), convertTimestampToJalali(), RelatedContent(), Item()
### Community 90 - "Community 90"
Cohesion: 0.50
Nodes (4): buildDays(), InlineJalaliMonth(), MONTHS, WEEKDAYS
@@ -560,6 +575,22 @@ Nodes (4): Metadata داینامیک بر اساس شهر, ساختار دامن
Cohesion: 0.67
Nodes (3): Feature Components, Layout Components, 🧩 کامپوننت‌های اصلی
### Community 125 - "Community 125"
Cohesion: 0.14
Nodes (13): زمینه, فایل‌های مرتبط, مشکل / هدف, نوار موبایل — `components/doctor/appointmentList/index.js:20-24`, نکات مهم, وضعیت فعلی, وضعیت «نوبت‌دهی فعال/غیرفعال» پروفایل پزشک از booking_locations, وظایف (+5 more)
### Community 126 - "Community 126"
Cohesion: 0.33
Nodes (7): bodyVariants(), buildDoctorFaq(), buildSpecialtyFaq(), buildSpecialtyIntro(), closingVariants(), openingVariants(), pick()
### Community 128 - "Community 128"
Cohesion: 0.40
Nodes (3): Allergies(), ItemAllergie(), ModalAddAlergie()
### Community 140 - "Community 140"
Cohesion: 0.33
Nodes (5): RootLayout(), normalize(), Pageguide(), safeJsonLd(), safeJsonParse()
### Community 365 - "Community 365"
Cohesion: 0.08
Nodes (23): endpoint جدید, انتخاب محل نوبت‌دهی (مطب شخصی / کلینیک) در جریان رزرو, زمینه, فایل‌های مرتبط, قرارداد API (آمادهٔ مصرف), مشکل / هدف, نکات مهم, وضعیت فعلی (+15 more)
@@ -569,12 +600,24 @@ Cohesion: 0.11
Nodes (17): P10 — بلاگ شهر-محور (C4), P11 — FAQPage schema و متن مقدمهٔ یکتا (M1 + M2), P1 — بررسی robots.txt (پیش‌نیاز اعتبارسنجی), P2 — هلپرهای مشترک (زیرساخت), P3 — رفع noindex سیستمیک صفحات لیست (C5 — بدترین باگ), P4 — استراتژی canonical سه‌دسته + تصمیم pagination (C1-a/b/c + M3-B), P5 — بازسازی sitemap (C2), P6 — صفحات موجودیت: Soft-404 و noindex کلینیک خالی (H4 + H7) (+9 more)
### Community 367 - "Community 367"
Cohesion: 0.15
Nodes (5): clearAccessToken(), api, handleSessionExpired(), request, removeToken()
Cohesion: 0.40
Nodes (3): FamilyHistory(), ItemHistory(), ModalAddHistory()
### Community 368 - "Community 368"
Cohesion: 0.70
Nodes (4): generateMetadata(), Clinic(), computeClinicRating(), getClinic
Cohesion: 0.40
Nodes (3): Medications(), ItemMedication(), ModalAddMedications()
### Community 369 - "Community 369"
Cohesion: 0.40
Nodes (3): ModalAddRelatives(), Relatives(), ItemRelatives()
### Community 370 - "Community 370"
Cohesion: 0.40
Nodes (3): ModalAddSurgeries(), Surgeries(), ItemSurgeries()
### Community 372 - "Community 372"
Cohesion: 0.60
Nodes (4): hasRealName(), isThinClinic(), isThinDoctor(), PLACEHOLDER_NAMES
### Community 373 - "Community 373"
Cohesion: 0.12
@@ -597,28 +640,28 @@ Cohesion: 0.36
Nodes (4): SearchBar(), ButtonFilter(), Fields(), RedirectLink()
### Community 378 - "Community 378"
Cohesion: 0.60
Nodes (5): generateMetadata(), Doctor(), getBookingLocations, getDoctor, getDoctorAddresses
Cohesion: 0.40
Nodes (3): KOHGILUYEH, scope, YASUJ
## Knowledge Gaps
- **793 isolated node(s):** `metadata`, `FILTER_KEYS`, `fallbackLabels`, `MaterialUISwitch`, `fixedIconData` (+788 more)
- **815 isolated node(s):** `metadata`, `fallbackLabels`, `MaterialUISwitch`, `fixedIconData`, `metadata` (+810 more)
These have ≤1 connection - possible missing edges or undocumented components.
- **30 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
- **33 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 `imageUrl()` connect `Community 45` to `Community 0`, `Community 4`, `Community 7`, `Community 368`, `Community 81`, `Community 55`, `Community 56`, `Community 89`, `Community 378`?**
_High betweenness centrality (0.037) - this node is a cross-community bridge._
- **Why does `getStateInfo()` connect `Community 29` to `Community 0`, `Community 67`, `Community 70`, `Community 6`, `Community 72`, `Community 45`, `Community 14`, `Community 16`, `Community 368`, `Community 51`, `Community 86`, `Community 377`, `Community 378`?**
- **Why does `imageUrl()` connect `Community 45` to `Community 0`, `Community 4`, `Community 7`, `Community 81`, `Community 55`, `Community 56`, `Community 89`, `Community 380`?**
_High betweenness centrality (0.038) - this node is a cross-community bridge._
- **Why does `getStateInfo()` connect `Community 29` to `Community 0`, `Community 67`, `Community 6`, `Community 72`, `Community 140`, `Community 45`, `Community 14`, `Community 16`, `Community 86`, `Community 377`?**
_High betweenness centrality (0.034) - this node is a cross-community bridge._
- **Why does `isRootCity()` connect `Community 51` to `Community 3`, `Community 29`?**
_High betweenness centrality (0.016) - this node is a cross-community bridge._
- **Are the 22 inferred relationships involving `getStateInfo()` (e.g. with `generateMetadata()` and `AboutUsPage()`) actually correct?**
_`getStateInfo()` has 22 INFERRED edges - model-reasoned connections that need verification._
- **Why does `isRootCity()` connect `Community 86` to `Community 51`, `Community 3`, `Community 29`, `Community 70`?**
_High betweenness centrality (0.023) - this node is a cross-community bridge._
- **Are the 24 inferred relationships involving `getStateInfo()` (e.g. with `generateMetadata()` and `AboutUsPage()`) actually correct?**
_`getStateInfo()` has 24 INFERRED edges - model-reasoned connections that need verification._
- **Are the 14 inferred relationships involving `imageUrl()` (e.g. with `generateMetadata()` and `generateMetadata()`) actually correct?**
_`imageUrl()` has 14 INFERRED edges - model-reasoned connections that need verification._
- **What connects `metadata`, `FILTER_KEYS`, `fallbackLabels` to the rest of the system?**
_793 weakly-connected nodes found - possible documentation gaps or missing edges._
- **What connects `metadata`, `fallbackLabels`, `MaterialUISwitch` to the rest of the system?**
_815 weakly-connected nodes found - possible documentation gaps or missing edges._
- **Should `Community 0` be split into smaller, more focused modules?**
_Cohesion score 0.05263157894736842 - nodes in this community are weakly interconnected._