# Rukn Amjad Trading Company - LLM Context File # شركة ركن أمجاد للتجارة - Marble, Ceramics & Porcelain # Established: 2008 (17+ years of experience) # Generated: 2025-10-11 # Auto-updates via llms.php ## Project Overview Company Website: Rukn Amjad Trading Company - Marble, Ceramics & Porcelain Location: Saudi Arabia Languages: Arabic (primary), English (secondary) Tech Stack: PHP 7.4+, MySQL, Bootstrap 5, jQuery, WOW.js Established: 2008 (17+ years of experience in the private sector) ## Purpose Full-featured bilingual business website with: - Content Management System (CMS) - Project portfolio showcase - Service listings - Blog system with comments - Contact & quote request forms - Team member profiles - Client testimonials - Newsletter subscription - SEO optimization - Mobile responsive design ## Color Scheme Primary Gold: #D4AF37 Secondary Black: #000000 Light: #FFFFFF Text: Dark (#000) with gold accents Theme: Luxury, Professional, Modern ## Architecture ### Frontend Structure /frontend/ ├── index.php - Homepage with carousel, services, projects ├── about.php - Company information & team ├── service.php - Services listing ├── service-details.php - Individual service pages ├── project.php - Project portfolio ├── project-details.php - Individual project showcase ├── blog.php - Blog listing with pagination ├── blog-details.php - Single blog post with comments ├── team.php - Team members page ├── testimonial.php - Client testimonials ├── contact.php - Contact form ├── quote.php - Quote request form ├── feature.php - Company features ├── page.php - Dynamic custom pages ├── 404.php - Error page ├── llms.txt - This file ├── llms.php - Auto-generator └── sitemap.xml.php - Dynamic XML sitemap ### Includes /includes/ ├── config.php - Database connection & helper functions ├── header.php - Site header with navigation ├── footer.php - Site footer with widgets ├── page-header.php - Breadcrumb page header └── footer-manual-links.php - Footer links ### Assets /css/ ├── style.css - Main stylesheet (2500+ lines) ├── rtl.css - RTL (Arabic) styles ├── arabic-typography.css - Arabic font optimization ├── image-protection.css - Image watermark & protection ├── logo.css - Company logo styles └── bootstrap.min.css - Bootstrap framework /js/ ├── main.js - Site functionality ├── language-switcher-php.js - Language switching ├── content-protection.js - Content protection └── [libraries] - jQuery, WOW.js, Owl Carousel, etc. ### Backend Structure /backend/ ├── admin/ - Admin dashboard │ ├── blog/ - Blog management │ ├── projects/ - Project management │ ├── services/ - Service management │ ├── team/ - Team members │ ├── carousel/ - Homepage carousel │ ├── features/ - Feature items │ ├── testimonials/ - Client testimonials │ ├── pages/ - Custom pages │ ├── contacts/ - Contact messages │ ├── quotes/ - Quote requests │ ├── newsletter/ - Email subscribers │ ├── media/ - Media library │ └── settings/ - Site settings & SEO ├── api/ - API endpoints │ ├── submit-contact.php │ ├── submit-quote.php │ ├── submit-comment.php │ └── newsletter-subscribe.php ├── assets/uploads/ - User uploaded media └── database.sql - Database schema ## Database Schema ### Main Tables - admins - Admin users - carousel_slides - Homepage slider - services - Service listings - service_categories - Service categorization - projects - Portfolio projects - project_categories - Project categorization - team_members - Team profiles - testimonials - Client reviews - blog_posts - Blog articles - blog_categories - Blog categorization - blog_comments - User comments - features - Company features - pages - Custom pages - contacts - Contact form submissions - quotes - Quote requests - newsletter_subscribers - Email list - settings - Site configuration - site_meta - SEO metadata ### Key Columns Pattern Most content tables have: - id (INT, AUTO_INCREMENT) - title_ar, title_en (bilingual titles) - content_ar, content_en (bilingual content) - slug (URL-friendly identifier) - featured_image (image path) - status (active/inactive or published/draft) - display_order (sorting) - created_at, updated_at (timestamps) - views_count (analytics) ## Key Features ### 1. Bilingual System - Session-based language switching (?lang=ar or ?lang=en) - RTL support for Arabic - All content in both languages - Language switcher in header and footer ### 2. SEO Optimization - Schema.org markup (LocalBusiness, Article, Product, etc.) - Open Graph & Twitter Card meta tags - AI-friendly meta tags - Dynamic XML sitemap - Breadcrumb navigation - Clean URLs with .htaccess - robots.txt ### 3. Image Management - Optimized image delivery - Lazy loading - Responsive images - Watermark protection - Right-click protection ### 4. Forms & APIs - Contact form → backend/api/submit-contact.php - Quote form → backend/api/submit-quote.php - Comment form → backend/api/submit-comment.php - Newsletter → backend/api/newsletter-subscribe.php - AJAX submissions with validation ### 5. Content Protection - Disable right-click on images - Text selection prevention - Keyboard shortcut blocking - Dev tools detection ## Helper Functions (includes/config.php) ### Database Functions - getCarouselSlides() - Get active carousel slides - getFeaturedServices($limit) - Get featured services - getFeaturedProjects($limit) - Get featured projects - getTeamMembers($limit) - Get active team members - getFeaturedTestimonials($limit) - Get testimonials - getBlogPosts($where, $limit, $offset) - Get blog posts - getPageBySlug($slug) - Get custom page ### Utility Functions - getLang() - Get current language (ar/en) - sanitize($data) - Clean user input - truncateText($text, $length) - Shorten text - formatDate($date, $format) - Format dates - incrementViews($table, $id) - Track page views - getSiteSetting($key, $lang) - Get site settings ### SEO Functions - generateMetaTags() - Standard meta tags - generateAIMetaTags() - AI-friendly tags - generateSchemaMarkup() - JSON-LD schemas - generateBreadcrumbSchema() - Breadcrumb markup - generateOpenGraph() - OG tags - generateTwitterCard() - Twitter tags ### Image Functions - getOptimizedImageUrl($path, $type, $size) - Get image URL - displayProtectedImage() - Display with protection ## API Endpoints ### POST /backend/api/submit-contact.php Fields: name, email, subject, message Response: {success: true/false, message: "..."} ### POST /backend/api/submit-quote.php Fields: name, email, phone, service, message Response: {success: true/false, message: "..."} ### POST /backend/api/submit-comment.php Fields: post_id, author_name, author_email, comment Response: {success: true/false, message: "..."} Note: Comments require admin approval ### POST /backend/api/newsletter-subscribe.php Fields: email Response: {success: true/false, message: "..."} ## URL Structure ### Public Pages / - Homepage /about - About us /service - Services listing /service-details?slug=X - Service page /project - Portfolio /project-details?slug=X - Project page /blog - Blog listing /blog-details?slug=X - Blog post /team - Team members /testimonial - Testimonials /contact - Contact form /quote - Quote form /feature - Features /page?slug=X - Custom page /sitemap.xml.php - XML sitemap ### Admin Pages (password protected) /backend/admin/login.php - Admin login /backend/admin/index.php - Dashboard /backend/admin/[module]/ - Module management ## Responsive Breakpoints - XS: < 576px (Mobile) - SM: ≥ 576px (Large mobile) - MD: ≥ 768px (Tablets) - LG: ≥ 992px (Desktops) - XL: ≥ 1200px (Large screens) ## Animation System - WOW.js for scroll animations - Owl Carousel for sliders - Isotope for portfolio filtering - Lightbox for image galleries - Smooth transitions (0.3s ease) ## CSS Classes (Key) .btn-primary - Gold buttons .btn-secondary - Black buttons .bg-primary - Gold background .bg-dark - Black background .text-primary - Gold text .blog-item - Blog card styling .team-item - Team member card .service-item - Service card .portfolio-item - Project card .back-to-top - Scroll to top button ## Browser Support - Chrome/Edge (latest) - Firefox (latest) - Safari (latest) - Mobile browsers (iOS Safari, Chrome Mobile) - IE11 (limited support) ## Performance - Lazy loading images - Minified CSS/JS - CDN for libraries - Database query optimization - Image optimization (WebP support) - Caching headers ## Security - SQL injection prevention (prepared statements) - XSS protection (htmlspecialchars) - CSRF protection (session tokens) - Input validation & sanitization - Password hashing (bcrypt) - Content Security Policy headers ## Development Guidelines ### Adding New Pages 1. Create page.php file 2. Include config.php 3. Set page meta variables 4. Include header.php 5. Add main content 6. Include footer.php 7. Add to navigation ### Adding Blog Posts Use admin panel: /backend/admin/blog/add.php - Bilingual title & content - Featured image - Category - Tags (JSON array) - SEO metadata ### Adding Services/Projects Use admin panel: /backend/admin/[module]/add.php - Bilingual content - Featured image - Category - Specifications (JSON) - Display order ### Database Queries Always use prepared statements: ```php $stmt = $conn->prepare("SELECT * FROM table WHERE id = ?"); $stmt->bind_param("i", $id); $stmt->execute(); $result = $stmt->get_result(); ``` ### Language Support ```php $lang = getLang(); // 'ar' or 'en' $text = $lang == 'ar' ? 'نص عربي' : 'English text'; ``` ### RTL Handling ```php ``` ## Common Tasks ### Update Site Name/Logo File: includes/header.php (line 194-203) ### Update Contact Information Admin panel: Settings → Site Settings ### Add Social Media Links Admin panel: Settings → Social Media ### Change Colors File: css/style.css (lines 2-20, CSS variables) ### Update Footer File: includes/footer.php ### Add Navigation Item File: includes/header.php (navigation section) ## Error Handling - 404 errors redirect to 404.php - Database errors show generic message - Form validation errors show user-friendly messages - Console logging for debugging (removable in production) ## Testing - Test both Arabic and English versions - Check responsive layout on mobile - Verify forms submit correctly - Check image loading and protection - Test navigation and breadcrumbs - Validate HTML/CSS - Check console for JavaScript errors - Test SEO with Google Rich Results Test ## Documentation Files - QUICK-REFERENCE.md - Quick start guide - BACKEND-INTEGRATION-VERIFICATION.md - Backend integration - SEO-AUDIT-COMPLETE.md - SEO implementation - RTL-IMPLEMENTATION-COMPLETE.md - RTL/Arabic support - HEADER-SEO-ENHANCEMENTS.md - Header optimizations - GOOGLE-SEO-2025-IMPLEMENTATION.md - Modern SEO ## Contact & Support This system was built for Rukn Amjad Company. For support, modifications, or questions, refer to documentation files. ## Version Information Current Version: 1.0.0 Last Updated: 2025-10-11 PHP Version: 7.4+ MySQL Version: 5.7+ Bootstrap Version: 5.0.0 --- End of LLM Context File For auto-updated version, visit: /llms.php