3neti / wallet
Custom wallet for X-Change
v1.1.0
2026-04-10 03:50 UTC
Requires
- bavix/laravel-wallet: ^11.4
- brick/money: ^0.10.1
- lorisleiva/laravel-actions: ^2.9
- spatie/laravel-data: ^4.15
Requires (Dev)
- orchestra/testbench: ^10.3
- pestphp/pest: ^3.8
README
A lightweight helper package that extends and standardizes usage of Bavix Laravel Wallet within the x-change ecosystem.
๐งญ Overview
3neti/wallet is not a wallet implementation.
Instead, it provides:
- Configuration standardization
- System user handling
- Integration glue for x-change services (voucher, cash, settlement)
- Test scaffolding for wallet-based flows
It builds on top of:
bavix/laravel-wallet
๐ง Design Philosophy
This package does NOT own the wallet schema.
All database tables (wallets, transactions, transfers) are owned by:
bavix/laravel-wallet
This package focuses on:
- orchestration
- consistency
- extensibility
๐ฆ Installation
composer require 3neti/wallet
โ๏ธ Configuration
Publish config files:
php artisan vendor:publish --tag=config
Files
config/wallet.phpconfig/account.php
๐ค System User
The package introduces a system user abstraction.
Config
'account' => [ 'system_user' => [ 'identifier' => env('SYSTEM_USER_ID', 'system@example.com'), 'identifier_column' => 'email', 'model' => App\Models\User::class, ], ]
Purpose
- acts as source of funds
- supports top-ups, disbursements, internal transfers
๐ Integration Role in x-change
Voucher โ Cash โ Wallet โ Settlement
Wallet is responsible for:
- balance tracking
- transfers
- transaction recording
๐งช Testing Strategy
This package:
- does NOT ship migrations
- uses dependency migrations from Bavix
Test Setup
- loads:
- test user migration
- Bavix wallet migrations dynamically
Key Principle
Ownership != Dependency
- Bavix owns schema
- Wallet package depends on it
๐๏ธ Service Provider
LBHurtado\Wallet\WalletServiceProvider
Responsibilities
- merge configs
- register event provider
- expose configuration
๐ Dependencies
bavix/laravel-walletspatie/laravel-datalorisleiva/laravel-actionsbrick/money
โ ๏ธ Important Notes
โ Do NOT:
- copy Bavix migrations into this package
- publish Bavix migrations from here
- override wallet tables
โ DO:
- treat wallet as infrastructure
- extend behavior via services/actions
- keep this package stateless
๐ง Architectural Role
This package is part of the financial core layer:
[Contact] โ [Voucher] โ [Cash] โ [Wallet] โ [Settlement]
Wallet sits at:
๐ value storage + transfer layer
๐ Future Extensions
- multi-account support
- audit enhancements
- event-driven hooks
- reconciliation support
๐ง Final Thought
This package does not implement wallets.
It ensures wallets behave correctly within x-change.
License
MIT