diff --git a/add_process.php b/add_process.php
new file mode 100644
index 0000000..0864a5e
--- /dev/null
+++ b/add_process.php
@@ -0,0 +1,33 @@
+prepare($sql);
+ $stmt->execute([$name, $description]);
+ } catch (PDOException $e) {
+ // In a real app, log this error. For now, we'll just die.
+ die("Database error: " . $e->getMessage());
+ }
+
+ // Redirect back to the main page after successful insertion
+ header('Location: index.php?success=1');
+ exit;
+} else {
+ // If not a POST request, redirect to the main page
+ header('Location: index.php');
+ exit;
+}
+?>
diff --git a/assets/css/custom.css b/assets/css/custom.css
new file mode 100644
index 0000000..202fa20
--- /dev/null
+++ b/assets/css/custom.css
@@ -0,0 +1,62 @@
+/*
+ProcessFlow Optimizer Custom Stylesheet
+*/
+
+:root {
+ --bs-primary: #4A90E2;
+ --bs-primary-rgb: 74, 144, 226;
+ --bs-secondary: #50E3C2;
+ --bs-secondary-rgb: 80, 227, 194;
+ --bs-body-bg: #F8F9FA;
+ --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
+ --bs-border-radius: 0.5rem;
+ --bs-card-border-width: 0;
+ --bs-card-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
+}
+
+body {
+ color: #212529;
+}
+
+.btn-primary {
+ background-color: var(--bs-primary);
+ border-color: var(--bs-primary);
+}
+
+.btn-primary:hover {
+ opacity: 0.9;
+ background-color: var(--bs-primary);
+ border-color: var(--bs-primary);
+}
+
+.header {
+ background: linear-gradient(90deg, #4A90E2 0%, #63A4F7 100%);
+ color: white;
+ padding: 2.5rem 0;
+ margin-bottom: -1rem;
+}
+
+.header h1 {
+ font-weight: 700;
+ color: white;
+}
+.header p {
+ color: rgba(255,255,255,0.8) !important;
+}
+
+.card {
+ border: none;
+ border-radius: var(--bs-border-radius);
+}
+
+.list-group-item {
+ border-bottom: 1px solid #eee !important;
+}
+.list-group-item:last-child {
+ border-bottom: none !important;
+}
+
+.form-control:focus {
+ border-color: #80bdff;
+ box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
+}
diff --git a/db/migrate.php b/db/migrate.php
new file mode 100644
index 0000000..3726dcf
--- /dev/null
+++ b/db/migrate.php
@@ -0,0 +1,18 @@
+exec($sql);
+ echo "Database migration successful. 'processes' table is ready.";
+} catch (PDOException $e) {
+ die("Database migration failed: " . $e->getMessage());
+}
+?>
diff --git a/delete_process.php b/delete_process.php
new file mode 100644
index 0000000..2387458
--- /dev/null
+++ b/delete_process.php
@@ -0,0 +1,20 @@
+prepare("DELETE FROM processes WHERE id = :id");
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+ } catch (PDOException $e) {
+ error_log("DB Error: " . $e->getMessage());
+ // Optionally, redirect with an error message
+ }
+}
+
+header('Location: index.php');
+exit();
+?>
\ No newline at end of file
diff --git a/index.php b/index.php
index 7205f3d..b08e4ed 100644
--- a/index.php
+++ b/index.php
@@ -1,150 +1,117 @@
query("SELECT id, name, description, created_at FROM processes ORDER BY created_at DESC");
+ $processes = $stmt->fetchAll(PDO::FETCH_ASSOC);
+} catch (PDOException $e) {
+ // Silently log error, or display a friendly message.
+ error_log("DB Error: " . $e->getMessage());
+}
+
+$project_name = htmlspecialchars($_SERVER['PROJECT_NAME'] ?? 'ProcessFlow Optimizer');
+$project_description = htmlspecialchars($_SERVER['PROJECT_DESCRIPTION'] ?? 'Analyze and optimize your business processes.');
+$project_image_url = htmlspecialchars($_SERVER['PROJECT_IMAGE_URL'] ?? '');
?>
-
+
-
-
- New Style
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
Analyzing your requirements and generating your website…
-
- Loading…
-
-
= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.
-
This page will update automatically as the plan is implemented.
-
Runtime: PHP = htmlspecialchars($phpVersion) ?> — UTC = htmlspecialchars($now) ?>
-
-
-
+
+
+
+
+
+
+
+
+
+
+
Map a New Process
+
Define a process to begin analysis.
+
+
+
+
+
+
+
+
+
+
Existing Processes
+
+
+
+
No processes defined yet.
Use the form to add your first process.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
\ No newline at end of file