{
  "name": "Android WordPress",
  "slug": "android-wordpress",
  "description": "Build native Android apps for WordPress.com sites using the REST API",
  "version": "1.0.0",
  "author": "Titan Systems",
  "author_url": "https://codecanyon.net/user/titansystems",
  "type": "platform",
  "icon": "resources/images/icon.jpg",
  "main_class": "AndroidWordPressPlatform.php",
  "namespace": "App\\Plugins\\Platforms\\AndroidWordPress",
  "requirements": {
    "php": ">=8.2",
    "laravel": ">=12.0"
  },
  "migrations": [
    "database/migrations/2025_12_26_000000_create_android_wordpress_configs_table.php",
    "database/migrations/2025_12_26_000001_create_app_pages_table_if_not_exists.php"
  ],
  "livewire_components": [
    "Livewire/AppCreationForm.php",
    "Livewire/AppSidebar.php",
    "Livewire/AppPreviewPanel.php",
    "Livewire/BuildModal.php",
    "Livewire/BuildsTable.php",
    "Livewire/DeleteBuildModal.php",
    "Livewire/BuildLogsModal.php",
    "Livewire/BuildDownloadModal.php",
    "Livewire/AppGeneralSettings.php",
    "Livewire/AppDesignSettings.php",
    "Livewire/AppContentSettings.php",
    "Livewire/AppFeaturesSettings.php",
    "Livewire/AppIconSettings.php",
    "Livewire/AppSplashscreenSettings.php",
    "Livewire/AppNotificationsSettings.php",
    "Livewire/AppNavigationSettings.php",
    "Livewire/AppDrawerSettings.php",
    "Livewire/AppSigningKeysSettings.php",
    "Livewire/DeleteIconModal.php",
    "Livewire/DeleteKeystoreModal.php",
    "Livewire/EditKeystoreModal.php",
    "Livewire/SigningKeyUploadModal.php",
    "Livewire/DeleteSplashscreenImageModal.php",
    "Livewire/DeleteSplashscreenLogoModal.php",
    "Livewire/DeleteDrawerBackgroundModal.php",
    "Livewire/DeleteDrawerLogoDarkModal.php",
    "Livewire/DeleteDrawerLogoLightModal.php",
    "Livewire/HostedPagesSettings.php",
    "Livewire/HostedPageEditorModal.php",
    "Livewire/DeleteHostedPageModal.php"
  ],
  "settings": {
    "content_type": "wordpress",
    "default_build_format": "apk",
    "min_sdk_version": 24,
    "target_sdk_version": 35,
    "build_tools_version": "35.0.0",
    "supports_oauth": true,
    "package_prefix": "com"
  },
  "ai_system_context": "This platform creates native Android apps for WordPress.com sites. It displays posts, pages, categories using native Jetpack Compose UI with Material Design 3. Features include: offline caching, bookmarks, search, comments (with OAuth authentication), and customizable themes. Layout options: app_bar (simple), app_bar_tabs (bottom navigation), app_bar_drawer (side drawer). Navigation items can target: categories, tags, search, bookmarks, hosted pages, or external URLs. Use getAppConfig to get full configuration before making changes.",
  "ai_functions": [
    {
      "name": "getAppConfig",
      "description": "Get the complete app configuration for AI context",
      "parameters": {
        "type": "object",
        "properties": {}
      }
    },
    {
      "name": "setGeneralSettings",
      "description": "Configure general app settings like WordPress site URL, name, version, orientation",
      "parameters": {
        "type": "object",
        "properties": {
          "siteUrl": {
            "type": "string",
            "description": "WordPress site URL (e.g., https://myblog.wordpress.com)"
          },
          "appName": {
            "type": "string",
            "description": "Display name of the app (max 255 chars)"
          },
          "versionName": {
            "type": "string",
            "description": "App version name in X.Y.Z format"
          },
          "versionCode": {
            "type": "integer",
            "description": "App version code (positive integer)"
          },
          "screenOrientation": {
            "type": "string",
            "enum": ["system", "portrait", "landscape"],
            "description": "Screen orientation lock"
          },
          "appLanguage": {
            "type": "string",
            "description": "App language code (e.g., 'en', 'es')"
          }
        }
      }
    },
    {
      "name": "setDesignSettings",
      "description": "Configure visual design including theme, layout template, and layout style",
      "parameters": {
        "type": "object",
        "properties": {
          "themeColor": {
            "type": "string",
            "description": "Primary theme color in hex format (e.g., #21759B)"
          },
          "enableDynamicColors": {
            "type": "boolean",
            "description": "Enable Material You dynamic colors"
          },
          "layoutTemplate": {
            "type": "string",
            "enum": ["list", "app_bar", "app_bar_tabs", "app_bar_drawer"],
            "description": "App layout style"
          },
          "layoutStyle": {
            "type": "string",
            "enum": ["list", "grid", "magazine"],
            "description": "Post list display style"
          }
        }
      }
    },
    {
      "name": "setColorScheme",
      "description": "Configure text and navigation tab colors",
      "parameters": {
        "type": "object",
        "properties": {
          "textColorLight": {
            "type": "string",
            "description": "Text color for light mode (hex)"
          },
          "textColorDark": {
            "type": "string",
            "description": "Text color for dark mode (hex)"
          },
          "navTabIconColorLight": {
            "type": "string",
            "description": "Tab icon color for light mode (hex)"
          },
          "navTabIconColorDark": {
            "type": "string",
            "description": "Tab icon color for dark mode (hex)"
          },
          "activeTabColorLight": {
            "type": "string",
            "description": "Active tab color for light mode (hex)"
          },
          "activeTabColorDark": {
            "type": "string",
            "description": "Active tab color for dark mode (hex)"
          }
        }
      }
    },
    {
      "name": "setContentSettings",
      "description": "Configure WordPress content display settings",
      "parameters": {
        "type": "object",
        "properties": {
          "postsPerPage": {
            "type": "integer",
            "description": "Number of posts per page (5-100)"
          },
          "showAuthor": {
            "type": "boolean",
            "description": "Show post author"
          },
          "showDate": {
            "type": "boolean",
            "description": "Show post date"
          },
          "showExcerpt": {
            "type": "boolean",
            "description": "Show post excerpt"
          },
          "showFeaturedImage": {
            "type": "boolean",
            "description": "Show featured image"
          },
          "showCategories": {
            "type": "boolean",
            "description": "Show post categories"
          },
          "showReadingTime": {
            "type": "boolean",
            "description": "Show estimated reading time"
          }
        }
      }
    },
    {
      "name": "setFeaturesSettings",
      "description": "Configure app features like comments, search, bookmarks, offline reading",
      "parameters": {
        "type": "object",
        "properties": {
          "enableComments": {
            "type": "boolean",
            "description": "Enable comments section"
          },
          "enableSearch": {
            "type": "boolean",
            "description": "Enable post search"
          },
          "enableBookmarks": {
            "type": "boolean",
            "description": "Enable post bookmarking"
          },
          "enableOfflineReading": {
            "type": "boolean",
            "description": "Enable offline reading with caching"
          },
          "enableShare": {
            "type": "boolean",
            "description": "Enable post sharing"
          },
          "enableUserAuth": {
            "type": "boolean",
            "description": "Enable user authentication (requires OAuth config)"
          }
        }
      }
    },
    {
      "name": "setNavigationItems",
      "description": "Configure bottom navigation tabs (max 5 items)",
      "parameters": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "description": "Navigation items (max 5)",
            "items": {
              "type": "object",
              "properties": {
                "label": { "type": "string", "description": "Tab label" },
                "actionType": {
                  "type": "string",
                  "enum": ["category", "tag", "search", "bookmarks", "hosted_page", "internal", "external"],
                  "description": "Type of action"
                },
                "value": { "type": "string", "description": "Category ID, tag ID, page ID, or URL" },
                "icon": { "type": "string", "description": "Material icon name" },
                "isHome": { "type": "boolean", "description": "Is this the home tab?" }
              }
            }
          }
        },
        "required": ["items"]
      }
    },
    {
      "name": "setDrawerItems",
      "description": "Configure drawer menu items (max 10 items)",
      "parameters": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": { "type": "string", "description": "Menu item label" },
                "actionType": {
                  "type": "string",
                  "enum": ["category", "tag", "search", "bookmarks", "hosted_page", "internal", "external"],
                  "description": "Type of action"
                },
                "value": { "type": "string", "description": "Category ID, tag ID, page ID, or URL" },
                "icon": { "type": "string", "description": "Material icon name" },
                "isHome": { "type": "boolean", "description": "Is this the home item?" }
              }
            }
          }
        },
        "required": ["items"]
      }
    },
    {
      "name": "setDrawerCustomization",
      "description": "Customize drawer appearance including colors, logo, and header text",
      "parameters": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "enum": ["default", "color", "image"],
            "description": "Drawer background mode"
          },
          "backgroundColor": { "type": "string", "description": "Background color (hex)" },
          "logoEnabled": { "type": "boolean", "description": "Show logo in drawer header" },
          "logoSize": { "type": "integer", "description": "Logo size in pixels (40-200)" },
          "title": { "type": "string", "description": "Drawer header title" },
          "subtitle": { "type": "string", "description": "Drawer header subtitle" },
          "textTheme": { "type": "string", "enum": ["light", "dark"], "description": "Text color theme" }
        }
      }
    },
    {
      "name": "setNavigationBehaviors",
      "description": "Configure navigation behaviors",
      "parameters": {
        "type": "object",
        "properties": {
          "pullToRefresh": { "type": "boolean", "description": "Enable pull-to-refresh" },
          "swipeNavigation": { "type": "boolean", "description": "Enable swipe between tabs" },
          "preserveTabState": { "type": "boolean", "description": "Preserve tab state" }
        }
      }
    },
    {
      "name": "setAppBarButtons",
      "description": "Configure top action bar buttons (max 3)",
      "parameters": {
        "type": "object",
        "properties": {
          "buttons": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": { "type": "string", "description": "Button label" },
                "actionType": {
                  "type": "string",
                  "enum": ["search", "bookmarks", "hosted_page", "internal", "external", "share"],
                  "description": "Type of action"
                },
                "value": { "type": "string", "description": "Action value" },
                "icon": { "type": "string", "description": "Material icon name" }
              },
              "required": ["label", "actionType", "icon"]
            }
          }
        },
        "required": ["buttons"]
      }
    },
    {
      "name": "setSplashscreen",
      "description": "Configure splash screen basic settings",
      "parameters": {
        "type": "object",
        "properties": {
          "backgroundColor": { "type": "string", "description": "Background color (hex)" },
          "title": { "type": "string", "description": "Splash screen title" },
          "subtitle": { "type": "string", "description": "Splash screen subtitle" }
        }
      }
    },
    {
      "name": "setSplashscreenDetails",
      "description": "Configure detailed splash screen settings",
      "parameters": {
        "type": "object",
        "properties": {
          "backgroundType": { "type": "string", "enum": ["color", "image"] },
          "backgroundColor": { "type": "string", "description": "Background color (hex)" },
          "duration": { "type": "integer", "description": "Duration in seconds (1-10)" },
          "logoEnabled": { "type": "boolean", "description": "Show logo" },
          "logoSize": { "type": "integer", "description": "Logo size (60-240)" },
          "title": { "type": "string", "description": "Title text" },
          "subtitle": { "type": "string", "description": "Subtitle text" },
          "textTheme": { "type": "string", "enum": ["light", "dark"] }
        }
      }
    },
    {
      "name": "setSigningKey",
      "description": "Select a keystore for signing release builds",
      "parameters": {
        "type": "object",
        "properties": {
          "keystoreId": {
            "type": "integer",
            "description": "Keystore ID (0 to clear)"
          }
        },
        "required": ["keystoreId"]
      }
    },
    {
      "name": "setNotificationConfiguration",
      "description": "Enable or disable push notifications. Firebase files (google-services.json and service account) must be uploaded via the Notifications tab.",
      "parameters": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Enable or disable push notifications"
          }
        },
        "required": ["enabled"]
      }
    },
    {
      "name": "triggerBuild",
      "description": "Start building the Android app",
      "parameters": {
        "type": "object",
        "properties": {
          "format": {
            "type": "string",
            "enum": ["apk", "aab"],
            "description": "APK for testing, AAB for Play Store"
          }
        },
        "required": ["format"]
      }
    },
    {
      "name": "getAppStatus",
      "description": "Get current app status summary",
      "parameters": {
        "type": "object",
        "properties": {}
      }
    },
    {
      "name": "createHostedPage",
      "description": "Create a new hosted HTML page",
      "parameters": {
        "type": "object",
        "properties": {
          "title": { "type": "string", "description": "Page title (max 100 chars)" },
          "template": {
            "type": "string",
            "enum": ["blank", "about-us", "contact", "terms", "faq"],
            "description": "Pre-built template"
          },
          "status": { "type": "string", "enum": ["draft", "published"] }
        },
        "required": ["title"]
      }
    },
    {
      "name": "listHostedPages",
      "description": "List all hosted pages for the app",
      "parameters": { "type": "object", "properties": {} }
    },
    {
      "name": "updateHostedPage",
      "description": "Update hosted page title or status",
      "parameters": {
        "type": "object",
        "properties": {
          "pageId": { "type": "integer", "description": "Page ID" },
          "title": { "type": "string", "description": "New title" },
          "status": { "type": "string", "enum": ["draft", "published"] }
        },
        "required": ["pageId"]
      }
    },
    {
      "name": "editHostedPage",
      "description": "Edit hosted page content",
      "parameters": {
        "type": "object",
        "properties": {
          "pageId": { "type": "integer", "description": "Page ID" },
          "htmlContent": { "type": "string", "description": "HTML content" },
          "cssContent": { "type": "string", "description": "CSS styles" },
          "jsContent": { "type": "string", "description": "JavaScript code" }
        },
        "required": ["pageId"]
      }
    },
    {
      "name": "deleteHostedPage",
      "description": "Delete a hosted page",
      "parameters": {
        "type": "object",
        "properties": {
          "pageId": { "type": "integer", "description": "Page ID" }
        },
        "required": ["pageId"]
      }
    }
  ]
}
