# 🖨️ PrintAuftrag - Automated Personalization & Production System

A system that automates repetitive business processes, digitizes workflows, reduces mistakes and costs, and provides an easy-to-use, universally accessible web UI.

---

## 💡 What It Does

- **Automates** repetitive and time-consuming business processes
- **Digitizes** order-to-production workflows
- **Reduces mistakes and costs** by eliminating manual steps and standardizing outputs
- **Accessible everywhere** via a simple and intuitive web interface

---

## 👥 Who Uses It

This system is in production at **Wolga-Kreativ**, a company specializing in personalized products such as:

- Lunch boxes
- T-shirts
- Candles
- Other custom items (primarily for children)

These are sold across multiple platforms: **Amazon**, **Etsy**, and **Shopify**.

> 🧑‍💻 I’m the developer and operator of this system, affiliated with Wolga-Kreativ as the owner’s son.

---

## 🔁 High-Level Pipeline

1. 📦 Orders are captured from sales channels and aggregated via **Billbee**
2. 🔄 The system pulls order data from Billbee using its API
3. 🖼️ Personalized product images are generated based on order data
4. 🖨️ Production-ready print files are created for each specific machine
5. 📤 Files are sent to production for manufacturing and packaging
6. 📬 At day's end, production sends a report → system updates statuses → customers are notified via all sales channels

---

## ✅ Key Benefits

- 🚀 Faster processing and turnaround  
  _Saves up to two full-time employees during peak seasons_
- ❌ Fewer manual errors and misprints
- 🎯 Consistent, machine-ready print files
- 📍 Centralized tracking and cross-channel customer notifications

---

## 🧰 Tech Stack

- **Backend:** Spring Boot, PostgreSQL
- **Frontend:** Next.js, TypeScript, Tailwind CSS
- **Image Generation:** Python
- **Containerization:** Docker
- **Hosting:** Self-hosted on internal server

---

## 🧩 System Components

### 🖼️ Image Generator

#### Problem

Designs were originally made manually in tools like **CorelDraw** or **Photoshop**—unsuitable for automated large-scale personalization.  
Each personalized product had to be manually edited and exported—a slow, error-prone process, especially with over **150+ orders/day** during peak season.

#### Solution

- Designs are transformed into **SVG templates** with embedded bitmaps
- Stored in the database
- A standalone **Python** program takes prefiltered order data from Billbee and generates the images automatically

**Technology:** Python

---

### 🖨️ Print File Generator

#### Problem

Different machines, product types, and practices require specific print file formats.  
Manual import and layout of each image is time-consuming and inconsistent.

#### Solution

- Web UI allows users to configure **print templates**
- Templates are saved to the database
- Backend (Spring Boot) generates the correct print files automatically when processing orders

**Technologies:** Java, Spring Boot, HTML5, TypeScript, Tailwind, Next.js

---

### 🔄 Sales Channel Update

#### Problem

After production, each order had to be manually marked as shipped and customers notified—labor-intensive and slow.

#### Solution

- End-of-day production sheet is automatically read
- Order statuses are updated via API
- Notifications are sent to customers through **Billbee**

**Technologies:** TypeScript, Next.js

---

## 🔮 Future Work

- 🔗 Integrate the Python image generator into the core server workflow
- ⚙️ Improve system automation with deeper **Billbee API** usage
- 📈 Extend with more processes

---

## 🖼️ Screenshots

### 🎨 Web View – Print Templates

![Template View 1](/doc/img/template_view_1.jpg)
_Template configuration interface – View 1_

![Template View 2](/doc/img/template_view_2.jpg)
_Template configuration interface – View 2_

---

### 🔁 Abstract Visualization – System Flow

![System Flow Diagram](/doc/img/system_flow.png)
_High-level overview of the automated order-to-production pipeline_
