Skip to content

Configuration

Environment Configuration

Laravel Sail Configuration

If you're using Laravel Sail, you can customize the Docker environment:

bash
# Edit Sail configuration
./vendor/bin/sail artisan sail:publish

# Customize docker-compose.yml
# Add additional services like Redis, MailHog, etc.

Important Configuration Notes

  • Port Configuration: The application runs on port 3300 by default
  • Application Access: The system uses FilamentPHP as the main interface, accessible directly at the root URL
  • Database Ports: When using Sail, database ports are forwarded:
    • MySQL: 3306 (container) → 3307 (host)
    • Redis: 6379 (container) → 6380 (host)
  • Etherscan API: Get your API key from Etherscan for blockchain data
  • Cryptography: Private keys and sensitive data are encrypted using the configured cryptography settings

Blockchain Network Configuration

Configure supported networks in the admin panel:

Network Settings

  • Network Name: Display name for the network
  • RPC URL: Blockchain node RPC endpoint
  • Chain ID: Network chain identifier
  • Currency Symbol: Native token symbol
  • Block Explorer: Transaction explorer URL

Supported Networks

Zafira supports multiple blockchain networks including:

  • Ethereum Mainnet
  • Ethereum Testnets (Goerli, Sepolia)
  • Polygon
  • Binance Smart Chain
  • And other EVM-compatible networks

Webhook Configuration

Webhooks are configured directly through the application interface. Navigate to Webhooks in the sidebar menu to manage webhook configurations.

Webhook Setup Process

  1. Access Webhooks: Go to the Webhooks section in the sidebar menu
  2. Create New Webhook: Click "Create" to add a new webhook
  3. Configure Settings:
    • Webhook URL: Enter the endpoint URL where notifications will be sent
    • Webhook Type: Select the type of events to monitor:
      • wallet - Wallet-related events
      • transaction - Transaction events
      • balance - Balance update events
      • token - Token-related events
      • charge - Payment charge events
      • all - All events
    • Status: Set to active or inactive
    • Events: Select specific events to monitor (dynamically loaded based on type)
    • Secret (Optional): Enter a secret key for webhook signature verification

Available Events by Type

  • Charge Events: paid, expired, created, failed
  • Transaction Events: created, confirmed, failed
  • Balance Events: updated
  • Token Events: added, removed
  • Wallet Events: created, updated

Security Configuration

Data Encryption

  • Private keys are encrypted using AES-256 encryption
  • Mnemonic phrases are securely stored with encryption
  • API tokens are hashed and secured
  • Webhook signatures for payload verification

Access Control

  • Role-based access control system
  • API rate limiting to prevent abuse
  • CSRF protection for web forms
  • Session management with secure cookies

Audit Trail

  • Transaction logging for all wallet operations
  • API access logging for security monitoring
  • User activity tracking for compliance

Performance Optimization

Production Configuration

bash
# Production optimization
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan optimize

Redis Configuration (Optional)

If using Redis for caching:

env
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

Monitoring and Logging

Application Logs

Logs are stored in storage/logs/ directory:

  • laravel.log - General application logs
  • webhook.log - Webhook delivery logs
  • transaction.log - Transaction processing logs

System Monitoring

The application includes a supervisor endpoint for health monitoring:

bash
# Check system health
wget -O /dev/null https://zafira-app.vratts.com/api/supervisor

Database Configuration

Migration and Seeding

bash
# Run migrations
php artisan migrate

# Seed initial data
php artisan db:seed

# Reset database (development only)
php artisan migrate:fresh --seed

Database Maintenance

bash
# Optimize database
php artisan optimize

# Clear cache
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear

Next Steps

Atualizado em:

Released under the MIT License.