تم الانتهاء من آخر دفعة تحسينات على المشروع، وتشمل:

تحويل لوحة الإدارة الداخلية من secret header إلى session auth حقيقي مع صلاحيات admin.
إضافة دعم إدارة الأدوار من داخل لوحة الإدارة نفسها، مع حماية الحسابات المعتمدة عبر INTERNAL_ADMIN_EMAILS.
تحسين بيانات المستخدم في الواجهة والباكند لتشمل role وis_allowlisted_admin.
إضافة اختبار frontend مخصص لصفحة /internal/admin بدل الاعتماد فقط على build واختبار routes.
تحسين إضافي في الأداء عبر إزالة الاعتماد على pdfjs-dist/pdf.worker في عدّ صفحات PDF واستبداله بمسار أخف باستخدام pdf-lib.
تحسين تقسيم الـ chunks في build لتقليل أثر الحزم الكبيرة وفصل أجزاء مثل network, icons, pdf-core, وeditor.
التحقق الذي تم:

نجاح build للواجهة.
نجاح اختبار صفحة الإدارة الداخلية في frontend.
نجاح اختبارات auth/admin في backend.
نجاح full backend suite مسبقًا مع EXIT:0.
ولو تريد نسخة أقصر جدًا، استخدم هذه:

آخر التحديثات:
تم تحسين نظام الإدارة الداخلية ليعتمد على صلاحيات وجلسات حقيقية بدل secret header، مع إضافة إدارة أدوار من لوحة admin نفسها، وإضافة اختبارات frontend مخصصة للوحة، وتحسين أداء الواجهة عبر إزالة pdf.worker وتحسين تقسيم الـ chunks في build. جميع الاختبارات والتحققات الأساسية المطلوبة نجح
This commit is contained in:
Your Name
2026-03-16 13:50:45 +02:00
parent b5d97324a9
commit 957d37838c
85 changed files with 9915 additions and 119 deletions

View File

