Vozex
Marketplace website, admin panel, checkout API, payments, provisioning jobs, customer dashboard, and SaaS fulfillment router.
This document is a full local reference for setting up the vozex marketplace project,
connecting the point-of-sale product, understanding the folder structure of both repositories,
configuring payment gateways, and running the POS product as a Vozex marketplace-managed SaaS offer.
The vozex repository is the central marketplace and fulfillment control plane. It manages public product pages,
customer checkout, orders, licenses, subscriptions, hosted installations, payment gateway integration, and admin operations.
The point-of-sale repository is a separate product repository. In this setup it acts as a multi-tenant SaaS product
that Vozex sells and provisions. Vozex stores the product catalog record, pricing mappings, Dodo / PayPal identifiers, and fulfillment
configuration. POS exposes machine-to-machine marketplace endpoints for onboarding, status, suspend, and cancel actions.
Marketplace website, admin panel, checkout API, payments, provisioning jobs, customer dashboard, and SaaS fulfillment router.
Retail and electronics POS suite with inventory, GRN, suppliers, returns, HRM, accounting, service jobs, serials, warranties, and central admin.
Vozex calls product-side marketplace endpoints using bearer-token authentication stored under the product fulfillment config.
vozex/backendpoint-of-sale/backend| Project | Backend stack | Frontend stack | Main purpose |
|---|---|---|---|
vozex |
Laravel 12, JWT, Dodo SDK, PayPal server SDK | React 19, Vite, Axios, PrimeReact | Marketplace, checkout, fulfillment, admin, customer dashboard |
point-of-sale |
Laravel 10, JWT, Sanctum, Stancl Tenancy, ESC/POS | React 19, Vite, React Query, Electron packaging | Retail POS SaaS product sold through Vozex |
cd C:\projects\vozex\backend
copy .env.example .env
composer install
php artisan key:generate
php artisan migrate
php artisan db:seed
npm install
npm run build
cd C:\projects\vozex\backend
composer run dev
The backend composer.json already defines a combined dev runner that starts:
php artisan servephp artisan queue:listenphp artisan pailnpm run devcd C:\projects\vozex\frontend
copy .env.example .env
npm install
npm run dev
APP_URL=http://localhost:8000
APP_FRONTEND_URL=http://localhost:5173
FRONTEND_URL=http://localhost:5173
DB_CONNECTION=sqlite
QUEUE_CONNECTION=database
CACHE_STORE=database
SESSION_DRIVER=database
DODO_ENVIRONMENT=sandbox
DODO_TEST_API_KEY=your_test_key
DODO_TEST_SECRET_KEY=your_test_secret
DODO_TEST_WEBHOOK_SECRET=your_test_webhook_secret
PAYPAL_MODE=sandbox
PAYPAL_CLIENT_ID=
PAYPAL_CLIENT_SECRET=
PAYPAL_WEBHOOK_ID=
DODO_TEST_* and DODO_LIVE_* variables to avoid confusion.
backend/database/seeders/MarketplaceSeeder.php creates the marketplace product record and pricingbackend/database/seeders/DatabaseSeeder.php runs global app seed logicbackend/database/seeders/CompanyPagesSeeder.php seeds company / informational pagesGET /api/products, GET /api/products/{slug}POST /api/checkout/calculate, POST /api/checkout/createPOST /api/admin/dodo/products/create, PUT /api/admin/dodo/products/{id}/syncGET /api/admin/products/{productId}/pricing-mappings, POST /api/admin/products/pricing-mappings/bulkPOST /api/webhooks/dodo, POST /api/webhooks/paypalcd C:\projects\point-of-sale\backend
copy .env.example .env
composer install
php artisan key:generate
php artisan migrate
php artisan db:seed
cd C:\projects\point-of-sale\frontend
npm install
npm run dev
backend/routes/tenant_api.phpC:\projects\point-of-sale\CUSTOMER_GUIDE.htmlC:\projects\point-of-sale\VOZEX_MARKETPLACE_COMPATIBILITY_AUDIT.mdC:\projects\point-of-sale\POS_HEADLESS_CONTROL_PLANE_ADOPTION_PLAN.mdThe POS repository must expose a central machine-to-machine API so Vozex can provision and control tenants.
POST /api/marketplace/onboard
POST /api/marketplace/status
POST /api/marketplace/suspend
POST /api/marketplace/cancel
Authorization: Bearer <MARKETPLACE_SHARED_TOKEN>
{
"base_url": "https://pos.vozex.cloud",
"onboard_endpoint": "/api/marketplace/onboard",
"status_endpoint": "/api/marketplace/status",
"suspend_endpoint": "/api/marketplace/suspend",
"cancel_endpoint": "/api/marketplace/cancel",
"auth_mode": "bearer",
"credentials_ref": "pos_marketplace_token",
"timeout_seconds": 45,
"management": {
"enabled": true,
"base_url": "https://pos.vozex.cloud",
"overview_endpoint": "/api/marketplace/admin/overview",
"tenants_endpoint": "/api/marketplace/admin/tenants",
"tenant_details_endpoint": "/api/marketplace/admin/tenants/{tenant}",
"tenant_status_endpoint": "/api/marketplace/admin/tenants/{tenant}/status",
"tenant_subscription_endpoint": "/api/marketplace/admin/tenants/{tenant}/subscription",
"plans_endpoint": "/api/marketplace/admin/plans"
}
}
| Field | Purpose |
|---|---|
delivery_model | How fulfillment is routed. POS uses saas_multitenant. |
fulfillment_driver | Adapter key. POS uses multitenant_saas. |
external_provider | External product source identifier, for example point-of-sale. |
external_product_ref | Provider-side reference used by provisioning and sync flows. |
default_release_version | Used when managed runtime release paths are resolved. |
repo_path | Deployment reference path to the product repository or release storage. |
fulfillment_config | Machine-to-machine API contract for the POS control plane. |
The seeded marketplace record is currently created from backend/database/seeders/MarketplaceSeeder.php as
Point of Sale SaaS Suite. That seeder also configures pricing mappings, tags, SEO fields, and fulfillment metadata.
Vozex uses App\Services\DodoPaymentService and admin product tooling in AdminProducts.jsx.
Product records can store variant-specific Dodo IDs:
dodo_product_id_regulardodo_product_id_extendeddodo_product_id_monthlydodo_product_id_yearly
Product variant pricing should be managed through product_pricing_mappings instead of relying only on base fields.
The current sync logic resolves pricing mappings first and falls back only if no mapping price exists.
| Variant | Mapping rule used by sync |
|---|---|
| Regular | payment_type = one_time and license type name regular |
| Extended | payment_type = one_time and license type name extended |
| Monthly | payment_type = subscription and billing_interval = monthly |
| Yearly | payment_type = subscription and billing_interval = yearly |
PayPal config is handled by App\Services\Payments\Gateways\PayPalPaymentGateway and
admin settings endpoints under /api/admin/paypal/*. Use sandbox IDs in local setups first.
1. Seed marketplace products
2. Verify POS product exists in admin products
3. Create or sync Dodo products
4. Confirm pricing mappings are saved
5. Hit checkout calculate
6. Create checkout session
7. Simulate or receive payment webhook
8. Retry or inspect fulfillments if needed
C:\projects\vozex
|-- backend
|-- frontend
|-- DETAILED_MULTI_PRODUCT_FLOW.md
|-- MULTITENANT_MARKETPLACE_AUTOMATION_PLAN.md
|-- MULTI_PRODUCT_PURCHASE_FLOW.md
|-- VOZEX_CENTRAL_SAAS_CONTROL_PLANE_PLAN.md
`-- VOZEX_UNIVERSAL_FULFILLMENT_IMPLEMENTATION_AUDIT.md
C:\projects\vozex\backend\app
+---Console\Commands
+---Http\Controllers\Api
+---Http\Middleware
+---Http\Requests
+---Jobs
+---Models
+---Notifications
+---Providers
+---Services
| +---Fulfillment\Adapters
| +---Payments\Gateways
| `---Products
`---Support
C:\projects\vozex\frontend\src
|-- admin
|-- assets
|-- components
|-- context
|-- data
|-- hooks
|-- pages
|-- services
`-- utils
| Folder | Purpose |
|---|---|
app/Http/Controllers/Api | Main marketplace, customer dashboard, payments, webhook, and admin commerce APIs |
app/Services/Fulfillment | Fulfillment router and delivery adapters |
app/Services/Payments | Dodo and PayPal gateway logic |
app/Jobs | Provisioning, retries, webhook processing, license generation, installation tasks |
database/seeders | Marketplace product data, company pages, bootstrap records |
routes/api.php | Public, customer, admin, webhook, payment, and fulfillment routes |
C:\projects\point-of-sale
|-- backend
|-- customer-guide-site
|-- deploy
|-- docker
|-- frontend
|-- CUSTOMER_GUIDE.html
|-- POS_HEADLESS_CONTROL_PLANE_ADOPTION_PLAN.md
|-- STANCL_TENANCY_FULL_IMPLEMENTATION_FLOW.md
`-- VOZEX_MARKETPLACE_COMPATIBILITY_AUDIT.md
C:\projects\point-of-sale\backend\app
|-- Console\Commands
|-- Http\Controllers\Admin
|-- Http\Controllers\Api
|-- Http\Middleware
|-- Models
|-- Providers
|-- Services
| `-- Tenancy
`-- Traits
C:\projects\point-of-sale\frontend\src
|-- assets
|-- components
| |-- accounting
| |-- hrm
| `-- reports
|-- context
|-- hooks
|-- i18n
|-- pages
| `-- admin
|-- services
`-- utils
| Folder or file | Purpose |
|---|---|
backend/routes/tenant_api.php | Tenant runtime APIs for POS operations |
backend/app/Http/Controllers/Api/MarketplaceProvisioningController.php | Machine-to-machine onboarding and lifecycle endpoints for Vozex |
backend/app/Services/Tenancy/MarketplaceTenantService.php | Tenant provisioning logic used by the Vozex integration contract |
frontend/src/pages/admin/TenantManagement.jsx | Central tenant provisioning UI on the POS side |
CUSTOMER_GUIDE.html | Functional documentation for POS operators and admins |
app/Services/DodoPaymentService.php: Dodo client, lookup, create, update, refunds, subscriptionsapp/Http/Controllers/Api/DodoProductController.php: admin product setup and sync endpointsapp/Http/Controllers/Api/ProductPricingMappingController.php: mapping CRUD and bulk saveapp/Models/Product.php: product schema including SEO, fulfillment, Dodo IDsapp/Services/Fulfillment/Adapters/MultiTenantSaasAdapter.php: POS SaaS fulfillment pathsrc/admin/AdminProducts.jsx: product admin UI, pricing mappings, Dodo setup, syncsrc/pages/ProductsMarketplace.jsx: public marketplace listingsrc/pages/ProductDetailMarketplace.jsx: product detail page and purchase flow entrysrc/pages/Checkout.jsx: checkout UIsrc/services/api.js: frontend API client with JWT token handlingbackend/app/Http/Controllers/Api/MarketplaceProvisioningController.php: Vozex provisioning endpointsbackend/app/Http/Middleware/AuthenticateMarketplaceRequest.php: bearer-token auth for Vozexbackend/app/Console/Commands/EnforceSubscriptionLifecycleCommand.php: subscription expiry enforcementbackend/routes/tenant_api.php: tenant-scoped POS runtime APIsfrontend/src/App.jsx: main route compositionfrontend/src/pages/POS.jsx: primary POS screenfrontend/src/pages/Inventory.jsx: stock and inventory workspacefrontend/src/pages/ServiceJobs.jsx, Quotations.jsx, Serials.jsx: electronics workflowsfrontend/src/pages/admin/*: central admin tenant and platform controlsAPP_URL and FRONTEND_URLDODO_ENVIRONMENT=livephp artisan migrate --forcephp artisan db:seed --class=MarketplaceSeeder if product data must exist* * * * * php /path/to/vozex/backend/artisan schedule:run
* * * * * php /path/to/point-of-sale/backend/artisan schedule:run
Cause: stored Dodo product IDs belong to the wrong environment. The current sync path now recreates or re-links IDs when live or test IDs do not exist in the active environment.
Cause: mapping was not saved or no active mapping matched the variant. Current sync logic resolves pricing mappings first, then falls back to product base fields.
Cause: repeated save or missing lookup metadata. Current create-single logic now performs a Dodo lookup before create and the UI disables the save button while the request is running.
Check the product delivery_model, fulfillment_driver, fulfillment_config, webhook processing, and fulfillment retry logs in Vozex.
cd C:\projects\vozex\backend
php artisan route:list
php artisan migrate:status
php artisan queue:work
cd C:\projects\point-of-sale\backend
php artisan route:list --path=marketplace --except-vendor
php artisan schedule:list