Documentation

Development Workflow

Initial setup, daily development, adding packages, payment gateways, themes, and code quality

Last updated: Feb 09, 2026

Development Workflow

Initial Setup

git clone <repo-url> cartxis
cd cartxis
composer setup
# Configure .env (APP_URL, DB credentials, payment gateway keys)

Daily Development

composer dev
# → http://localhost:8000 (Laravel)
# → http://localhost:5173 (Vite HMR)
# → Queue worker active

Adding a New Package

  1. Create directory: packages/Cartxis/NewPackage/
  2. Add ServiceProvider in Providers/
  3. Add namespace to composer.json PSR-4 autoload
  4. Register provider in bootstrap/providers.php
  5. Run composer dump-autoload
  6. Add routes, models, controllers, migrations as needed

Adding a Payment Gateway

  1. Copy template from extension/templates/payment-gateway/
  2. Implement PaymentGatewayInterface
  3. Create extension.json manifest
  4. Register gateway in ServiceProvider with PaymentGatewayManager
  5. Seed payment method record
  6. Add admin config routes for managing API keys
  7. Install and activate via CLI: php artisan cartxis:extensions:install {code} && php artisan cartxis:extensions:activate {code}

Creating a Theme

  1. Create themes/{slug}/ with theme.json
  2. Add resources/views/layouts/ThemeLayout.vue
  3. Override pages in resources/views/pages/
  4. Add theme-specific components in resources/views/components/
  5. Activate in Admin → Settings → Themes

Code Quality

# PHP formatting
./vendor/bin/pint

# JS/Vue linting + formatting
npm run lint
npm run format

# Type checking
npx vue-tsc --noEmit

# Tests
composer test

Namespace Reference

NamespacePath
App\app/
Cartxis\Core\packages/Cartxis/Core/
Cartxis\Admin\packages/Cartxis/Admin/
Cartxis\Product\packages/Cartxis/Product/
Cartxis\Cart\packages/Cartxis/Cart/
Cartxis\Shop\packages/Cartxis/Shop/
Cartxis\Settings\packages/Cartxis/Settings/
Cartxis\Sales\packages/Cartxis/Sales/src/
Cartxis\Customer\packages/Cartxis/Customer/src/
Cartxis\CMS\packages/Cartxis/CMS/src/
Cartxis\System\packages/Cartxis/System/src/
Cartxis\Reports\packages/Cartxis/Reports/src/
Cartxis\Marketing\packages/Cartxis/Marketing/src/
Cartxis\API\packages/Cartxis/API/
Cartxis\Setup\packages/Cartxis/Setup/src/
Cartxis\Stripe\packages/Cartxis/Stripe/src/
Cartxis\Razorpay\packages/Cartxis/Razorpay/src/
Cartxis\PayPal\packages/Cartxis/PayPal/src/
Cartxis\PayUMoney\packages/Cartxis/PayUMoney/src/
Cartxis\PhonePe\packages/Cartxis/PhonePe/src/
Tests\tests/