Export Package

Export Package

After development complete, you need export package to upload to appstore.phpfox.com (opens in a new tab). MetaFox's clients can buy/install it directly from store.

appstore.phpfox.com require a zip file with file contents structure.


WARN: if your package contains frontend source code, backend server have to access to frontend source code before run export.

MFOX_FRONTEND_ROOT="/path/to/frontend root"


Generally, the folder structure of the app is as below

|- backend
|   |- packages
|       |- [vendor]
|           |- [app name]
|               |- composer.json
|               |- config
|               |- src
|- frontend
    |- packages
        |- [vendor]
            |- [app name]
                |- package.json
                |- tsconfig.json
                |- src

A package isn't required to have both backend and frontend folders. If your apps don't need to have Frontend or Backend, you can exclude the corresponding folder. The Language package can include only the backend folder only.


Export theme file

Manual Export

Export package if you can access frontend source from backend server directly.

  • Create a new empty directory export
  • Copy the Frontend to export/frontend/packages/[vendor]/[app name]
  • Copy Backend package to export/backend/packages/[vendor]/[app name]
  • Compress all subfolders inside the export folder to ZIP format. On Linux or Mac machine, you can run following command in terminal: cd export && zip export.zip -r .

AdminCP Export

Clean cache then access /admincp/app/package/browse/installed

AdminCP Export

Command Export

Require if export from command line

Update backend .env

MFOX_STORE_API_TOKEN="Copy from https://appstore.phpfox.com/account-settings/"

Export package command

php artisan package:publish foxdev/theme-chocolate

Release for development channel to testing

php artisan package:publish foxdev/theme-chocolate --release

Release for production to testing

php artisan package:publish foxdev/theme-chocolate --release --production