PHPackages                             stitchforge/laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. stitchforge/laravel

ActiveLibrary[API Development](/categories/api)

stitchforge/laravel
===================

Laravel package for StitchForge embroidery digitizing API

v1.0.0(1mo ago)02MITPHPPHP ^8.1

Since Jun 5Pushed 1mo agoCompare

[ Source](https://github.com/adidevid/stitchforge-laravel)[ Packagist](https://packagist.org/packages/stitchforge/laravel)[ RSS](/packages/stitchforge-laravel/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (6)Versions (2)Used By (0)

StitchForge Laravel
===================

[](#stitchforge-laravel)

Paket Laravel untuk konsumsi **StitchForge Embroidery Digitizing API**.

Instalasi
---------

[](#instalasi)

```
composer require stitchforge/laravel
```

Tambahkan ke `.env`:

```
STITCHFORGE_BASE_URL=http://localhost:8080
STITCHFORGE_API_KEY=sk-st-xxxxxxxxxxxx
```

Quick Start
-----------

[](#quick-start)

### 1. Sekali Jalan — upload, digitize, download

[](#1-sekali-jalan--upload-digitize-download)

```
use StitchForge\Laravel\Facades\StitchForge;

// Upload gambar → digitize → tunggu → export → download
StitchForge::quick(
    imagePath: storage_path('app/logo-bordir.png'),
    savePath:  storage_path('app/hasil.dst'),
    format:    'dst',
    settings:  ['max_colors' => 15, 'stitch_density' => 4],
    texts:     [
        ['text' => 'Mugni & Eka', 'font' => 'script', 'size' => 36],
    ]
);

// File hasil: storage/app/hasil.dst
```

### 2. Step-by-step (full control)

[](#2-step-by-step-full-control)

```
use StitchForge\Laravel\Facades\StitchForge;

// Login (opsional, bisa langsung pake API key)
$tokens = StitchForge::auth()->login('operator@stitchforge.id', 'password');

// Upload
$upload = StitchForge::uploads()->image('/path/to/image.png');
$assetId = $upload['asset_id'];

// Bikin job
$job = StitchForge::jobs()->create($assetId, [
    'max_colors'     => 15,
    'stitch_density' => 4,
], [
    ['text' => 'Monogram', 'font' => 'script', 'size' => 28],
]);

// Polling sampe selesai
$job = StitchForge::jobs()->wait($job->id, maxWaitSeconds: 60);

// Export + download
$export = StitchForge::jobs()->export($job->id, 'pes');
StitchForge::jobs()->download($export->id, '/downloads/hasil.pes');
```

### 3. Via Laravel Queue (async)

[](#3-via-laravel-queue-async)

```
use StitchForge\Laravel\Jobs\PollJobStatus;

// Dispatch polling job
PollJobStatus::dispatch($job->id);
```

Di `EventServiceProvider`:

```
use StitchForge\Laravel\Events\JobCompleted;
use StitchForge\Laravel\Events\JobFailed;

protected $listen = [
    JobCompleted::class => [\App\Listeners\NotifyUser::class],
    JobFailed::class    => [\App\Listeners\AlertAdmin::class],
];
```

### 4. Dari Laravel Request (form upload)

[](#4-dari-laravel-request-form-upload)

```
Route::post('/digitize', function (\Illuminate\Http\Request $request) {
    $file = $request->file('design');

    $upload = StitchForge::uploads()->fromRequest($file);
    $job    = StitchForge::jobs()->create($upload['asset_id']);

    return response()->json(['job_id' => $job->id, 'status' => $job->status]);
});
```

Auth Methods
------------

[](#auth-methods)

MethodAuthUse Case`X-API-Key` headerSet di `.env` → `STITCHFORGE_API_KEY`Backend/integrasi`Authorization: Bearer `Setelah `auth()->login()`Multi-user appKonfigurasi
-----------

[](#konfigurasi)

```
// config/stitchforge.php

'base_url'   => env('STITCHFORGE_BASE_URL', 'http://localhost:8080'),
'api_key'    => env('STITCHFORGE_API_KEY'),
'timeout'    => 30,
'retries'    => 3,

'defaults' => [
    'max_colors'     => 15,
    'stitch_density' => 4,
    'export_format'  => 'dst',
],
```

Text Fonts
----------

[](#text-fonts)

Font built-in yang tersedia:

FontCocok untuk`sans`Text biasa, minimalis`serif`Formal, klasik`script`Monogram wedding, undangan`mono`Kode, label teknis`bold`Judul, headlineFonts API
---------

[](#fonts-api)

Kelola katalog font kustom:

```
use StitchForge\Laravel\Facades\StitchForge;

// List semua font yang tersedia
$fonts = StitchForge::fonts()->list();

// Buat font baru
$font = StitchForge::fonts()->create(
    key: 'gothic',
    name: 'Gothic',
    category: 'serif',
    description: 'Font gaya gotik untuk desain klasik'
);

// Update font
StitchForge::fonts()->update('font-id', [
    'name' => 'Gothic Bold',
    'category' => 'bold',
]);

// Hapus font
StitchForge::fonts()->delete('font-id');
```

Templates API
-------------

[](#templates-api)

Kelola template monogram:

```
use StitchForge\Laravel\Facades\StitchForge;

// List semua template
$templates = StitchForge::templates()->list();

// Buat template baru
$template = StitchForge::templates()->create(
    name: 'Wedding Circle',
    description: 'Template lingkaran untuk monogram wedding',
    elements: [
        ['type' => 'circle', 'radius' => 100, 'x' => 200, 'y' => 200],
    ],
    textSlots: [
        ['key' => 'initials', 'label' => 'Initial Name', 'font' => 'script', 'size' => 36],
    ]
);

// Update template
StitchForge::templates()->update('template-id', [
    'name' => 'Wedding Circle v2',
]);

// Hapus template
StitchForge::templates()->delete('template-id');

// Resolve template dengan nilai user
$composed = StitchForge::templates()->resolve('template-id', [
    'initials' => 'M & E',
]);
```

Pricing API
-----------

[](#pricing-api)

Kelola harga benang:

```
use StitchForge\Laravel\Facades\StitchForge;

// Lihat harga saat ini
$pricing = StitchForge::pricing()->get();
// Returns: ['polyester_per_kg' => 5.00, 'metallic_per_kg' => 8.50, 'rayon_per_kg' => 6.00]

// Update harga
StitchForge::pricing()->update([
    'polyester_per_kg' => 5.50,
    'metallic_per_kg'  => 9.00,
    'rayon_per_kg'     => 6.50,
]);
```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance90

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

50d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/535b8e144f1520a7cd29917eec73c36e26a23575fef60b70bb9fffc475520e4e?d=identicon)[adidevid](/maintainers/adidevid)

---

Top Contributors

[![adidevid](https://avatars.githubusercontent.com/u/25740064?v=4)](https://github.com/adidevid "adidevid (2 commits)")

### Embed Badge

![Health badge](/badges/stitchforge-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/stitchforge-laravel/health.svg)](https://phpackages.com/packages/stitchforge-laravel)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M133](/packages/roots-acorn)[laravel/scout

Laravel Scout provides a driver based solution to searching your Eloquent models.

1.7k55.0M632](/packages/laravel-scout)[nuwave/lighthouse

A framework for serving GraphQL from Laravel

3.5k11.8M118](/packages/nuwave-lighthouse)[flat3/lodata

OData v4.01 Producer for Laravel

99351.7k](/packages/flat3-lodata)[illuminate/broadcasting

The Illuminate Broadcasting package.

7127.2M221](/packages/illuminate-broadcasting)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
