diff --git a/_footer.php b/_footer.php
new file mode 100644
index 0000000..f7a4e22
--- /dev/null
+++ b/_footer.php
@@ -0,0 +1,41 @@
+
+
diff --git a/_header.php b/_header.php
new file mode 100644
index 0000000..979c5f7
--- /dev/null
+++ b/_header.php
@@ -0,0 +1,53 @@
+
+
\ No newline at end of file
diff --git a/assets/css/custom.css b/assets/css/custom.css
index 2e24ecb..5311005 100644
--- a/assets/css/custom.css
+++ b/assets/css/custom.css
@@ -57,3 +57,13 @@ body {
font-size: 3rem;
color: #007BFF;
}
+
+/* Auth pages styling */
+.choice-card {
+ transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
+}
+
+.choice-card:hover {
+ transform: translateY(-5px);
+ box-shadow: 0 12px 40px rgba(0,0,0,0.12) !important;
+}
diff --git a/db/migrate.php b/db/migrate.php
new file mode 100644
index 0000000..96dd8cc
--- /dev/null
+++ b/db/migrate.php
@@ -0,0 +1,29 @@
+ PDO::ERRMODE_EXCEPTION,
+ ]);
+ // Create the database if it doesn't exist
+ $pdo_admin->exec("CREATE DATABASE IF NOT EXISTS " . DB_NAME);
+ echo "Database '" . DB_NAME . "' created or already exists.\n";
+
+ // Now connect to the created database
+ $pdo = db();
+ $migrations = glob(__DIR__ . '/migrations/*.sql');
+ sort($migrations);
+
+ foreach ($migrations as $migration) {
+ echo "Running migration: " . basename($migration) . "...\n";
+ $sql = file_get_contents($migration);
+ $pdo->exec($sql);
+ echo "Migration successful.\n";
+ }
+
+ echo "\nAll migrations completed successfully.\n";
+
+} catch (PDOException $e) {
+ die("Database migration failed: " . $e->getMessage());
+}
\ No newline at end of file
diff --git a/db/migrations/001_create_users_table.sql b/db/migrations/001_create_users_table.sql
new file mode 100644
index 0000000..e2a378c
--- /dev/null
+++ b/db/migrations/001_create_users_table.sql
@@ -0,0 +1,9 @@
+CREATE TABLE IF NOT EXISTS users (
+ id INT AUTO_INCREMENT PRIMARY KEY,
+ first_name VARCHAR(255) NOT NULL,
+ last_name VARCHAR(255) NOT NULL,
+ email VARCHAR(255) NOT NULL UNIQUE,
+ password VARCHAR(255) NOT NULL,
+ user_type ENUM('customer', 'provider') NOT NULL,
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
+);
\ No newline at end of file
diff --git a/db/migrations/002_create_service_categories_table.sql b/db/migrations/002_create_service_categories_table.sql
new file mode 100644
index 0000000..3b1f507
--- /dev/null
+++ b/db/migrations/002_create_service_categories_table.sql
@@ -0,0 +1,4 @@
+CREATE TABLE IF NOT EXISTS service_categories (
+ id INT AUTO_INCREMENT PRIMARY KEY,
+ name VARCHAR(255) NOT NULL UNIQUE
+);
\ No newline at end of file
diff --git a/db/migrations/003_create_services_table.sql b/db/migrations/003_create_services_table.sql
new file mode 100644
index 0000000..7e7d3db
--- /dev/null
+++ b/db/migrations/003_create_services_table.sql
@@ -0,0 +1,11 @@
+CREATE TABLE IF NOT EXISTS services (
+ id INT AUTO_INCREMENT PRIMARY KEY,
+ provider_id INT NOT NULL,
+ category_id INT NOT NULL,
+ name VARCHAR(255) NOT NULL,
+ description TEXT,
+ price DECIMAL(10, 2) NOT NULL,
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+ FOREIGN KEY (provider_id) REFERENCES users(id) ON DELETE CASCADE,
+ FOREIGN KEY (category_id) REFERENCES service_categories(id)
+);
\ No newline at end of file
diff --git a/db/migrations/004_seed_service_categories.sql b/db/migrations/004_seed_service_categories.sql
new file mode 100644
index 0000000..cb7cba8
--- /dev/null
+++ b/db/migrations/004_seed_service_categories.sql
@@ -0,0 +1,7 @@
+INSERT INTO service_categories (name) VALUES
+('Pulizie'),
+('Riparazioni'),
+('Assistenza alla persona'),
+('Giardinaggio'),
+('Lezioni private'),
+('Babysitting');
\ No newline at end of file
diff --git a/index.php b/index.php
index a88e2d6..3a90696 100644
--- a/index.php
+++ b/index.php
@@ -1,3 +1,15 @@
+query("SELECT * FROM service_categories ORDER BY name");
+ $search_categories = $categories_stmt->fetchAll();
+} catch (PDOException $e) {
+ $search_categories = [];
+}
+?>
@@ -28,28 +40,17 @@
-
-
-
-
-
- MeToo
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+