voffice-indonesia / core-sdk
SDK for using single of truth authentication service(vAuth) in other internal vOffice app with seamless integration.
Fund package maintenance!
voffice-indonesia
Installs: 68
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 3
pkg:composer/voffice-indonesia/core-sdk
Requires
- php: ^8.2
- filament/filament: ^3.3
- illuminate/auth: ^10.0 || ^11.0||^12.0
- illuminate/contracts: ^10.0||^11.0||^12.0
- illuminate/support: ^10.0 || ^11.0||^12.0
- livewire/livewire: ^3.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.9||^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0||^8.22.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/extension-installer: ^1.3||^2.0
- phpstan/phpstan-deprecation-rules: ^1.1||^2.0
- phpstan/phpstan-phpunit: ^1.3||^2.0
- spatie/laravel-ray: ^1.35
- dev-main
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- dev-dependabot/github_actions/stefanzweifel/git-auto-commit-action-7
- dev-dependabot/composer/filament/filament-tw-4.1
- dev-dependabot/github_actions/actions/checkout-5
- dev-dependabot/github_actions/stefanzweifel/git-auto-commit-action-6
This package is auto-updated.
Last update: 2025-10-13 04:26:47 UTC
README
A powerful, plug-and-play Laravel package for seamless OAuth integration with Laravel Passport servers. Built with Clean Architecture principles for enterprise-grade applications.
โจ Key Features
- ๐ Plug & Play: Zero configuration, works out of the box
- ๐ Enterprise Security: OAuth2 + PKCE with automatic token refresh
- ๐๏ธ Clean Architecture: SOLID principles, testable, maintainable
- ๐จ Modern UI: Livewire 3.0 components with Tailwind CSS
- โก Laravel Integration: Custom guards, Filament compatible, middleware
- ๐งช Fully Tested: 33+ tests with comprehensive coverage
๐ Quick Start
1. Install
composer require voffice-indonesia/core-sdk
2. Setup
php artisan core:setup
3. Configure Environment
VAUTH_URL=https://your-oauth-server.com VAUTH_CLIENT_ID=your-client-id VAUTH_CLIENT_SECRET=your-client-secret VAUTH_REDIRECT_URI=https://your-app.com/auth/oauth/callback
4. Protect Routes
Route::middleware(['vauth'])->group(function () { Route::get('/dashboard', [DashboardController::class, 'index']); });
5. Use VAuth Service
use VoxDev\Core\Facades\VAuth; // Get users from OAuth server $users = VAuth::getUsers(); // Get locations $locations = VAuth::getLocations(); // Check authentication $isAuthenticated = VAuth::hasValidToken();
๐ That's it! Your app now has OAuth authentication!
๐ Documentation
Getting Started
- ๐ฆ Installation Guide - Step-by-step setup
- โ๏ธ Configuration - Complete configuration reference
- ๐ Basic Usage - Essential features and patterns
Usage Guides
- ๐ก๏ธ Middleware - Route protection and authentication
- ๐ก VAuth Service - API integration and data fetching
- ๐จ Livewire Components - Reactive UI components
- ๐ง Filament Integration - Admin panel integration
Architecture & Advanced
- ๐๏ธ Clean Architecture - Architecture principles
- ๐ Package Structure - Code organization
- ๐ Extending the Package - Customization guide
Examples & Reference
- ๐ป Code Examples - Real-world implementations
- ๐ API Reference - Complete API documentation
- ๐จ Troubleshooting - Common issues and solutions
๐ฏ Use Cases
This package is perfect for:
- Internal company applications that need centralized authentication
- Microservices architecture with shared authentication service
- Multi-tenant applications with OAuth-based user management
- Enterprise applications requiring clean, maintainable code
- Rapid prototyping with plug-and-play OAuth integration
๐ ๏ธ Requirements
- PHP: 8.2+
- Laravel: 10.x, 11.x, 12.x
- Laravel Passport OAuth Server: Running and accessible
๐ง Advanced Features
Clean Architecture
Built with clean architecture principles:
- Domain-driven design
- Dependency inversion
- SOLID principles
- Fully testable
Auto-Configuration
Intelligent defaults that just work:
- Auth guards auto-registered
- Middleware auto-configured
- Routes auto-loaded
- Livewire components auto-registered
Enterprise Security
Production-ready security features:
- OAuth2 with PKCE
- Automatic token refresh
- Secure cookie handling
- Session optimization
๐งช Testing
composer test
The package includes comprehensive tests:
- 33+ test cases
- Feature and unit tests
- Architecture tests
- Clean code validation
๐ Changelog
Please see CHANGELOG for recent changes.
๐ค Contributing
Please see CONTRIBUTING for details.
๐ Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
๐ License
The MIT License (MIT). Please see License File for more information.
๐ Credits
Made with โค๏ธ by VOffice Indonesia