A usage-based panel for proxy subscriptions and AI access
Highlights • Stack • Quick-Start • Routes • Upgrade-Status
YAP (Yet Another Panel) is a Laravel-based panel for selling and managing proxy subscriptions, usage-based account balances, and optional AI access.
It combines a React + Inertia frontend for customers with a Filament admin panel for daily operations.
- customer-facing dashboard, recharge, package purchase, payment history, balance detail, usage statistics, and profile flows
- proxy subscription delivery via
/clash/{uuid}/yap.yaml - optional AI key access using the same account balance
- admin management for users, nodes, node routes, traffic receipts, payments, packages, and operational metrics
- payment support for cards, Alipay, USDT, and GitHub Sponsors where configured
- GitHub OAuth account linking, sponsor webhook support, and account unlink flow
- English and Japanese customer-facing translations
- Laravel 12, React 18, Filament 5, Livewire 4, Tailwind CSS 4
- affiliate program with referral tracking, VIP commission levels, package-based commission release, and Filament management resources
- PHP 8.3+
- Laravel 12
- Filament 5
- Livewire 4
- Laravel Sanctum
- Laravel Socialite
- Laravel Telescope
- Sentry Laravel
- React 18
- Inertia.js
- Tailwind CSS 4
- Headless UI
- Vite 8
- Chart.js
- Pest 4
- Pest Browser plugin with Playwright
- Laravel Pint
- PHP 8.3+
- Composer
- Node.js 22.12+ (or a newer supported LTS)
- npm
- MariaDB/MySQL-compatible database
- PHP extensions required by
composer.json, includingbcmath; YAML parsing uses the Composer packagesymfony/yaml
cp .env.example .env
# Configure the database and application URL in .env before migrating.
composer install
npm install
php artisan key:generate
php artisan migrate
php artisan serve
npm run devIf you are developing from WSL on a Windows-mounted workspace, prefer Windows-native php, composer, node, and npm binaries.
Browser tests use Pest 4's browser plugin and Playwright. After npm install, install the browser binary on each development machine or CI runner:
npx playwright install chromiumOn a Windows-mounted WSL workspace, run it through Windows-native tooling:
powershell.exe -Command "npx playwright install chromium"See Deployment Guide for VPS and rental server deployments, queues, cron, backups, and application timezones.
Nodes run the Go Agent with the pinned, patched V2Fly core. Agents pull configuration and report raw traffic over HTTPS; the panel does not connect to nodes through SSH. One physical node has one or more public billing routes, including direct connections.
For provisioning and upgrades, see Node Operations, the Agent skill, and V2Fly Upgrades.
Minimum example:
APP_NAME=YAP
APP_URL=http://localhost:8000
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=yap
DB_USERNAME=root
DB_PASSWORD=
YAP_ADMIN_PANEL_PATH=admin
YAP_UNIT_PRICE=0.02
YAP_RESET_SUBSCRIPTION_PRICE=0.5
YAP_USD_RMB_RATE=7.3
AFFILIATE_ENABLED=true
AFFILIATE_COOKIE_DAYS=30
AFFILIATE_ATTRIBUTION_TYPE=first_click
AFFILIATE_ALLOWED_GATEWAYS=stripe,alipay,usdt,github
AFFILIATE_MINIMUM_REFERRER_PAID_AMOUNT=5
AFFILIATE_MINIMUM_REFERRED_FIRST_PAYMENT_AMOUNT=5
AFFILIATE_MINIMUM_COMMISSION_AMOUNT=0.01
AFFILIATE_PENDING_DAYS=7
AFFILIATE_COMMISSION_EXPIRES_DAYS=90Common optional integrations:
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GITHUB_REDIRECT_URI=
GITHUB_WEBHOOK_SECRET=
ALIPAY_APP_ID=
ALIPAY_PRIVATE_KEY=
ALIPAY_PUBLIC_KEY=
STRIPE_KEY=
STRIPE_SECRET=
STRIPE_WEBHOOK_SECRET=
BEPUSDT_APP_ID=
BEPUSDT_API_KEY=
BEPUSDT_SECRET=
SENTRY_LARAVEL_DSN=//dashboard/recharge/package/payment/balance/detail/customer/service/profile/ai/affiliate/stat/policy/tos/commercial-disclosure
/clash/{uuid}/yap.yaml/alipay/*/bepusdt/*/stripe/*/github/sponsor/webhook
/{YAP_ADMIN_PANEL_PATH}
Default admin path is admin.
Filament access is currently restricted in App\Models\User::canAccessPanel().
Current default:
- only the user with
id === 1can access the admin panel
Review this rule before production use.
php artisan test
./vendor/bin/pint
npm run buildphp artisan test runs the Unit and Feature suites. Browser tests are intentionally run separately because they require Playwright's browser binary:
./vendor/bin/pest tests/Browser --browser chromeFor Windows-mounted WSL workspaces:
powershell.exe -Command "./vendor/bin/pest tests/Browser --browser chrome"The default tests use in-memory SQLite. To test real InnoDB locking on a local MySQL/MariaDB server, run:
YAP_RUN_MYSQL_TESTS=1 php artisan test --compact tests/Unit/NodeAuthorizationMysqlTest.phpThe test account must be allowed to create disposable databases. Defaults use the local socket /run/mysqld/mysqld.sock and user root; configure YAP_MYSQL_TEST_SOCKET, YAP_MYSQL_TEST_USERNAME, and YAP_MYSQL_TEST_PASSWORD privately when needed. Each test creates a unique database, applies migrations, and cleans up only that database. Existing application databases are never reset. The tests cover concurrent payment/purchase and traffic reporting, plus recovery after a process exits following financial commit.
This project is licensed under the MIT License. See LICENSE for details.
Built with Laravel, Inertia, React, and Filament