Files
SaaS-PDF/frontend/src/config/routes.ts
Your Name f347022924 feat: add SEO configuration and pages for programmatic tools and collections
- Introduced seoPages.ts to manage SEO-related configurations and types for programmatic tools and collection pages.
- Created SeoCollectionPage and SeoProgrammaticPage components to render SEO content dynamically based on the new configuration.
- Enhanced API service to ensure CSRF token handling for secure requests.
- Added generateHowTo utility function for structured data generation.
- Updated sitemap generation script to include SEO tool and collection pages.
- Configured TypeScript to resolve JSON modules for easier integration of SEO data.   ستراتيجية التنفيذ

لم أغير أي core logic في أدوات التحويل أو الضغط أو التحرير
استخدمت architecture إضافية فوق النظام الحالي بدل استبداله
جعلت الـ SEO pages تعتمد على source of truth واحد حتى يسهل التوسع
ربطت التوليد مع build حتى لا تبقى sitemap وrobots ثابتة أو منسية
دعمت العربية والإنجليزية داخل نفس config الجديد
عززت internal linking من:
صفحات SEO إلى tool pages
صفحات SEO إلى collection pages
footer إلى collection pages
Suggested tools داخل صفحات الأدوات
التحقق
2026-03-21 01:19:32 +02:00

103 lines
2.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* Canonical route registry — single source of truth for all application routes.
*
* SAFETY RULE: Never remove a route from this list.
* New routes may only be appended. The route safety test
* (routes.test.ts) will fail if any existing route is deleted.
*/
// ─── Page routes ─────────────────────────────────────────────────
export const PAGE_ROUTES = [
'/',
'/about',
'/account',
'/forgot-password',
'/reset-password',
'/privacy',
'/terms',
'/contact',
'/pricing',
'/blog',
'/blog/:slug',
'/developers',
'/internal/admin',
'/pdf-to-word',
'/word-to-pdf',
'/compress-pdf-online',
'/convert-jpg-to-pdf',
'/merge-pdf-files',
'/remove-pdf-password',
'/best-pdf-tools',
'/free-pdf-tools-online',
'/convert-files-online',
] as const;
// ─── Tool routes ─────────────────────────────────────────────────
export const TOOL_ROUTES = [
// PDF Tools
'/tools/pdf-to-word',
'/tools/word-to-pdf',
'/tools/compress-pdf',
'/tools/merge-pdf',
'/tools/split-pdf',
'/tools/rotate-pdf',
'/tools/pdf-to-images',
'/tools/images-to-pdf',
'/tools/watermark-pdf',
'/tools/protect-pdf',
'/tools/unlock-pdf',
'/tools/page-numbers',
'/tools/pdf-editor',
'/tools/pdf-flowchart',
'/tools/pdf-to-excel',
'/tools/remove-watermark-pdf',
'/tools/reorder-pdf',
'/tools/extract-pages',
// Image Tools
'/tools/image-converter',
'/tools/image-resize',
'/tools/compress-image',
'/tools/ocr',
'/tools/remove-background',
// Convert Tools
'/tools/html-to-pdf',
// AI Tools
'/tools/chat-pdf',
'/tools/summarize-pdf',
'/tools/translate-pdf',
'/tools/extract-tables',
// Other Tools
'/tools/qr-code',
'/tools/video-to-gif',
'/tools/word-counter',
'/tools/text-cleaner',
// Phase 2 PDF Conversion
'/tools/pdf-to-pptx',
'/tools/excel-to-pdf',
'/tools/pptx-to-pdf',
'/tools/sign-pdf',
// Phase 2 PDF Extra Tools
'/tools/crop-pdf',
'/tools/flatten-pdf',
'/tools/repair-pdf',
'/tools/pdf-metadata',
// Phase 2 Image & Utility
'/tools/image-crop',
'/tools/image-rotate-flip',
'/tools/barcode-generator',
] as const;
// ─── All routes combined ─────────────────────────────────────────
export const ALL_ROUTES = [...PAGE_ROUTES, ...TOOL_ROUTES] as const;
export type PageRoute = (typeof PAGE_ROUTES)[number];
export type ToolRoute = (typeof TOOL_ROUTES)[number];
export type AppRoute = (typeof ALL_ROUTES)[number];