# PROJECT: BUNNLO MARKETING – COMPLETE ADMIN PANEL & DYNAMIC PRICING MANAGEMENT SYSTEM ## 1. PROJECT OVERVIEW Develop a complete, professional, production-ready Admin Panel for Bunnlo Marketing, a service division of Bunnlo Corporation. Website: marketing.bunnlo.com Bunnlo is an AI-Powered Performance Marketing Agency providing: - Performance Marketing - Meta Ads - Google Ads - SEO - Social Media Marketing - Social Media Optimization - Lead Generation - Verified Lead Generation - Website & Landing Page Development - Content & Creative Design - Marketing Automation - Business Growth Services The primary objective is to build a centralized Admin Panel that allows administrators to manage every marketing service, pricing configuration, package, add-on, discount, tax, AI recommendation rule and other pricing-related settings without modifying PHP source code. The system must be fully dynamic and database-driven. ## 2. TECHNOLOGY STACK Use the following technologies: Backend: - Core PHP (latest stable version supported by hosting) - PHP PDO for database operations - MySQL / MariaDB Frontend: - HTML5 - CSS3 - Bootstrap 5 - JavaScript (Vanilla JS) - AJAX / Fetch API - Bootstrap Icons or Lucide Icons Architecture: - Modular PHP architecture - Reusable components - Secure authentication - Responsive interface - Database-driven CRUD operations IMPORTANT DATABASE CONNECTION INSTRUCTION: I already have a database connection file named: db_connection.php I will manually insert the existing database connection code later. Do NOT generate fake database credentials. Do NOT create another database connection system. Do NOT overwrite or modify my existing db_connection.php. Use this file wherever database connectivity is required. Assume that db_connection.php provides a PDO database connection. If its variable name is not known, create a clearly marked integration point so I can map the existing PDO variable easily. ## 3. PROJECT DIRECTORY STRUCTURE Create an organized directory structure: /admin index.php login.php logout.php dashboard.php /includes header.php sidebar.php navbar.php footer.php auth.php functions.php pricing_functions.php /modules /services /service_categories /service_pricing /lead_pricing /advertising_pricing /seo_pricing /social_media_pricing /packages /addons /industry_pricing /location_pricing /volume_pricing /pricing_rules /discounts /taxes /ai_recommendations /pricing_calculator /pricing_history /orders /clients /settings /ajax services.php pricing.php packages.php pricing_rules.php recommendations.php status.php /assets /css /js /images /database schema.sql seed.sql /db_connection.php Keep the architecture modular. Each module must have its own listing, add, edit, view and delete functionality wherever applicable. Do not create unnecessary duplicate files or duplicate database structures. ## 4. ADMIN AUTHENTICATION & SECURITY Develop a secure admin login system. Features: - Admin Login - Logout - Session Authentication - Password Hashing using password_hash() - Password Verification - Session Regeneration - Role-Based Access Control - Admin Profile - Change Password - Login Activity - Last Login Information - CSRF Protection - Prepared SQL Statements - Server-Side Validation - XSS Protection - Secure File Upload - Access Restriction - Secure Error Handling Never store plain-text passwords. ## 5. ADMIN DASHBOARD Create a professional dashboard displaying: - Total Services - Active Services - Inactive Services - Total Service Categories - Total Packages - Active Packages - Total Add-ons - Active Pricing Rules - Total Pricing Configurations - Recent Price Updates - Recent Orders - Recent Clients - Total Revenue - Pending Payments - Most Popular Services Use database-driven statistics and visual charts. Dashboard should have quick navigation to all major modules. ## 6. SERVICE CATEGORY MANAGEMENT Create complete CRUD functionality. Fields: - Category Name - Category Slug - Description - Category Icon - Display Order - Status - Created At - Updated At Support parent-child categories and subcategories. Example categories: 1. Performance Marketing 2. Lead Generation 3. SEO 4. Social Media Marketing 5. Social Media Management 6. Content & Creative 7. Website Development 8. Marketing Automation 9. Business Growth Services ## 7. SERVICE MANAGEMENT Create a centralized service management module. Fields: - Service Name - Service Slug - Category - Subcategory - Short Description - Full Description - Service Icon - Base Price - Pricing Type - Billing Frequency - Minimum Price - Maximum Price - Setup Fee - One-Time Fee - Monthly Fee - Service Duration - Featured Status - Display Order - Active / Inactive Support multiple pricing models. Pricing Types: - Fixed Price - Per Unit - Per Lead - Per Post - Per Design - Per Video - Per Campaign - Per Keyword - Per Page - Per Hour - Per Day - Per Month - Percentage Based - Custom Pricing Allow multiple services to be selected in one client order. ## 8. SERVICE PRICING MANAGEMENT Build a dedicated pricing configuration system. Every service must support independent pricing configurations. Fields: - Service ID - Pricing Name - Pricing Type - Base Price - Minimum Price - Maximum Price - Setup Fee - Monthly Fee - One-Time Fee - Unit Price - Minimum Quantity - Maximum Quantity - Billing Cycle - Currency - Tax Configuration - Effective From - Effective Until - Status Support multiple pricing configurations for one service where necessary. Allow administrators to activate, deactivate, duplicate and edit pricing configurations. ## 9. LEAD GENERATION PRICING Create a specialized lead pricing module. Lead Types: - Normal Leads - Verified Leads - Premium Qualified Leads - B2B Leads - B2C Leads - Appointment-Based Leads Pricing fields: - Lead Type - Industry - Target Location - Price Per Lead - Minimum Order Quantity - Maximum Order Quantity - Delivery Frequency - Bulk Discount Eligibility - Replacement Policy - Verification Criteria - Status Support quantity-based pricing. Example: 50 Leads = Configured Price 100 Leads = Configured Price 250 Leads = Configured Price 500 Leads = Configured Price 1000 Leads = Configured Price Allow both per-lead pricing and quantity-tier pricing. Do not hardcode example prices. ## 10. ADVERTISING PRICING MANAGEMENT Create a dedicated advertising pricing module. Platforms: - Facebook Ads - Instagram Ads - Google Search Ads - Google Display Ads - YouTube Ads - LinkedIn Ads - Other Platforms Pricing fields: - Platform - Setup Fee - Campaign Setup Fee - Monthly Management Fee - Percentage-Based Management Fee - Minimum Advertising Budget - Maximum Advertising Budget - Creative Charges - Additional Campaign Charges - Billing Frequency - Status Allow administrators to define whether management fees are fixed, percentage-based or both with configurable rules. Keep advertising spend separate from Bunnlo service charges. ## 11. SEO PRICING MANAGEMENT Create SEO pricing configuration for: - On-Page SEO - Off-Page SEO - Technical SEO - Local SEO - E-commerce SEO - Keyword Research - Competitor Analysis - SEO Audit - Monthly SEO Management - Per Page Optimization - Per Keyword Pricing Support fixed, monthly, quantity-based and custom pricing. ## 12. SOCIAL MEDIA PRICING MANAGEMENT Create pricing configuration for: - Facebook Management - Instagram Management - LinkedIn Management - YouTube Management - Social Media Optimization - Content Creation - Social Media Post Design - Reels Creation - Video Editing - Copywriting - Monthly Account Management Pricing options: - Per Post - Per Design - Per Video - Per Platform - Monthly Package - Custom Package ## 13. PACKAGE MANAGEMENT Develop a complete package builder. Package types: - Starter - Growth - Professional - Enterprise - Custom Fields: - Package Name - Package Slug - Package Description - Included Services - Service Quantities - Package Price - Original Price - Discount Type - Discount Value - Billing Cycle - Package Duration - Free Add-ons - Featured Status - Display Order - Status Allow multiple services and add-ons inside one package. Package pricing should support: - One-Time - Monthly - Quarterly - Half-Yearly - Yearly Allow package-specific pricing overrides with clear priority rules. ## 14. ADD-ON PRICING MANAGEMENT Create independent add-on management. Examples: - Landing Page - Extra Ad Creative - Video Editing - WhatsApp Integration - CRM Integration - Conversion Tracking - Extra Campaign - Additional Advertising Platform - Priority Support Fields: - Add-on Name - Description - Pricing Type - Price - Quantity - Billing Frequency - Applicable Services - Status Allow multiple add-ons to be attached to services and packages. ## 15. INDUSTRY-BASED PRICING Create industry management. Examples: - Fashion & Clothing - Healthcare - Food & Restaurant - Gym & Fitness - Education - Real Estate - E-commerce - Automobile - Travel & Tourism - Professional Services Allow industry-specific pricing adjustments. Support: - Fixed Price Override - Percentage Adjustment - Price Multiplier - Special Package - Special Lead Pricing Avoid applying multiple conflicting industry adjustments. ## 16. LOCATION-BASED PRICING Support: - Country - State - City - Local Area - International Location Allow location-specific pricing for selected services and lead generation. Use configurable pricing adjustments and overrides. ## 17. QUANTITY & VOLUME PRICING Create a flexible pricing tier system. Fields: - Service - Minimum Quantity - Maximum Quantity - Unit Price - Fixed Tier Price - Discount Type - Discount Value - Effective Date - Status Support: - Per Unit Pricing - Tier-Based Pricing - Bulk Discount - Minimum Order Quantity - Maximum Order Quantity Prevent overlapping active tiers for the same pricing configuration. ## 18. DYNAMIC PRICING RULE ENGINE This is a core system component. Create configurable rules supporting: - Fixed Price - Per Unit Price - Percentage-Based Price - Quantity-Based Price - Industry-Based Adjustment - Location-Based Adjustment - Platform-Based Pricing - Package-Based Pricing - Conditional Pricing - Minimum Price - Maximum Price - Setup Fee - Monthly Fee - One-Time Fee Each rule must support: - Rule Name - Rule Priority - Conditions - Calculation Type - Calculation Value - Applicable Services - Start Date - End Date - Status Define deterministic pricing precedence: 1. Explicit service-specific override 2. Selected package-specific override 3. Matching quantity tier 4. Matching industry/location adjustment 5. Base service pricing 6. Applicable add-ons 7. Discount 8. Tax Ensure that a single price component is never accidentally applied twice. Allow administrators to test pricing rules before publishing. ## 19. DISCOUNT & COUPON MANAGEMENT Support: - Fixed Discount - Percentage Discount - First Order Discount - Package Discount - Bulk Order Discount - Promotional Discount - Seasonal Discount Fields: - Coupon Code - Discount Type - Discount Value - Maximum Discount - Minimum Order Value - Start Date - Expiry Date - Usage Limit - Per Client Usage Limit - Applicable Services - Applicable Packages - Active / Inactive ## 20. TAX & ADDITIONAL CHARGES Create centralized tax configuration. Fields: - Tax Name - Tax Type - Tax Percentage - Applicable Services - Tax Inclusive / Exclusive - Effective Date - Status Additional charges: - Setup Charge - Service Charge - Urgent Delivery Charge - Convenience Fee - Additional Work Charge Support applicable Indian GST configuration and billing information. Do not assume every service or transaction has the same tax treatment. Allow configuration by applicable service and billing conditions. ## 21. AI RECOMMENDATION SETTINGS Create an admin-controlled AI recommendation module. Features: - Industry-Based Recommendations - Goal-Based Recommendations - Service Recommendations - Platform Recommendations - Budget Recommendations - Lead Quantity Recommendations - Lead Type Recommendations - Package Recommendations - Upselling Recommendations Allow administrators to configure: - Recommendation Name - Industry - Business Goal - Conditions - Recommended Services - Recommended Platforms - Suggested Budget Range - Suggested Package - Priority - Explanation - Status AI must recommend only services and prices available in the database. AI must never invent prices. AI recommendations must not automatically add paid services without client approval. If AI integration is not configured, use deterministic database-driven recommendation rules as a fallback. ## 22. CENTRALIZED PRICING CALCULATOR Build a reusable pricing calculation engine. The calculator must support: - Multiple Selected Services - Service Quantity - Lead Quantity - Selected Lead Type - Advertising Platform - Advertising Budget - Selected Package - Additional Add-ons - Industry Adjustment - Location Adjustment - Coupon Discount - Applicable Tax - Setup Fee - Monthly Fee - One-Time Fee - Advance Payment - Remaining Balance - Recurring Billing The calculation must happen on the PHP server. JavaScript may display live estimates, but the backend must independently recalculate and validate all prices before checkout. Use decimal-safe monetary calculations and a consistent currency configuration. ## 23. PRICING HISTORY & VERSION CONTROL Maintain complete pricing audit history. Store: - Previous Price - New Price - Changed Field - Updated By - Updated At - Change Reason - Pricing Version Features: - Price Change History - Draft Pricing - Publish Pricing - Scheduled Pricing - Restore Previous Configuration - Active Pricing Version Never change previously confirmed order totals when pricing is updated. ## 24. ORDER & CLIENT MANAGEMENT Create initial modules for: - Client List - Client Details - Order List - Order Details - Selected Services - Applied Pricing - Order Total - Payment Status - Order Status - Campaign Status - Order Timeline Support order statuses: - Pending - Awaiting Payment - Paid - Processing - In Progress - Completed - Cancelled - Refunded Store a complete pricing snapshot with every order. ## 25. SYSTEM SETTINGS Create centralized settings for: - Company Name - Company Logo - Website URL - Support Email - Contact Number - Default Currency - Currency Symbol - Timezone - Tax Defaults - Invoice Prefix - Order Prefix - Payment Gateway Configuration - Notification Settings - AI Configuration - System Preferences Never expose secret API keys in frontend HTML or JavaScript. ## 26. DATABASE DESIGN Generate a complete normalized MySQL database schema. Create all required tables with: - Primary Keys - Foreign Keys where supported - Appropriate Indexes - Unique Constraints - Created At - Updated At - Status Fields where necessary Suggested table groups: Authentication: - admins - admin_roles - admin_permissions - admin_role_permissions - admin_login_logs Categories & Services: - service_categories - services - service_pricing - service_platforms Lead Pricing: - lead_types - lead_pricing - lead_pricing_tiers - lead_verification_rules Packages: - packages - package_services - package_addons Add-ons: - addons - service_addons Industry & Location: - industries - industry_pricing - locations - location_pricing Pricing Rules: - pricing_rules - pricing_rule_conditions - pricing_rule_actions - pricing_rule_services - pricing_versions - pricing_history Discounts & Taxes: - coupons - coupon_services - coupon_packages - tax_configurations - additional_charges AI: - ai_recommendation_rules - ai_recommendation_services - ai_recommendation_platforms Clients & Orders: - clients - client_business_profiles - orders - order_items - order_addons - order_pricing_snapshots - payments - invoices System: - system_settings - activity_logs Create appropriate relationships and prevent orphaned records. Use transactions for multi-table operations. Avoid unnecessary duplication and avoid storing calculated values without a clear business reason. ## 27. UI / UX DESIGN REQUIREMENTS Design a premium professional SaaS-style admin dashboard. Visual direction: - Dark professional sidebar - Clean light main workspace - Bunnlo brand identity - Minimal and modern interface - Consistent typography - Professional icons - Organized data tables - Clean modal forms - Responsive layouts - Mobile-friendly navigation - Attractive dashboard cards - Search, filters and pagination Use a consistent design system throughout all modules. Every listing page should support: - Search - Filters - Sorting - Pagination - Status - View - Edit - Duplicate where relevant - Delete with confirmation Every form should support: - Proper validation - Required field indicators - Clear error messages - Success notifications - Loading states Do not use dummy charts or fake statistics in the production dashboard. ## 28. CODING & DELIVERY REQUIREMENTS 1. Generate the complete working PHP source code. 2. Generate the complete MySQL schema.sql. 3. Generate seed.sql with safe initial sample categories and services. 4. Use the existing db_connection.php integration point. 5. Generate all required CRUD operations. 6. Ensure all navigation links work. 7. Ensure all database forms actually save data. 8. Ensure edit and delete functions work. 9. Ensure AJAX requests use proper server-side validation. 10. Ensure responsive layouts. 11. Ensure no hardcoded service prices. 12. Ensure pricing is controlled entirely from Admin Panel. 13. Ensure all modules share the centralized pricing engine. 14. Ensure database transactions for critical operations. 15. Ensure security against SQL injection, XSS and CSRF. 16. Ensure compatibility with Hostinger shared hosting. 17. Avoid Node.js, Python, Laravel or unnecessary server dependencies. 18. Do not require SSH access or background workers. 19. Use standard PHP-compatible cron jobs only if genuinely necessary. 20. Provide installation and configuration instructions. ## 29. FINAL ACCEPTANCE CRITERIA The project is complete only when: - Admin can log in securely. - Admin can create and manage service categories. - Admin can create and manage services. - Admin can set independent service prices. - Admin can configure normal and verified lead prices. - Admin can manage advertising prices. - Admin can create packages. - Admin can create add-ons. - Admin can configure industry and location adjustments. - Admin can configure volume discounts. - Admin can create dynamic pricing rules. - Admin can configure coupons and taxes. - Admin can manage AI recommendation rules. - Pricing calculator produces correct server-side totals. - Price changes are recorded in history. - Old orders preserve their original prices. - All modules use the same database connection. - All modules work with the existing db_connection.php. - All features work on Hostinger shared hosting. IMPORTANT FINAL INSTRUCTION: Do not create a static dashboard or UI-only prototype. Build a real, functional, database-driven Admin Panel. Prioritize correctness, maintainability, security, modularity and real-world production use. Before generating code, inspect the project structure if existing project files are available. Preserve existing files and functionality. Never overwrite db_connection.php. Deliver the project in a deployment-ready folder structure with complete source code and SQL files.