=== Posra – Mobile App Builder for WooCommerce and Marketplaces ===
Contributors: posra
Tags: dokan, wcfm, website to app, android app, push notifications
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

See your WooCommerce store or multi vendor marketplace (Dokan, WCFM, MultiVendorX, WC Vendors, YITH and more) as a real mobile app in 2 minutes. Free, no account, nothing is sent until you say so.

== Description ==

**Your store already looks like an app. See it.**

Posra shows you exactly what your WooCommerce store looks like as a native mobile app — your logo, your colors, your real products — on your own phone, within two minutes of clicking **Generate my app preview**.

**How it works**

1. Install and activate. Nothing leaves your site at this step.
2. Review what the plugin found — your brand, products and categories, gathered locally with WordPress's own APIs.
3. Click **Generate my app preview**. This is the moment, with your permission, that your store name, logo, brand color and product catalog structure are sent to the Posra service to build your preview. What is sent is spelled out right above the button.
4. Scan the QR code with the free [Posra Preview app on Google Play](https://play.google.com/store/apps/details?id=app.posra.preview) (iOS coming soon).
5. Browse your own store as a native app — banners, categories, product grids, cart, and your site's own checkout.

**Customize instantly**

Change your brand color, corner style and layout preset right from wp-admin and watch the phone preview update live.

**What the free preview includes**

* Unlimited previewing on your own devices
* Live design customization (brand color, corner radius, three layout presets)
* Marketplace vendor showcase for Dokan, WCFM Marketplace, MultiVendorX, WC Vendors, YITH Multi Vendor, WooCommerce Product Vendors, MarketKing and Webkul
* Product Add-Ons, Bookings and Auctions rendered natively when those WooCommerce extensions are installed
* No account required, ever, for previewing

**Works with every major multi vendor plugin**

Multi vendor marketplaces are a first-class use case. On a WooCommerce marketplace running Dokan, WCFM Marketplace, MultiVendorX (formerly WC Marketplace), WC Vendors, YITH WooCommerce Multi Vendor, WooCommerce Product Vendors, MarketKing or Webkul's Multi Vendor Marketplace, the plugin detects it automatically and the preview adds a vendor showcase. Published apps carry vendor store pages, vendor browsing and vendor ratings, and because checkout runs on your own site, orders are split exactly the way your marketplace plugin already splits them. Vendors keep managing their shops exactly as they do today; the app simply gives your customers a native storefront for the whole marketplace.

**Order updates in the app**

Once your store is paired, the plugin posts an order-status event to Posra whenever an order changes status — the order number, the new status and your store's numeric customer id, nothing else — so the shopper's app can show "Order #123 confirmed" as a push notification. No names, emails or addresses are involved.

**Publishing your real app**

When you're ready to put your app on Google Play and the Apple App Store, publishing is a separate paid Posra service (from $29/month). Your design and store connection carry over with nothing to redo, and the app ships under your own developer accounts. The preview stays free.

== External service disclosure ==

This plugin works with **Posra** (https://posra.app), a third-party service, to generate your mobile app preview.

**No data is sent anywhere until you click "Generate my app preview" in the plugin settings.** When you do, the plugin transmits your store name, site URL, logo URL, brand color, product and category counts and your WordPress/WooCommerce version, and issues a site-specific pairing token that lets the service read your product catalog structure (names, prices, images, categories, vendors) through this plugin's REST endpoint. If you later publish an app and connect WooCommerce REST API keys (Read/Write) in the Posra dashboard, the same pairing token plus those keys let the service check a shopper's own store login and sign that shopper into your site's checkout; site staff accounts are always refused. After pairing, order-status changes are posted as events carrying the order number, the status and the store's numeric customer id, so the shopper's app can show order updates. **Customer names, emails, addresses, passwords and REST API keys are never transmitted.**

You can revoke access at any time: deactivating the plugin revokes the preview token; "Delete preview data & revoke access" on the plugin page, or uninstalling, deletes the preview data on the service as well. Publishing a real app to the app stores is a separate paid service.

Terms of service: https://posra.app/terms
Privacy policy: https://posra.app/privacy
Prohibited products policy: https://posra.app/prohibited-products

== Source code ==

The plugin bundles two compiled JavaScript files, built with Vite from TypeScript/React source:

* `assets/js/preview-renderer.js` — the phone-preview renderer (window.PosraRenderer)
* `assets/js/qrcode.min.js` — a thin wrapper around the MIT-licensed `qrcode` npm package (v1.5.x)

The complete human-readable source for both bundles, including the build configuration, is available at https://posra.app/source/posra-preview-src.zip (updated with every release). `assets/js/admin.js` ships unminified.

== Screenshots ==

1. The consent screen (WooCommerce → Posra App) right after activation: the locally gathered store summary, the plain-language disclosure box, and the "Generate my app preview" button. Nothing has been sent anywhere yet.
2. QR pairing screen with the three-step guide and the live in-admin phone preview.
3. Live phone preview beside the brand color, corner radius and layout controls in wp-admin.
4. Your real store running in the Posra Preview app on a phone.

== Installation ==

1. Upload the plugin to `/wp-content/plugins/` or install it from the Plugins screen.
2. Activate it. Nothing is sent anywhere.
3. Go to **WooCommerce → Posra App**, review the disclosure, and click **Generate my app preview**.
4. Install the free Posra Preview app from Google Play (https://play.google.com/store/apps/details?id=app.posra.preview) on your phone and scan the QR code. iOS is coming soon.

== Frequently Asked Questions ==

= Is the preview really free? =
Yes — previewing on your own devices is free, with no account. You only pay if you choose to publish your app to the public app stores.

= Do you see my customers or orders? =
No. The preview needs only your catalog structure — product names, prices, images, categories, vendors. Once paired, order-status events carry the order number, the status and a numeric customer id so the shopper's app can show order updates; customer names, emails and addresses never leave your site.

= Does it slow down my store? =
No. The plugin runs only in wp-admin and adds no scripts or styles to your shop pages.

= I run a multi vendor marketplace — is that supported? =
Yes. Dokan, WCFM Marketplace, MultiVendorX, WC Vendors, YITH Multi Vendor, WooCommerce Product Vendors, MarketKing and Webkul are detected automatically: the preview includes a vendor showcase, and published marketplace apps carry vendor store pages, vendor browsing and vendor ratings, with checkout — and order splitting — handled by your own site.

= Does the plugin change how my site sends email? =
Not unless you ask it to. If you define `POSRA_SMTP_HOST` (and optionally `POSRA_SMTP_PORT`, `POSRA_SMTP_USER`, `POSRA_SMTP_PASS`, `POSRA_SMTP_SECURE`, `POSRA_SMTP_FROM`) in `wp-config.php`, WordPress mail is routed through that SMTP server — useful when a host blocks PHP mail and app shoppers never receive their password resets. With no constant defined the plugin does not touch email at all, and the server is yours: nothing is sent to Posra.

= What happens if I uninstall? =
Deactivation revokes the preview connection immediately. Uninstalling, or clicking "Delete preview data & revoke access", deletes all plugin data locally and removes your site's preview data from the Posra service.

= Where do I get the Posra Preview app? =
On Google Play: https://play.google.com/store/apps/details?id=app.posra.preview — it is free and needs no account. The iOS version is coming soon; until then you can preview on any Android phone.

= Which platforms can I publish to? =
Published apps go to Google Play and the Apple App Store under your own developer accounts, which Posra helps you set up. That is required by Apple's guidelines and it means you fully own your app.

== Changelog ==

= 1.1.0 =
* Marketplace support for MultiVendorX (4.x and 5.x), WC Vendors, YITH WooCommerce Multi Vendor, WooCommerce Product Vendors, MarketKing and Webkul, alongside Dokan and WCFM. Detection stays local; vendor data still flows only after you generate a preview.
* Vendor filtering follows each plugin's own model (author, store term or store id), so "shop by vendor" is exact on every marketplace.

= 1.0.2 =
* Listing name wording. No functional changes.

= 1.0.1 =
* Directory listing name updated to describe what the plugin does. No functional changes.

= 1.0.0 =
* Initial release: local store summary, consent-gated preview generation, QR pairing, in-admin live preview, Dokan/WCFM vendor showcase, order-status events for app notifications.

== Upgrade Notice ==

= 1.1.0 =
Adds every major multi vendor plugin. Marketplaces on MultiVendorX, WC Vendors, YITH, Product Vendors, MarketKing or Webkul get the vendor showcase after updating; plain WooCommerce and Dokan/WCFM stores see no change.

= 1.0.2 =
Listing name only. Nothing in the plugin changed, so there is no need to hurry.

= 1.0.1 =
Listing name only. Nothing in the plugin changed, so there is no need to hurry.
