diff --git a/config/testfile.txt b/config/testfile.txt
deleted file mode 100644
index 89fe089..0000000
--- a/config/testfile.txt
+++ /dev/null
@@ -1 +0,0 @@
-sfsfdsdf
\ No newline at end of file
diff --git a/public/api/_db.php b/public/api/_db.php
new file mode 100755
index 0000000..943fc92
--- /dev/null
+++ b/public/api/_db.php
@@ -0,0 +1,16 @@
+ PDO::ERRMODE_EXCEPTION,
+ PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
+];
+try {
+ $pdo = new PDO($dsn, $cfg['db_user'], $cfg['db_pass'], $options);
+} catch (PDOException $e) {
+ http_response_code(500);
+ header('Content-Type: application/json');
+ echo json_encode(['error' => 'DB connection failed']);
+ exit;
+}
diff --git a/public/api/materials.php b/public/api/materials.php
new file mode 100755
index 0000000..3b743ed
--- /dev/null
+++ b/public/api/materials.php
@@ -0,0 +1,6 @@
+query("SELECT * FROM materials WHERE is_active = 1 ORDER BY code");
+echo json_encode($stmt->fetchAll(), JSON_UNESCAPED_UNICODE);
diff --git a/public/api/printer-materials.php b/public/api/printer-materials.php
new file mode 100755
index 0000000..29ccf7f
--- /dev/null
+++ b/public/api/printer-materials.php
@@ -0,0 +1,35 @@
+ 'printer id missing']);
+ exit;
+}
+
+$printerStmt = $pdo->prepare("SELECT * FROM printers WHERE id = ?");
+$printerStmt->execute([$printer_id]);
+$printer = $printerStmt->fetch();
+if (!$printer) {
+ http_response_code(404);
+ echo json_encode(['error' => 'printer not found']);
+ exit;
+}
+
+$sql = "SELECT m.*, pms.support_level, pms.partial_reason, pms.extra_info
+ FROM materials m
+ LEFT JOIN printer_material_support pms
+ ON pms.material_id = m.id AND pms.printer_id = :pid
+ WHERE m.is_active = 1
+ ORDER BY m.code";
+$stmt = $pdo->prepare($sql);
+$stmt->execute([':pid' => $printer_id]);
+$materials = $stmt->fetchAll();
+
+echo json_encode([
+ 'printer' => $printer,
+ 'materials' => $materials
+], JSON_UNESCAPED_UNICODE);
diff --git a/public/api/printers.php b/public/api/printers.php
new file mode 100755
index 0000000..c560186
--- /dev/null
+++ b/public/api/printers.php
@@ -0,0 +1,6 @@
+query("SELECT * FROM printers WHERE is_active = 1 ORDER BY name");
+echo json_encode($stmt->fetchAll(), JSON_UNESCAPED_UNICODE);
diff --git a/public/index.html b/public/index.html
new file mode 100755
index 0000000..9c9fe7a
--- /dev/null
+++ b/public/index.html
@@ -0,0 +1,266 @@
+
+
+
+
+ 3D-Druck Materialmatrix
+
+
+
+
+
+
+
+
+
3D-Druck Materialmatrix
+
Schnell prüfen, welche Filamente auf welchen Druckern laufen.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Material
+
Eigenschaften
+
Tg °C
+
Düse
+
Platte
+
Zusatz
+
Anwendung
+
Kinder
+
Emission
+
+
+
+
+
+
+
+
+
+
+
+ Hinweis: Dieses Projekt wird privat betrieben und befindet sich im Aufbau.
+ Es sind noch nicht alle Drucker und Materialien eingetragen.
+ Alle Angaben erfolgen nach bestem Wissen, jedoch ohne Gewähr auf Vollständigkeit oder Richtigkeit.
+