resources/boost/skills/docuware/SKILL.md
DocuWare document management integration patterns. Use when working with DocuWare connector, webhooks, document imports, or app/Services/DocuWare/.
npx skillsauth add codebar-ag/coding-guidelines docuwareInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
app/Services/DocuWare/ or related import jobs.codebar-ag/laravel-docuware package is installed.config/laravel-docuware.php.DocumentImport model, migration, and queue job exist.Invoice fields).codebar-ag/laravel-docuware package (not raw Saloon)CodebarAg\DocuWare\Connectors\DocuWareConnector with ConfigWithCredentialsconfig('laravel-docuware.credentials.*') — never env() directlyapp/Services/DocuWare/DocuWareService.phpfetchDocument(), downloadAndStore(), mapToInvoiceData(), processImport()config/docuware-fields.phpDB::transaction() for model creation + import status updatesource_document_id already existsPOST /api/docuware/webhook receives payloadVerifyDocuWareSignature middlewaresource_document_id, document_type, event, timestamps as needed)DocumentImport record with status pendingProcessDocuWareImport queued jobDocumentImport model tracks: pending → processing → completed / failedDB::transaction() when creating model and updating import status together// DocuWareService — optional connector for testability
class DocuWareService
{
public function __construct(?DocuWareConnector $connector = null)
{
$this->connector = $connector ?? new DocuWareConnector();
}
public function processImport(DocumentImport $import): void
{
if (! config('laravel-docuware.credentials.api_url')) {
throw new DocuWareNotConfiguredException();
}
$import->update(['status' => 'processing']);
try {
DB::transaction(function () use ($import) {
$document = $this->fetchDocument($import->source_document_id);
$data = $this->mapToInvoiceData($document);
validator($data, [
'customer_id' => ['required', 'integer', 'exists:customers,id'],
'amount' => ['required', 'numeric'],
'status' => ['required', 'string'],
])->validate();
$model = Invoice::create($data);
$import->update(['status' => 'completed', 'importable_id' => $model->id]);
activity()->performedOn($import)->log('Document import completed.');
});
} catch (Throwable $e) {
Log::warning('DocuWare import failed.', [
'import_id' => $import->id,
'source_document_id' => $import->source_document_id,
'message' => $e->getMessage(),
]);
$import->update(['status' => 'failed']);
throw $e;
}
}
}
// Duplicate detection before processing
if (DocumentImport::where('source_document_id', $payload['id'])->exists()) {
return response()->json(['status' => 'skipped'], 200);
}
DocuWareConnector and inject it into DocuWareService.pending to processing to completed/failed).import_id and source_document_id).env() directly for DocuWare credentials — use config()DB::transaction() when creating models and updating import statusfailed, and re-throw when neededsource_document_idServices/SKILL.md — service class conventionsJobs/SKILL.md — queued job for ProcessDocuWareImporttesting
Translation and localization conventions for Laravel. Use when adding user-facing strings, creating translation files, or working with lang/ directory.
tools
Reusable behaviour shared across multiple unrelated classes. Traits provide shared Eloquent scopes, accessors, lifecycle hooks, and small stateless helper methods.
development
Tailwind CSS v4 styling conventions. Use when working with CSS, Tailwind utilities, or customizing the theme in Laravel projects.
development
Orchestration classes that coordinate multiple Actions, external APIs, or domain operations into a cohesive workflow. Services own transaction boundaries and third-party API integrations.