e959faff8db783907df4a4a80db2ca533beefe49
Deploy / deploy (push) Successful in 15s
- Wrap barcode generation in try-catch to prevent 500 on invalid GTIN - Move barcode preview above GTIN input field - Add input mask (X XXXXXX XXXXXX) and strip non-digits before save/render - Only render barcode when >= 8 digits present - shopify:sync now updates price alongside inventory Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SpiceManagementSystem
Warenwirtschafts-Panel für Gewürzmischungen — verwaltet Rohstoffe, Rezepte, Produkte, Lagerbestand und Shopify-Sync.
Built with Laravel + Filament, deployed via Docker.
Lokale Entwicklung
Voraussetzungen: PHP 8.4, Composer, Node.js, MariaDB
composer install
npm install && npm run build
cp .env.example .env
php artisan key:generate
php artisan migrate
php artisan serve
Die App läuft dann auf http://localhost:8000.
Produktion (Docker)
Der Deploy läuft automatisch via Gitea Actions bei jedem Push auf main:
- Dateien per SCP auf den VPS kopieren
docker compose up -d --build— baut das Image neu und startet die Containerphp artisan migrate --force— läuft automatisch im Container
Artisan-Befehle auf dem Server
Da die App in Docker mit PHP 8.4 läuft, müssen alle artisan-Befehle im Container ausgeführt werden:
cd ~/app && docker compose exec app php artisan <befehl>
Shopify-Import
Erstimport (Produkte + Lagerbestand)
cd ~/app && docker compose exec app php artisan shopify:import
Optionen:
--dry-run— zeigt nur an was importiert würde, speichert nichts
Produktbilder herunterladen
Für bereits importierte Produkte ohne Bilder:
cd ~/app && docker compose exec app php artisan shopify:images
Optionen:
--force— lädt Bilder auch für Produkte neu, die bereits welche haben
Lagerbestand synchronisieren
cd ~/app && docker compose exec app php artisan shopify:sync
Cronjob
Auf dem Server einrichten, damit der Laravel-Scheduler läuft:
* * * * * cd ~/app && docker compose exec -T app php artisan schedule:run >> /dev/null 2>&1
Datenbankstruktur
Migrationen ausführen:
php artisan migrate
Im Entwicklungsmodus komplett neu aufsetzen:
php artisan migrate:refresh
Table spices {
id int [pk]
name varchar(255)
amount decimal(10,2)
unit text
}
Table recipes {
id int [pk]
name varchar(255)
description text
}
Table recipes_spices {
recipe_id int [ref: > recipes.id]
spice_id int [ref: > spices.id]
amount_in_percent decimal(4,2)
indexes { (recipe_id, spice_id) [pk] }
}
Table packings {
id int [pk]
name varchar(255)
size decimal(10,2)
}
Table products {
id int [pk]
title text
images json
description text
package_content text
recipes_id int [ref: > recipes.id]
}
Table products_sizes {
id int [pk]
product_id int [ref: > products.id]
packing_id int [ref: > packings.id]
sku varchar
shopify_variant_id varchar
price float
description text
gtin varchar
}
Table products_inventory {
id int [pk]
product_id int [ref: > products.id]
size_id int [ref: > products_sizes.id]
out_at timestamp
}
Vision & Todo
Fokus: Warenwirtschaft (Lager, Rohstoffe, Produkte)
- DB-Schema mit Produkthistorie
- Rezepte (prozentual)
- Produktgrößen und -preise
- Inventar (eindeutige Items mit Ausgangs-Flag)
- Füllstandsanpassung der Rohstoffe beim Inventar anlegen
- Warenausgang (Produktverkauf)
- Shopify-Import (Produkte, Varianten, Lagerbestand, Bilder)
- Continuous Deployment via Gitea Actions + Docker
- Frontend (Sidebar-Struktur, Navigation)
- Dashboard (Füllstände, Lager, Sales-Zeitspanne)
Languages
PHP
97.5%
Blade
1.4%
Dockerfile
0.6%
Shell
0.4%
JavaScript
0.1%