@@ -18,6 +18,9 @@ export const PAGE_ROUTES = [
'/contact',
'/pricing',
'/blog',
'/blog/:slug',
'/developers',
'/internal/admin',
] as const;
// ─── Tool routes ─────────────────────────────────────────────────
@@ -63,6 +66,23 @@ export const TOOL_ROUTES = [
'/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 ─────────────────────────────────────────

View File

@@ -664,6 +664,221 @@ export const TOOLS_SEO: ToolSEO[] = [
{ question: 'Can I convert text to uppercase?', answer: 'Yes, you can convert text to uppercase, lowercase, or title case with a single click.' },
],
},
// ─── PHASE 2 PDF CONVERSION ──────────────────────────────
{
i18nKey: 'pdfToPptx',
slug: 'pdf-to-pptx',
titleSuffix: 'Free Online PDF to PowerPoint Converter',
metaDescription: 'Convert PDF files to PowerPoint (PPTX) presentations online for free. Each PDF page becomes a slide.',
category: 'Convert',
relatedSlugs: ['pptx-to-pdf', 'pdf-to-word', 'pdf-to-excel', 'pdf-to-images'],
keywords: 'pdf to pptx, pdf to powerpoint, convert pdf to pptx, pdf to slides',
features: [
'Convert each PDF page to a PowerPoint slide',
'High-quality image rendering',
'No software installation needed',
'Files auto-deleted after 30 minutes',
],
faqs: [
{ question: 'How do I convert PDF to PowerPoint?', answer: 'Upload your PDF and our tool converts each page into a slide in a PPTX file. Download the result when ready.' },
{ question: 'Is formatting preserved?', answer: 'Each page is rendered as a high-quality image on its own slide, preserving the visual layout perfectly.' },
],
},
{
i18nKey: 'excelToPdf',
slug: 'excel-to-pdf',
titleSuffix: 'Free Online Excel to PDF Converter',
metaDescription: 'Convert Excel spreadsheets (XLSX, XLS) to PDF documents online for free. Preserve your table formatting.',
category: 'Convert',
relatedSlugs: ['pdf-to-excel', 'word-to-pdf', 'pptx-to-pdf'],
keywords: 'excel to pdf, xlsx to pdf, convert excel to pdf, spreadsheet to pdf',
features: [
'Convert XLSX and XLS files to PDF',
'Preserves table formatting and layout',
'Powered by LibreOffice for accurate conversion',
'Free with no signup required',
],
faqs: [
{ question: 'Which Excel formats are supported?', answer: 'We support both XLSX (modern) and XLS (legacy) Excel formats.' },
{ question: 'Will my formulas be visible?', answer: 'The PDF will show the computed values, not the formulas, just like a print preview.' },
],
},
{
i18nKey: 'pptxToPdf',
slug: 'pptx-to-pdf',
titleSuffix: 'Free Online PowerPoint to PDF Converter',
metaDescription: 'Convert PowerPoint presentations (PPTX, PPT) to PDF online for free. Perfect for sharing slides.',
category: 'Convert',
relatedSlugs: ['pdf-to-pptx', 'word-to-pdf', 'excel-to-pdf'],
keywords: 'pptx to pdf, powerpoint to pdf, convert pptx to pdf, ppt to pdf',
features: [
'Convert PPTX and PPT files to PDF',
'Preserves slide layout and graphics',
'Ideal for sharing presentations',
'No account needed',
],
faqs: [
{ question: 'Which PowerPoint formats work?', answer: 'Both PPTX and legacy PPT formats are supported.' },
{ question: 'Are animations preserved?', answer: 'PDF is a static format, so animations are not included, but all slide content and layout are preserved.' },
],
},
{
i18nKey: 'signPdf',
slug: 'sign-pdf',
titleSuffix: 'Free Online PDF Signer',
metaDescription: 'Add your signature image to any PDF document online for free. Sign PDF files without printing.',
category: 'PDF',
relatedSlugs: ['protect-pdf', 'watermark-pdf', 'pdf-editor', 'flatten-pdf'],
keywords: 'sign pdf, add signature to pdf, pdf signer, electronic signature pdf',
features: [
'Upload your signature image (PNG/JPG)',
'Place signature on any page',
'No printing or scanning needed',
'Secure — files deleted after 30 minutes',
],
faqs: [
{ question: 'How do I sign a PDF?', answer: 'Upload your PDF and a signature image (PNG or JPG). Choose the page and position, then download the signed PDF.' },
{ question: 'Is this a legal electronic signature?', answer: 'This tool places a visual signature image on the PDF. For legally binding digital signatures, a certificate-based solution may be required depending on your jurisdiction.' },
],
},
// ─── PHASE 2 PDF EXTRA TOOLS ─────────────────────────────
{
i18nKey: 'cropPdf',
slug: 'crop-pdf',
titleSuffix: 'Free Online PDF Cropper',
metaDescription: 'Crop PDF pages by adjusting margins online for free. Trim unwanted whitespace from your documents.',
category: 'PDF',
relatedSlugs: ['rotate-pdf', 'split-pdf', 'pdf-editor', 'flatten-pdf'],
keywords: 'crop pdf, trim pdf, pdf cropper, remove pdf margins, resize pdf pages',
features: [
'Adjust margins (top, bottom, left, right)',
'Crop all or specific pages',
'Remove unnecessary whitespace',
'Free and no signup required',
],
faqs: [
{ question: 'How do I crop a PDF?', answer: 'Upload your PDF, set the margin values to trim from each side, and download the cropped version.' },
{ question: 'Can I crop specific pages?', answer: 'Yes, you can specify which pages to crop or apply cropping to all pages at once.' },
],
},
{
i18nKey: 'flattenPdf',
slug: 'flatten-pdf',
titleSuffix: 'Free Online PDF Flattener',
metaDescription: 'Flatten PDF forms and annotations online for free. Convert interactive form fields into fixed content.',
category: 'PDF',
relatedSlugs: ['protect-pdf', 'sign-pdf', 'repair-pdf', 'pdf-editor'],
keywords: 'flatten pdf, pdf flattener, remove form fields, flatten annotations',
features: [
'Remove interactive form fields',
'Flatten annotations into fixed content',
'Prevent further editing of form data',
'Ideal for archiving filled forms',
],
faqs: [
{ question: 'What does flattening a PDF mean?', answer: 'Flattening converts interactive elements (form fields, annotations) into static content that cannot be edited further.' },
{ question: 'Why should I flatten a PDF?', answer: 'Flattening is useful for archiving filled forms, reducing file size, and preventing accidental changes to form data.' },
],
},
{
i18nKey: 'repairPdf',
slug: 'repair-pdf',
titleSuffix: 'Free Online PDF Repair Tool',
metaDescription: 'Repair corrupted or damaged PDF files online for free. Fix broken PDFs and recover content.',
category: 'PDF',
relatedSlugs: ['flatten-pdf', 'compress-pdf', 'unlock-pdf', 'pdf-metadata'],
keywords: 'repair pdf, fix pdf, broken pdf, corrupted pdf, pdf recovery',
features: [
'Fix corrupted PDF structures',
'Recover readable pages from damaged files',
'Re-write clean PDF output',
'Free with no file size limits',
],
faqs: [
{ question: 'Can this fix any broken PDF?', answer: 'Our tool attempts to recover as many pages as possible. Severely corrupted files may only be partially recoverable.' },
{ question: 'Is my data safe?', answer: 'Yes, all files are processed securely and deleted within 30 minutes.' },
],
},
{
i18nKey: 'pdfMetadata',
slug: 'pdf-metadata',
titleSuffix: 'Free Online PDF Metadata Editor',
metaDescription: 'View and edit PDF metadata (title, author, subject, keywords) online for free.',
category: 'PDF',
relatedSlugs: ['pdf-editor', 'repair-pdf', 'protect-pdf', 'flatten-pdf'],
keywords: 'pdf metadata, edit pdf properties, pdf title, pdf author, pdf info editor',
features: [
'Edit title, author, subject, keywords',
'Set custom creator information',
'View existing metadata before editing',
'Free online tool — no installation',
],
faqs: [
{ question: 'What is PDF metadata?', answer: 'PDF metadata includes properties like title, author, subject, and keywords embedded in the document. Search engines and document managers use this information.' },
{ question: 'Can I remove metadata?', answer: 'Yes, leave fields blank to remove existing metadata values.' },
],
},
// ─── PHASE 2 IMAGE & UTILITY ─────────────────────────────
{
i18nKey: 'imageCrop',
slug: 'image-crop',
titleSuffix: 'Free Online Image Cropper',
metaDescription: 'Crop images online for free. Specify exact pixel coordinates to trim your photos and graphics.',
category: 'Image',
relatedSlugs: ['image-resize', 'image-rotate-flip', 'compress-image', 'image-converter'],
keywords: 'crop image, image cropper, trim image, cut image, photo crop',
features: [
'Specify exact crop coordinates in pixels',
'Supports PNG, JPG, and WebP',
'High-quality output',
'Free — no watermarks added',
],
faqs: [
{ question: 'How do I crop an image?', answer: 'Upload your image, enter the left, top, right, and bottom pixel coordinates for the crop area, then download the result.' },
{ question: 'What formats are supported?', answer: 'PNG, JPG/JPEG, and WebP images are supported.' },
],
},
{
i18nKey: 'imageRotateFlip',
slug: 'image-rotate-flip',
titleSuffix: 'Free Online Image Rotate & Flip Tool',
metaDescription: 'Rotate and flip images online for free. Rotate by 90°, 180°, or 270° and flip horizontally or vertically.',
category: 'Image',
relatedSlugs: ['image-crop', 'image-resize', 'compress-image', 'image-converter'],
keywords: 'rotate image, flip image, image rotator, mirror image, image orientation',
features: [
'Rotate images by 90°, 180°, or 270°',
'Flip horizontally or vertically',
'Combine rotation and flip in one step',
'Supports PNG, JPG, and WebP',
],
faqs: [
{ question: 'Can I rotate and flip at the same time?', answer: 'Yes, you can combine rotation and flip operations in a single step.' },
{ question: 'Does rotating affect quality?', answer: 'No, rotation is lossless for PNG. For JPG, the quality is preserved as closely as possible.' },
],
},
{
i18nKey: 'barcode',
slug: 'barcode-generator',
titleSuffix: 'Free Online Barcode Generator',
metaDescription: 'Generate barcodes online for free. Supports Code128, Code39, EAN-13, UPC-A, ISBN, and more formats.',
category: 'Utility',
relatedSlugs: ['qr-code'],
keywords: 'barcode generator, create barcode, code128, ean13, upc barcode, free barcode',
features: [
'Support for Code128, Code39, EAN-13, UPC-A, ISBN and more',
'Output as PNG or SVG',
'Instant generation with preview',
'Free with no limits',
],
faqs: [
{ question: 'What barcode formats are supported?', answer: 'We support Code128, Code39, EAN-13, EAN-8, UPC-A, ISBN-13, ISBN-10, ISSN, and PZN barcode formats.' },
{ question: 'What is the difference between a barcode and a QR code?', answer: 'Barcodes are one-dimensional (linear) and hold less data. QR codes are two-dimensional and can store more information. Use both from our tools.' },
],
},
];
/** Look up a tool's SEO data by slug */