Paket dokümantasyonu
SatisHub
Sell private Composer packages with license-based access control and FilamentPHP.
Architecture
Service Provider Responsibilities
SatisServiceProvider is the package runtime hub. It:
- merges package config
- loads package routes, migrations, views, and translations
- registers commands in console runtime
- configures rate limiters for API and repository access
Core Modules
- Billing:
satis/src/Billing - HTTP APIs:
satis/src/Http/Controllers/Api - Repository endpoints:
satis/src/Http/Controllers/Repository - Domain models:
satis/src/Models - Filament resources:
satis/src/Filament/Resources
Billing Design
- Checkout is delegated by
CheckoutManagerand provider registries. - Webhooks are validated and forwarded to provider-specific processors.
- Catalog sync is driver-based (
catalog_sync_drivers) and provider-isolated.
Checkout Flow
- Product selected by customer.
CheckoutManagerresolves provider key.- Gateway class for provider creates checkout URL/session.
- Customer is redirected to provider checkout.
Webhook Flow
- Provider sends event to
/billing/webhook/{provider}. - Signature verification is applied from provider config.
- Processor class handles payload normalization.
- Order/license state is updated.
- Idempotency and audit metadata are tracked in
webhook_events.
Repository Access Model
Repository endpoints are not public package feeds. Access is entitlement-based.
Checks include:
- valid basic auth credentials (license + email)
- active license status
- support validity (when policy requires)
- product-package ownership relationship
Support Attachment Security
- URLs are signed and temporary.
- Route key uses media UUID (
{mediaUuid}). - Download action enforces ticket-level ownership and role rules.
Distribution Security
- Repository routes are protected by
repo.authmiddleware. - Dist downloads are signed and time-limited.
- License and support validity control access.
Domain Events
The package dispatches domain events for integration use-cases.
Afsakar\Satishub\Events\Billing\OrderCreatedAfsakar\Satishub\Events\Billing\LicenseCreatedAfsakar\Satishub\Events\Billing\WebhookEventProcessedAfsakar\Satishub\Events\Support\SupportTicketOpenedAfsakar\Satishub\Events\Support\SupportTicketReplied
Typical usage in host apps:
- analytics pipelines
- external billing/CRM sync
- custom notification channels
- provisioning or entitlement side effects

