diff --git a/.gitignore b/.gitignore index 3715fa6..97fad76 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.idea* # ---> Node # Logs logs @@ -103,7 +104,6 @@ dist # vuepress v2.x temp and cache directory .temp -.cache # Docusaurus cache and generated files .docusaurus @@ -131,3 +131,7 @@ dist .pnp.* /.idea/git_toolbox_blame.xml +.package.json +.package-lock.json +.package.json +.package-lock.json \ No newline at end of file diff --git a/.idea/Webshop.iml b/.idea/Webshop.iml index 533a2cb..8b332b7 100644 --- a/.idea/Webshop.iml +++ b/.idea/Webshop.iml @@ -6,5 +6,6 @@ + \ No newline at end of file diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml index 63a12b6..935ffdb 100644 --- a/.idea/dataSources.xml +++ b/.idea/dataSources.xml @@ -1,15 +1,14 @@ - - postgresql + + mysql.8 true - org.postgresql.Driver - jdbc:postgresql://localhost:5432/postgres + com.mysql.cj.jdbc.Driver + jdbc:mysql://localhost:3306 - $ProjectFileDir$ diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..9687cac --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,33 @@ + + + + \ No newline at end of file diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml index 9da3653..2f279b3 100644 --- a/.idea/jsLibraryMappings.xml +++ b/.idea/jsLibraryMappings.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml deleted file mode 100644 index a8b32a1..0000000 --- a/.idea/sqldialects.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/README.md b/README.md index 11e1154..230d2a9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # Webshop -Webshop Autohändler \ No newline at end of file +Webshop für Modellautos \ No newline at end of file diff --git a/database/db_scripts/webshop_structure.sql b/database/db_scripts/webshop_structure.sql new file mode 100644 index 0000000..dc5ef4a --- /dev/null +++ b/database/db_scripts/webshop_structure.sql @@ -0,0 +1,146 @@ +DROP DATABASE IF EXISTS webshop; +CREATE DATABASE IF NOT EXISTS `webshop` + CHARACTER SET utf8 COLLATE utf8_general_ci; + +USE `webshop`; + +CREATE TABLE `user` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `name` VARCHAR(255) NOT NULL, + `lower_name` VARCHAR(255) NOT NULL, + `email` VARCHAR(255) NOT NULL DEFAULT 'NONE', + `passwd` VARCHAR(255) NOT NULL DEFAULT 'NONE', + `passwd_hash_algo` VARCHAR(255) NOT NULL DEFAULT 'NONE', + `is_admin` BOOLEAN NOT NULL DEFAULT '0' +); +ALTER TABLE + `user` + ADD UNIQUE `user_email_unique` (`email`); +CREATE TABLE `user_address` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `user_id` INT UNSIGNED NOT NULL, + `address_line1` VARCHAR(255) NOT NULL, + `address_line2` VARCHAR(255) NOT NULL, + `city` VARCHAR(255) NOT NULL, + `postal_code` INT NOT NULL, + `country` VARCHAR(2) NOT NULL, + `telephone` VARCHAR(255) NOT NULL +); +ALTER TABLE + `user_address` + ADD UNIQUE `user_address_telephone_unique` (`telephone`); +CREATE TABLE `user_payment` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `user_id` INT UNSIGNED NOT NULL, + `payment_type` VARCHAR(255) NOT NULL, + `provider` VARCHAR(255) NOT NULL, + `account_no` VARCHAR(255) NOT NULL, + `expiry` DATE NOT NULL +); +CREATE TABLE `shopping_session` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `user_id` INT UNSIGNED NOT NULL, + `total` DECIMAL(8, 2) NOT NULL +); +CREATE TABLE `cart_item` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `session_id` INT UNSIGNED NOT NULL, + `product_id` INT UNSIGNED NOT NULL, + `quantity` INT NOT NULL +); +CREATE TABLE `payment_details` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `order_id` INT NOT NULL, + `amount` INT NOT NULL, + `provider` VARCHAR(255) NOT NULL, + `status` VARCHAR(255) NOT NULL +); +CREATE TABLE `product` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `name` VARCHAR(255) NOT NULL, + `make` VARCHAR(255) NOT NULL, + `model` VARCHAR(255) NOT NULL, + `description` TEXT NOT NULL, + `category_id` INT UNSIGNED NOT NULL, + `price` DECIMAL(8, 2) NOT NULL, + `discount_id` INT UNSIGNED NOT NULL, + `created_at` DATE NOT NULL +); +CREATE TABLE `discount` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `name` VARCHAR(255) NOT NULL, + `description` TEXT NOT NULL, + `discount_percent` DECIMAL(8, 2) NOT NULL, + `active` BOOLEAN NOT NULL +); +CREATE TABLE `order_items` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `order_id` INT UNSIGNED NOT NULL, + `product_id` INT UNSIGNED NOT NULL, + `quantity` INT NOT NULL, + `user_id` BIGINT NOT NULL +); +CREATE TABLE `product_category` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `name` VARCHAR(255) NOT NULL +); +CREATE TABLE `order_details` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `user_id` INT UNSIGNED NOT NULL, + `total` DECIMAL(8, 2) NOT NULL, + `payment_id` INT UNSIGNED NOT NULL +); +CREATE TABLE `product_pictures` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `product_id` INT UNSIGNED NOT NULL, + `picture_base64` TEXT NOT NULL, + `is_primary` BOOLEAN NOT NULL +); +ALTER TABLE + `product_pictures` + ADD CONSTRAINT `product_pictures_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `product` (`id`); +ALTER TABLE + `user_payment` + ADD CONSTRAINT `user_payment_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); +ALTER TABLE + `order_details` + ADD CONSTRAINT `order_details_payment_id_foreign` FOREIGN KEY (`payment_id`) REFERENCES `payment_details` (`id`); +ALTER TABLE + `order_details` + ADD CONSTRAINT `order_details_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); +ALTER TABLE + `order_items` + ADD CONSTRAINT `order_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `product` (`id`); +ALTER TABLE + `product` + ADD CONSTRAINT `product_discount_id_foreign` FOREIGN KEY (`discount_id`) REFERENCES `discount` (`id`); +ALTER TABLE + `shopping_session` + ADD CONSTRAINT `shopping_session_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); +ALTER TABLE + `product` + ADD CONSTRAINT `product_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `product_category` (`id`); +ALTER TABLE + `user_address` + ADD CONSTRAINT `user_address_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); +ALTER TABLE + `order_items` + ADD CONSTRAINT `order_items_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `order_details` (`id`); +ALTER TABLE + `cart_item` + ADD CONSTRAINT `cart_item_session_id_foreign` FOREIGN KEY (`session_id`) REFERENCES `shopping_session` (`id`); +ALTER TABLE + `cart_item` + ADD CONSTRAINT `cart_item_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `product` (`id`); \ No newline at end of file diff --git a/database/db_scripts/webshop_test-data.sql b/database/db_scripts/webshop_test-data.sql new file mode 100644 index 0000000..2e4bd83 --- /dev/null +++ b/database/db_scripts/webshop_test-data.sql @@ -0,0 +1,643 @@ +USE webshop; + +-- Product Categories +INSERT INTO product_category (id, name) +VALUES (1, 'Electronics'); +INSERT INTO product_category (id, name) +VALUES (2, 'Home Appliances'); +INSERT INTO product_category (id, name) +VALUES (3, 'Clothing'); +INSERT INTO product_category (id, name) +VALUES (4, 'Sports'); +INSERT INTO product_category (id, name) +VALUES (5, 'Books'); + +-- Discounts +INSERT INTO discount (id, name, description, discount_percent, active) +VALUES (1, 'Spring Sale', 'Description for Spring Sale', 15, TRUE); +INSERT INTO discount (id, name, description, discount_percent, active) +VALUES (2, 'Black Friday', 'Description for Black Friday', 40, TRUE); +INSERT INTO discount (id, name, description, discount_percent, active) +VALUES (3, 'New User', 'Description for New User', 10, TRUE); +INSERT INTO discount (id, name, description, discount_percent, active) +VALUES (4, 'Clearance', 'Description for Clearance', 25, TRUE); +INSERT INTO discount (id, name, description, discount_percent, active) +VALUES (5, 'Holiday Deal', 'Description for Holiday Deal', 20, TRUE); + +-- Users +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (1, 'User1', LOWER('User1'), 'user1@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (2, 'User2', LOWER('User2'), 'user2@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (3, 'User3', LOWER('User3'), 'user3@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (4, 'User4', LOWER('User4'), 'user4@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (5, 'User5', LOWER('User5'), 'user5@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (6, 'User6', LOWER('User6'), 'user6@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (7, 'User7', LOWER('User7'), 'user7@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (8, 'User8', LOWER('User8'), 'user8@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (9, 'User9', LOWER('User9'), 'user9@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (10, 'User10', LOWER('User10'), 'user10@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (11, 'User11', LOWER('User11'), 'user11@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (12, 'User12', LOWER('User12'), 'user12@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (13, 'User13', LOWER('User13'), 'user13@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (14, 'User14', LOWER('User14'), 'user14@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (15, 'User15', LOWER('User15'), 'user15@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (16, 'User16', LOWER('User16'), 'user16@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (17, 'User17', LOWER('User17'), 'user17@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (18, 'User18', LOWER('User18'), 'user18@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (19, 'User19', LOWER('User19'), 'user19@example.com', 'password123', 'bcrypt',FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (20, 'User20', LOWER('User20'), 'user20@example.com', 'password123', 'bcrypt', FALSE); + +-- User Addresses +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (1, '123 Main St', 'Apt 1', 'Berlin', 10001, 'DE', '1234567891'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (2, '123 Main St', 'Apt 2', 'Toronto', 10002, 'DE', '1234567892'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (3, '123 Main St', 'Apt 3', 'New York', 10003, 'GB', '1234567893'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (4, '123 Main St', 'Apt 4', 'Paris', 10004, 'DE', '1234567894'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (5, '123 Main St', 'Apt 5', 'Paris', 10005, 'FR', '1234567895'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (6, '123 Main St', 'Apt 6', 'New York', 10006, 'DE', '1234567896'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (7, '123 Main St', 'Apt 7', 'Berlin', 10007, 'FR', '1234567897'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (8, '123 Main St', 'Apt 8', 'Paris', 10008, 'US', '1234567898'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (9, '123 Main St', 'Apt 9', 'London', 10009, 'FR', '1234567899'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (10, '123 Main St', 'Apt 10', 'Paris', 10010, 'CA', '12345678910'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (11, '123 Main St', 'Apt 11', 'London', 10011, 'DE', '12345678911'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (12, '123 Main St', 'Apt 12', 'London', 10012, 'US', '12345678912'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (13, '123 Main St', 'Apt 13', 'Toronto', 10013, 'US', '12345678913'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (14, '123 Main St', 'Apt 14', 'Toronto', 10014, 'CA', '12345678914'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (15, '123 Main St', 'Apt 15', 'Paris', 10015, 'CA', '12345678915'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (16, '123 Main St', 'Apt 16', 'London', 10016, 'US', '12345678916'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (17, '123 Main St', 'Apt 17', 'New York', 10017, 'CA', '12345678917'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (18, '123 Main St', 'Apt 18', 'Berlin', 10018, 'GB', '12345678918'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (19, '123 Main St', 'Apt 19', 'Berlin', 10019, 'DE', '12345678919'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (20, '123 Main St', 'Apt 20', 'Berlin', 10020, 'GB', '12345678920'); + +-- User Payments +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (1, 'Credit Card', 'Stripe', 'ACCNO0001', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (2, 'Debit Card', 'Visa', 'ACCNO0002', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (3, 'PayPal', 'Stripe', 'ACCNO0003', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (4, 'PayPal', 'Visa', 'ACCNO0004', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (5, 'Debit Card', 'MasterCard', 'ACCNO0005', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (6, 'Credit Card', 'Visa', 'ACCNO0006', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (7, 'Debit Card', 'Stripe', 'ACCNO0007', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (8, 'PayPal', 'Stripe', 'ACCNO0008', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (9, 'Credit Card', 'MasterCard', 'ACCNO0009', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (10, 'PayPal', 'Stripe', 'ACCNO0010', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (11, 'PayPal', 'Visa', 'ACCNO0011', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (12, 'Debit Card', 'PayPal', 'ACCNO0012', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (13, 'PayPal', 'PayPal', 'ACCNO0013', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (14, 'PayPal', 'MasterCard', 'ACCNO0014', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (15, 'Credit Card', 'PayPal', 'ACCNO0015', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (16, 'Debit Card', 'Visa', 'ACCNO0016', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (17, 'Credit Card', 'PayPal', 'ACCNO0017', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (18, 'Debit Card', 'MasterCard', 'ACCNO0018', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (19, 'Debit Card', 'PayPal', 'ACCNO0019', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (20, 'PayPal', 'Stripe', 'ACCNO0020', '2026-12-31'); + +-- Products +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (1, 'Product1', 'BrandA', 'Model1', 'Description for Product1', 5, 318.94, 2, '2024-06-16'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (2, 'Product2', 'BrandC', 'Model2', 'Description for Product2', 5, 521.19, 5, '2025-03-05'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (3, 'Product3', 'BrandB', 'Model3', 'Description for Product3', 2, 230.04, 2, '2024-08-12'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (4, 'Product4', 'BrandC', 'Model4', 'Description for Product4', 1, 147.85, 4, '2025-03-02'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (5, 'Product5', 'BrandA', 'Model5', 'Description for Product5', 4, 520.02, 3, '2024-09-08'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (6, 'Product6', 'BrandC', 'Model6', 'Description for Product6', 4, 146.06, 5, '2024-07-08'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (7, 'Product7', 'BrandC', 'Model7', 'Description for Product7', 1, 862.11, 3, '2025-03-20'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (8, 'Product8', 'BrandC', 'Model8', 'Description for Product8', 1, 313.82, 2, '2024-10-17'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (9, 'Product9', 'BrandA', 'Model9', 'Description for Product9', 2, 491.74, 2, '2025-01-17'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (10, 'Product10', 'BrandB', 'Model10', 'Description for Product10', 3, 182.49, 3, '2025-01-02'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (11, 'Product11', 'BrandB', 'Model11', 'Description for Product11', 4, 907.39, 3, '2025-01-29'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (12, 'Product12', 'BrandB', 'Model12', 'Description for Product12', 2, 962.56, 2, '2024-07-01'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (13, 'Product13', 'BrandC', 'Model13', 'Description for Product13', 5, 933.24, 5, '2024-05-24'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (14, 'Product14', 'BrandB', 'Model14', 'Description for Product14', 2, 474.63, 1, '2024-11-26'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (15, 'Product15', 'BrandC', 'Model15', 'Description for Product15', 5, 112.99, 1, '2024-07-14'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (16, 'Product16', 'BrandA', 'Model16', 'Description for Product16', 5, 92.21, 5, '2024-06-21'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (17, 'Product17', 'BrandB', 'Model17', 'Description for Product17', 1, 30.15, 4, '2024-10-04'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (18, 'Product18', 'BrandA', 'Model18', 'Description for Product18', 2, 169.85, 1, '2024-11-07'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (19, 'Product19', 'BrandB', 'Model19', 'Description for Product19', 5, 559.7, 1, '2024-09-12'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (20, 'Product20', 'BrandB', 'Model20', 'Description for Product20', 1, 617.8, 4, '2024-04-26'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (21, 'Product21', 'BrandB', 'Model21', 'Description for Product21', 1, 353.15, 4, '2024-04-24'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (22, 'Product22', 'BrandA', 'Model22', 'Description for Product22', 4, 827.72, 1, '2024-04-17'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (23, 'Product23', 'BrandB', 'Model23', 'Description for Product23', 4, 24.71, 2, '2025-03-24'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (24, 'Product24', 'BrandB', 'Model24', 'Description for Product24', 1, 452.61, 1, '2024-07-06'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (25, 'Product25', 'BrandA', 'Model25', 'Description for Product25', 3, 245.66, 2, '2024-05-20'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (26, 'Product26', 'BrandA', 'Model26', 'Description for Product26', 4, 741.09, 2, '2024-12-23'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (27, 'Product27', 'BrandB', 'Model27', 'Description for Product27', 2, 549.64, 2, '2025-01-28'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (28, 'Product28', 'BrandC', 'Model28', 'Description for Product28', 3, 93.43, 2, '2024-07-15'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (29, 'Product29', 'BrandC', 'Model29', 'Description for Product29', 1, 610.66, 1, '2024-08-07'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (30, 'Product30', 'BrandC', 'Model30', 'Description for Product30', 4, 537.6, 3, '2024-06-24'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (31, 'Product31', 'BrandB', 'Model31', 'Description for Product31', 4, 377.7, 1, '2024-06-20'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (32, 'Product32', 'BrandA', 'Model32', 'Description for Product32', 4, 353.25, 2, '2024-09-20'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (33, 'Product33', 'BrandB', 'Model33', 'Description for Product33', 4, 550.94, 3, '2024-08-02'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (34, 'Product34', 'BrandA', 'Model34', 'Description for Product34', 1, 692.25, 4, '2024-04-16'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (35, 'Product35', 'BrandB', 'Model35', 'Description for Product35', 4, 249.37, 3, '2024-05-10'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (36, 'Product36', 'BrandC', 'Model36', 'Description for Product36', 4, 418.07, 1, '2024-08-18'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (37, 'Product37', 'BrandC', 'Model37', 'Description for Product37', 1, 455.82, 4, '2024-04-27'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (38, 'Product38', 'BrandA', 'Model38', 'Description for Product38', 4, 664.72, 1, '2024-12-28'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (39, 'Product39', 'BrandB', 'Model39', 'Description for Product39', 3, 80.6, 1, '2024-10-18'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (40, 'Product40', 'BrandA', 'Model40', 'Description for Product40', 4, 28.12, 4, '2024-09-05'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (41, 'Product41', 'BrandA', 'Model41', 'Description for Product41', 3, 251.78, 5, '2025-02-08'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (42, 'Product42', 'BrandC', 'Model42', 'Description for Product42', 4, 144.43, 1, '2024-05-11'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (43, 'Product43', 'BrandA', 'Model43', 'Description for Product43', 5, 748.88, 3, '2025-01-04'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (44, 'Product44', 'BrandB', 'Model44', 'Description for Product44', 5, 882.23, 1, '2024-08-19'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (45, 'Product45', 'BrandB', 'Model45', 'Description for Product45', 3, 899.3, 4, '2024-07-03'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (46, 'Product46', 'BrandC', 'Model46', 'Description for Product46', 4, 272.38, 4, '2024-11-11'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (47, 'Product47', 'BrandB', 'Model47', 'Description for Product47', 3, 470.78, 2, '2024-10-28'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (48, 'Product48', 'BrandC', 'Model48', 'Description for Product48', 2, 116.97, 1, '2024-09-13'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (49, 'Product49', 'BrandA', 'Model49', 'Description for Product49', 5, 30.57, 4, '2024-09-18'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (50, 'Product50', 'BrandB', 'Model50', 'Description for Product50', 2, 861.84, 4, '2024-11-26'); + +-- Product Pictures +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (1, 'mnELxugt4Ydr4FUssyH+bkSevIrNl/KBGyH8LLhxFKI=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (2, 'mr6UQfVtBB6Gj7MaxDer/zNGsEeJ3DHH5JzLZmKUC+c=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (3, 'yCeHteIvMo3LNNxflAknKAm3TUm6bI/+cUe4mCyp5Vs=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (4, 'A1trFKv8HmX7+WxtkRAod/QbH2xKBUr3AS0sh7OT+oI=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (5, 'zdfKP/uLcgmMv1x4v+5FA2gEGK00yW2HJDHemYAxEBk=', TRUE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (6, 'wFpi7y31rFU7VICwWc8ONnx2ApSFSaF1do/ozuoENTM=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (7, 'KkpNEMOR/cMQ3zv7mjdiMG8lWh6x7S6C8vQFzqN8YYk=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (8, 'VadAqdlySAPOguy/vVfGGaUzbMciyv9niqjS2peB79c=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (9, 'pecXJbykN65n5BwAuGiWEiW2YRP1vxk5JUaBB7Z2QKE=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (10, 'JRkmNYuGySf+MCx+dPRj5cVMOu0AhHEUhSeKWGvsoM0=', TRUE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (11, 'Tln4hU4s5Nyx5wkzA/kCn4puKxHqfrdpiEaOn+Dsj0c=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (12, 'rmlebzsSR28Xl8W7HrrCetU/Xlww/m750el2QgCLrtw=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (13, 'aSXu2+PDwlE0bJ7+JgifoIRYmNFgpf4Rac1Hih3OaoQ=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (14, '0nTDMczLNN5MmLM9CecyZyNHSjAg3+hj3QIEKjEheIw=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (15, 'eKKF0BWqGh977FJNERzlZH01xvLCJLfWO507tFctImA=', TRUE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (16, 'Qx0W4ZIOI3EWcdESsMm3Wp/NEfeGssKrTD4D7hH3bzs=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (17, 't70dXq30C82ca1wRo7TmG3GBEa1MrTccl6uVbOYUcf8=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (18, 'o2xac1ar86EUPNi/q+FJEqvfIjIVUTBBKCmHoMaAqKU=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (19, 'j252AyKpFxiTVlXHar/vicn1NBzUoZtMOA7V+bVSuto=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (20, 'ddoRalgx15Oq2XgG83ksnZYnr38k3bgytWyuvMwPVNc=', TRUE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (21, 'iPcGIdcvwInGY3mc6wMKYyfAagIz5ZRjmfbbtg2+fDc=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (22, 'vtP3wxpUhcgg+M1BQV88MlIWbsOU0FkT/3qiDEJfjsM=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (23, 'lkMSOWhVUXQJwj8qui8OsevJp+a8drNyYY1PdsF9ofQ=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (24, 'OXZP3Y5ZNRREjBlK49W4oESBVc1CaPPPOJXi6mlH6n4=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (25, '1ODn0qkTCPxfapjkV8baMp+KuFrkbaLhTZfb9NQgUPU=', TRUE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (26, 'bgz2EcoOVDRagfBNLi8aPMx3yE8TbmQryWKsT7dI35c=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (27, '5KkXTV4R2M4vbf9/1R4F1pEqt02AlU6BGcUSTzD/8PI=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (28, 'ZXLkPF69pEUGz7/asGZ/n1n1yOfknrWYFv13SpvpJ9s=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (29, 'DC8UtBTDA80YqgOKxu2jNfdm4Y8JpxzuCoRiHbAiT10=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (30, 'OFm88w/1zT7DQjOVXcANhLLD6khvrF3UI7b56KmBzaU=', TRUE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (31, 'DfPzNf2+gQ9fx7QGxDY2t8VL0rtizZGY8zPvzAbqMIk=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (32, 'w89sMLHYMX7IW5ykCvu4BW448GkG4/MAWt89jbkr7YI=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (33, 'syvLhg+8VIt4Gihgq+FtmPABuD3sAMTdDlyhOu85Kqo=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (34, '2fDRzCfntjtZAneqqyzr3hD6RV/0Ad/YmCwTwjNlenc=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (35, 'ygca9b8poneJF/3RS5Kr5GMfH7+kv6m0VFDDvknfwfE=', TRUE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (36, 'tRriLe4gYRGOepP/Bn0kb6ChEKoOfKMxgnmxOh1sgS0=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (37, 'ir5yC2KMiX0w7fnaGNp85WrZU04Mgc59KWr0hkx6DIc=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (38, 'oNw9xNd/JfmOFAVX+sKWiLfH2ipyP/z/wW4dmaPN2qM=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (39, 'D+mT9AXixD432UIBcTQBZ9sd+d6W6MsnJaSOWom2DxA=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (40, 'QbjTL1bK2X5GE2KGpisiI9UIBboZhv+zFH2S16cl2E0=', TRUE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (41, 'MrUZXSdNCy3Uiochw8wSQjMu4veozWLywvp3IlbIQwo=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (42, 'i2+PZBqElXU+yUCGWRpz/HOxy2RMbmFz+9Z/JWkOgHU=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (43, 'D73S1+s3ILVdRaXj0ow+baD0QAtBCUh6jNVyYkKx3Cs=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (44, 'gHDoV2NuiBiDGJEIWLy32zrFRQb5C0ocSIgKjYs1E84=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (45, 'ks4WUYGB7sv8hFgK+H3v72t7HXDMcArsRdtj2U9B798=', TRUE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (46, '4pX2NjrxNZCSy96Uj3yXSbcM+CZ8N0WZTKVzuEl4kls=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (47, 'lY+/60wB02mXhaMBw2vcGhkYyOHUxgw0ItOqcb+wM/Q=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (48, '/QDMi1jgaR9dDlJEKLte5Zf+aMe+7Z3BLdndbgOIDO4=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (49, 'oyYP6vIP1QfDWGJBF8DJrzrx9o44aH4tnXOGCPQfEF8=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (50, 'fstdpDDpSI+KUdWR7zzqlsaHRQ82Elx396/DLJXgf6o=', TRUE); + +-- Shopping Sessions +INSERT INTO shopping_session (id, user_id, total) +VALUES (1, 1, 538.84); +INSERT INTO shopping_session (id, user_id, total) +VALUES (2, 2, 734.36); +INSERT INTO shopping_session (id, user_id, total) +VALUES (3, 3, 1680.53); +INSERT INTO shopping_session (id, user_id, total) +VALUES (4, 4, 303.57); +INSERT INTO shopping_session (id, user_id, total) +VALUES (5, 5, 1924.56); +INSERT INTO shopping_session (id, user_id, total) +VALUES (6, 6, 46.64); +INSERT INTO shopping_session (id, user_id, total) +VALUES (7, 7, 266.57); +INSERT INTO shopping_session (id, user_id, total) +VALUES (8, 8, 1503.89); +INSERT INTO shopping_session (id, user_id, total) +VALUES (9, 9, 1808.29); +INSERT INTO shopping_session (id, user_id, total) +VALUES (10, 10, 1890.97); +INSERT INTO shopping_session (id, user_id, total) +VALUES (11, 11, 30.01); +INSERT INTO shopping_session (id, user_id, total) +VALUES (12, 12, 1479.1); +INSERT INTO shopping_session (id, user_id, total) +VALUES (13, 13, 1559.22); +INSERT INTO shopping_session (id, user_id, total) +VALUES (14, 14, 1612.68); +INSERT INTO shopping_session (id, user_id, total) +VALUES (15, 15, 1905.59); +INSERT INTO shopping_session (id, user_id, total) +VALUES (16, 16, 141.6); +INSERT INTO shopping_session (id, user_id, total) +VALUES (17, 17, 496.74); +INSERT INTO shopping_session (id, user_id, total) +VALUES (18, 18, 1678.68); +INSERT INTO shopping_session (id, user_id, total) +VALUES (19, 19, 1140.02); +INSERT INTO shopping_session (id, user_id, total) +VALUES (20, 20, 872.75); + +-- Cart Items +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (1, 1, 40, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (2, 1, 26, 1); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (3, 2, 19, 4); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (4, 2, 23, 4); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (5, 3, 4, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (6, 3, 6, 5); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (7, 4, 21, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (8, 4, 26, 4); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (9, 5, 20, 1); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (10, 5, 3, 1); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (11, 6, 22, 2); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (12, 6, 1, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (13, 7, 49, 1); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (14, 7, 45, 1); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (15, 8, 7, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (16, 8, 20, 5); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (17, 9, 21, 2); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (18, 9, 13, 2); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (19, 10, 41, 4); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (20, 10, 21, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (21, 11, 19, 5); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (22, 11, 36, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (23, 12, 10, 4); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (24, 12, 38, 5); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (25, 13, 16, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (26, 13, 2, 1); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (27, 14, 22, 4); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (28, 14, 44, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (29, 15, 14, 1); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (30, 15, 14, 2); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (31, 16, 25, 4); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (32, 16, 1, 2); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (33, 17, 33, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (34, 17, 42, 4); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (35, 18, 48, 4); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (36, 18, 18, 5); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (37, 19, 21, 5); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (38, 19, 26, 2); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (39, 20, 36, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (40, 20, 36, 3); + +-- Orders and Payment Details +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (1, 1, 650, 'MasterCard', 'Failed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (1, 1, 650, 1); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (2, 2, 241, 'MasterCard', 'Pending'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (2, 2, 241, 2); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (3, 3, 134, 'PayPal', 'Failed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (3, 3, 134, 3); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (4, 4, 761, 'Stripe', 'Completed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (4, 4, 761, 4); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (5, 5, 356, 'Stripe', 'Failed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (5, 5, 356, 5); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (6, 6, 187, 'Visa', 'Failed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (6, 6, 187, 6); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (7, 7, 610, 'MasterCard', 'Completed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (7, 7, 610, 7); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (8, 8, 457, 'PayPal', 'Completed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (8, 8, 457, 8); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (9, 9, 178, 'MasterCard', 'Failed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (9, 9, 178, 9); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (10, 10, 156, 'Stripe', 'Failed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (10, 10, 156, 10); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (11, 11, 919, 'PayPal', 'Pending'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (11, 11, 919, 11); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (12, 12, 877, 'MasterCard', 'Failed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (12, 12, 877, 12); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (13, 13, 746, 'Visa', 'Completed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (13, 13, 746, 13); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (14, 14, 440, 'Stripe', 'Completed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (14, 14, 440, 14); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (15, 15, 983, 'Stripe', 'Completed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (15, 15, 983, 15); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (16, 16, 530, 'Visa', 'Failed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (16, 16, 530, 16); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (17, 17, 900, 'Visa', 'Completed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (17, 17, 900, 17); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (18, 18, 338, 'Stripe', 'Completed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (18, 18, 338, 18); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (19, 19, 759, 'PayPal', 'Pending'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (19, 19, 759, 19); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (20, 20, 956, 'Stripe', 'Completed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (20, 20, 956, 20); + +-- Order Items +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (1, 1, 21, 3, 1); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (2, 1, 25, 2, 1); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (3, 2, 22, 2, 2); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (4, 2, 27, 1, 2); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (5, 3, 15, 2, 3); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (6, 3, 32, 2, 3); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (7, 4, 17, 3, 4); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (8, 4, 28, 1, 4); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (9, 5, 47, 1, 5); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (10, 5, 34, 3, 5); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (11, 6, 16, 3, 6); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (12, 6, 19, 1, 6); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (13, 7, 17, 2, 7); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (14, 7, 10, 1, 7); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (15, 8, 40, 3, 8); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (16, 8, 29, 2, 8); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (17, 9, 23, 1, 9); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (18, 9, 13, 3, 9); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (19, 10, 8, 1, 10); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (20, 10, 2, 3, 10); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (21, 11, 27, 1, 11); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (22, 11, 4, 1, 11); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (23, 12, 27, 1, 12); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (24, 12, 10, 2, 12); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (25, 13, 8, 2, 13); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (26, 13, 22, 2, 13); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (27, 14, 33, 1, 14); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (28, 14, 46, 2, 14); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (29, 15, 37, 1, 15); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (30, 15, 10, 2, 15); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (31, 16, 27, 3, 16); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (32, 16, 26, 2, 16); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (33, 17, 15, 2, 17); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (34, 17, 12, 3, 17); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (35, 18, 39, 2, 18); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (36, 18, 26, 1, 18); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (37, 19, 15, 1, 19); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (38, 19, 29, 1, 19); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (39, 20, 16, 3, 20); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (40, 20, 8, 1, 20); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..8ccc96d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1037 @@ +{ + "name": "sniper", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "sniper", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "app-root-path": "^3.1.0", + "dotenv": "^16.4.7", + "express": "^4.21.2", + "express-session": "^1.18.1", + "mysql": "^2.18.1", + "mysql2": "^3.12.0", + "path": "^0.12.7" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/app-root-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.1.0.tgz", + "integrity": "sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==", + "license": "MIT", + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/aws-ssl-profiles": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz", + "integrity": "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==", + "license": "MIT", + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==", + "engines": { + "node": "*" + } + }, + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/dotenv": { + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.12", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express-session": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.18.1.tgz", + "integrity": "sha512-a5mtTqEaZvBCL9A9aqkrtfz+3SMDhOVUnjafjo+s7A9Txkq+SVX2DLvSp1Zrv4uCXa3lMSK3viWnh9Gg07PBUA==", + "dependencies": { + "cookie": "0.7.2", + "cookie-signature": "1.0.7", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-headers": "~1.0.2", + "parseurl": "~1.3.3", + "safe-buffer": "5.2.1", + "uid-safe": "~2.1.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/express-session/node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express-session/node_modules/cookie-signature": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz", + "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==" + }, + "node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/generate-function": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", + "license": "MIT", + "dependencies": { + "is-property": "^1.0.2" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==", + "license": "MIT" + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "license": "Apache-2.0" + }, + "node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/lru.min": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/lru.min/-/lru.min-1.1.1.tgz", + "integrity": "sha512-FbAj6lXil6t8z4z3j0E5mfRlPzxkySotzUHwRXjlpRh10vc6AI6WN62ehZj82VG7M20rqogJ0GLwar2Xa05a8Q==", + "license": "MIT", + "engines": { + "bun": ">=1.0.0", + "deno": ">=1.30.0", + "node": ">=8.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wellwelwel" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/mysql": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", + "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", + "dependencies": { + "bignumber.js": "9.0.0", + "readable-stream": "2.3.7", + "safe-buffer": "5.1.2", + "sqlstring": "2.3.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mysql/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/mysql2": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.12.0.tgz", + "integrity": "sha512-C8fWhVysZoH63tJbX8d10IAoYCyXy4fdRFz2Ihrt9jtPILYynFEKUUzpp1U7qxzDc3tMbotvaBH+sl6bFnGZiw==", + "license": "MIT", + "dependencies": { + "aws-ssl-profiles": "^1.1.1", + "denque": "^2.1.0", + "generate-function": "^2.3.1", + "iconv-lite": "^0.6.3", + "long": "^5.2.1", + "lru.min": "^1.0.0", + "named-placeholders": "^1.1.3", + "seq-queue": "^0.0.5", + "sqlstring": "^2.3.2" + }, + "engines": { + "node": ">= 8.0" + } + }, + "node_modules/mysql2/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mysql2/node_modules/sqlstring": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/named-placeholders": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz", + "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==", + "license": "MIT", + "dependencies": { + "lru-cache": "^7.14.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path": { + "version": "0.12.7", + "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", + "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==", + "dependencies": { + "process": "^0.11.1", + "util": "^0.10.3" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/random-bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", + "integrity": "sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/seq-queue": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", + "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sqlstring": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", + "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/uid-safe": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", + "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==", + "dependencies": { + "random-bytes": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dependencies": { + "inherits": "2.0.3" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/util/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..a95f1e3 --- /dev/null +++ b/package.json @@ -0,0 +1,24 @@ +{ + "name": "sniper", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "start": "node server.js" + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "Webshop Autohändler", + "dependencies": { + "app-root-path": "^3.1.0", + "dotenv": "^16.4.5", + "express": "^4.21.1", + "dotenv": "^16.4.7", + "express": "^4.21.2", + "express-session": "^1.18.1", + "mysql": "^2.18.1", + "mysql2": "^3.12.0", + "path": "^0.12.7" + } +} diff --git a/process.env b/process.env new file mode 100644 index 0000000..237aa94 --- /dev/null +++ b/process.env @@ -0,0 +1,8 @@ +# configuration for web app +APP_PORT=3000 + +# configuration for db access +DB_HOST=localhost +DB_USER=root +DB_PASSWORD= +DB_DATABASE=webshop diff --git a/public/Warenkorb/warenkorb.html b/public/Warenkorb/warenkorb.html new file mode 100644 index 0000000..1a51dd8 --- /dev/null +++ b/public/Warenkorb/warenkorb.html @@ -0,0 +1,33 @@ + + + + + Warenkorb + + + +
+

🛒 Dein Warenkorb

+ +
+
+ Produkt 1 + +
+ +
+ +
+
+ Produkt 2 +
+ +
+ +
+
+ + +
+ + diff --git a/public/login/login.html b/public/login/login.html new file mode 100644 index 0000000..3a14541 --- /dev/null +++ b/public/login/login.html @@ -0,0 +1,33 @@ + + + + + + + + Login + + +
+
+

Login

+
+ + +
+
+ + +
+ + + + +
+
+ + + diff --git a/public/registrieren/passwordValidation.js b/public/registrieren/passwordValidation.js new file mode 100644 index 0000000..3a6fbc2 --- /dev/null +++ b/public/registrieren/passwordValidation.js @@ -0,0 +1,45 @@ +// Funktion, um die Stärke des Passworts zu bewerten +function checkPasswordStrength(password) { + const strengthBar = document.getElementById('passwordStrengthBar'); + const passwordStrength = evaluatePasswordStrength(password); + + // Aktualisiere den Sicherheitsbalken basierend auf der Stärke + if (passwordStrength === 'weak') { + strengthBar.classList.remove('medium', 'strong'); + strengthBar.classList.add('weak'); + } else if (passwordStrength === 'medium') { + strengthBar.classList.remove('weak', 'strong'); + strengthBar.classList.add('medium'); + } else { + strengthBar.classList.remove('weak', 'medium'); + strengthBar.classList.add('strong'); + } +} + +// Funktion zur Beurteilung der Passwortstärke +function evaluatePasswordStrength(password) { + if (password.length >= 8 && /[A-Z]/.test(password) && /[0-9]/.test(password)) { + return 'strong'; + } else if (password.length >= 6) { + return 'medium'; + } else { + return 'weak'; + } +} + +// Event Listener für das Passwortfeld +document.getElementById('regPassword').addEventListener('input', function() { + checkPasswordStrength(this.value); +}); + +// Event Listener für das Bestätigungs-Passwortfeld +document.getElementById('confirmPassword').addEventListener('input', function() { + const password = document.getElementById('regPassword').value; + const confirmPassword = this.value; + + if (password !== confirmPassword) { + this.setCustomValidity("Die Passwörter stimmen nicht überein."); + } else { + this.setCustomValidity(""); + } +}); diff --git a/public/registrieren/registrieren.html b/public/registrieren/registrieren.html new file mode 100644 index 0000000..f95b594 --- /dev/null +++ b/public/registrieren/registrieren.html @@ -0,0 +1,51 @@ + + + + + + + + Registrieren + + +
+
+

Registrieren

+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+ + +
+ + + + + +
+
+ + + diff --git a/public/startseite/startseite.html b/public/startseite/startseite.html new file mode 100644 index 0000000..7e443f4 --- /dev/null +++ b/public/startseite/startseite.html @@ -0,0 +1,87 @@ + + + + + + Autohändler Webshop + + + + + +
+ +
+

Autohändler Webshop

+ +
+ + + + + +
+ + +
+
+ Auto +

BMW 3er Limousine

+

Preis: 35.000€

+

Baujahr: 2020 | Kilometerstand: 20.000 km

+ +
+
+ Auto +

Audi Q5

+

Preis: 50.000€

+

Baujahr: 2022 | Kilometerstand: 10.000 km

+ +
+
+
+
+ + + + + diff --git a/scripts/example.js b/scripts/example.js new file mode 100644 index 0000000..d539db9 --- /dev/null +++ b/scripts/example.js @@ -0,0 +1,23 @@ +let sidebarEl = document.getElementById("mySidebar") +let mainEl = document.getElementById("main") + +/* Set the width of the sidebar to 250px and the left margin of the page content to 250px */ +function openNav() { + sidebarEl.style.width = "250px"; + mainEl.style.marginLeft = "250px"; +} + +/* Set the width of the sidebar to 0 and the left margin of the page content to 0 */ +function closeNav() { + sidebarEl.style.width = "0"; + mainEl.style.marginLeft = "0"; +} + +/* Toggle the sidebar */ +function toggleNav() { + if (sidebarEl.offsetWidth > 0) { + closeNav() + } else { + openNav() + } +} \ No newline at end of file diff --git a/scripts/login.js b/scripts/login.js new file mode 100644 index 0000000..6d17a2a --- /dev/null +++ b/scripts/login.js @@ -0,0 +1,7 @@ +let nameEl = document.getElementById("loginMail"); +let passwordEl = document.getElementById("loginPassword"); + +function login() { + console.log(nameEl.value) + console.log(passwordEl.value) +} \ No newline at end of file diff --git a/scripts/modules/db-connect.js b/scripts/modules/db-connect.js new file mode 100644 index 0000000..97419f7 --- /dev/null +++ b/scripts/modules/db-connect.js @@ -0,0 +1,17 @@ +const mysql = require('mysql2'); +require('dotenv').config({path: 'C:/Daten/Webshop/process.env'}); +//to-do: '.env' Dateien aus anderen Directories aufrufen ohne absoluten Pfad +// require("dotenv").config({path:'C:/Daten/Webshop/process.env'}) + +const connection = mysql.createConnection({ + host : process.env.DB_HOST, + user : process.env.DB_USER, + password : process.env.DB_PASSWORD, + database : process.env.DB_DATABASE +}); + +connection.connect(function(err) { + if (err) throw err; +}); + +module.exports = connection; \ No newline at end of file diff --git a/scripts/modules/login.js b/scripts/modules/login.js new file mode 100644 index 0000000..454dccc --- /dev/null +++ b/scripts/modules/login.js @@ -0,0 +1,12 @@ +require('mysql2') + +let userInput = "test1" + +let appRoot = require('app-root-path') +let dbConnect = require(appRoot + '/scripts/modules/db-connect.js') + +dbConnect.query("SELECT * FROM webshop.user WHERE email = " + "'" + userInput + "'", function (err, result) { + if (err) throw err + console.log(result) +}) +dbConnect.end() \ No newline at end of file diff --git a/scripts/query/get_products.js b/scripts/query/get_products.js new file mode 100644 index 0000000..9f51378 --- /dev/null +++ b/scripts/query/get_products.js @@ -0,0 +1,17 @@ +const mysql = require('mysql'); + +const connection = mysql.createConnection({ + host: "localhost", + user: "root", + password: "", + database: "webshop" +}) + +connection.connect(function (err) { + if (err) throw err + console.log("Connected to database") + connection.query("SELECT * FROM webshop.product LIMIT 10", function (err, result) { + if (err) throw err + console.log(result) + }) +}) \ No newline at end of file diff --git a/scripts/query/get_users.js b/scripts/query/get_users.js new file mode 100644 index 0000000..72caeef --- /dev/null +++ b/scripts/query/get_users.js @@ -0,0 +1,17 @@ +const mysql = require('mysql'); + +const connection = mysql.createConnection({ + host: "localhost", + user: "root", + password: "", + database: "webshop" +}) + +connection.connect(function (err) { + if (err) throw err + console.log("Connected to database") + connection.query("SELECT * FROM webshop.user WHERE ID = 15", function (err, result) { + if (err) throw err + console.log(result) + }) +}) \ No newline at end of file diff --git a/scripts/routes/other/route-index.js b/scripts/routes/other/route-index.js new file mode 100644 index 0000000..1d6c308 --- /dev/null +++ b/scripts/routes/other/route-index.js @@ -0,0 +1,23 @@ +const path = require('path'); +const router = require('express').Router(); + +router.get('/', (req, res) => { + res.sendFile(path.join(__dirname, '../../../public/startseite/startseite.html')); +}) + +router.get('/example', (req, res) => { + res.sendFile(path.join(__dirname, '../../../public/example/index.html')); +}) + +router.get('/login', (req, res) => { + res.sendFile(path.join(__dirname, '../../../public/login/login.html')); +}) + +router.get('/registrieren', (req, res) => { + res.sendFile(path.join(__dirname, '../../../public/registrieren/registrieren.html')); +}) + +router.get('/Warenkorb', (req, res) => { + res.sendFile(path.join(__dirname, '../../../public/warenkorb/warenkorb.html')); +}) +module.exports = router; \ No newline at end of file diff --git a/scripts/script-main.js b/scripts/script-main.js new file mode 100644 index 0000000..e69de29 diff --git a/server.js b/server.js new file mode 100644 index 0000000..05079f0 --- /dev/null +++ b/server.js @@ -0,0 +1,30 @@ +const express = require('express'); +const session = require('express-session'); +const router = require('express').Router(); +const path = require('path'); + +require('dotenv').config({path:'process.env'}); + +const app = express(); + +app.use(session({ + secret: 'secret', + resave: true, + saveUninitialized: true +})); + +app.use(express.json()); +app.use(express.urlencoded({ extended: true })); +app.use(express.static(path.join(__dirname, '/scripts'))); +app.use(express.static(path.join(__dirname, '/static'))); + +const getIndexRoute = require('./scripts/routes/other/route-index'); + +app.use('/', getIndexRoute); + +app.listen(process.env.APP_PORT, () => { + console.log("\x1b[32m"); + console.log(`Server is running on http://localhost:${process.env.APP_PORT}`); + console.log("\x1b[0m"); + console.log('Access it now...'); +}); \ No newline at end of file diff --git a/sql_scripts/createDB.sql b/sql_scripts/createDB.sql deleted file mode 100644 index c5b57e8..0000000 --- a/sql_scripts/createDB.sql +++ /dev/null @@ -1,26 +0,0 @@ -CREATE - DATABASE autohaendler; -\c -autohaendler - -CREATE TYPE color; -CREATE TYPE make; -CREATE TYPE model; -CREATE TYPE engine; -CREATE TYPE price; -CREATE TYPE doors; - -CREATE - EXTENSION IF NOT EXISTS "uuid-ossp"; - -CREATE TABLE autohaendler_stock -( - color TEXT NOT NULL, - make TEXT NOT NULL, - model TEXT NOT NULL, - engine TEXT NOT NULL, - price TEXT NOT NULL, - doors TEXT NOT NULL, -); - -INSERT INTO autohaendler_stock (color, make, model, engine, price, doors); diff --git a/sql_scripts/rollbackDB.sql b/sql_scripts/rollbackDB.sql deleted file mode 100644 index 07aa47c..0000000 --- a/sql_scripts/rollbackDB.sql +++ /dev/null @@ -1,17 +0,0 @@ -\c -autohaendler - -DROP TABLE autohaendler; - -DROP TYPE IF EXISTS color; -DROP TYPE IF EXISTS make; -DROP TYPE IF EXISTS model; -DROP TYPE IF EXISTS engine; -DROP TYPE IF EXISTS price; -DROP TYPE IF EXISTS doors; - -\c -postgres - -DROP -DATABASE autohaendler; diff --git a/src/backend/example/database_calls/getDatabaseTable.php b/src/backend/example/database_calls/getDatabaseTable.php deleted file mode 100644 index e8323de..0000000 --- a/src/backend/example/database_calls/getDatabaseTable.php +++ /dev/null @@ -1,38 +0,0 @@ -set_charset("utf8mb4"); -// close connection on error -if ($conn->connect_error) { - die("Connection failed: " . $conn->connect_error); -} - -// prepare SQL statement and execute on database -$sql = "SELECT * FROM table"; -// get data from database -$result = $conn->query($sql); -$conn->close(); - -// check if result is empty & has more than "0" rows -if (!empty($result) && (int)$result->num_rows > 0) { - while ($row = $result->fetch_assoc()) { - $sqlArray[] = $row; - } - echo json_encode($sqlArray); -} else { - echo "0 results"; -} -exit(); diff --git a/src/backend/example/database_calls/startAjax.js b/src/backend/example/database_calls/startAjax.js deleted file mode 100644 index 6d68ea2..0000000 --- a/src/backend/example/database_calls/startAjax.js +++ /dev/null @@ -1,17 +0,0 @@ -$(document).ready(function () { - - // ajax function to call PHP script on webserver - $.ajax({ - type: "POST", // use what "type" is necessary, POST is most common - url: "getDatabaseTable.php", // path to .php file that will be executed - dataType: "json", // return type of the PHP script - success: function (data) { - console.log("successfully called PHP file!") - console.log(data) - // implement logic to write json into HTML here - }, - error: function () { - console.log("failed to call PHP file!") - } - }); -}) \ No newline at end of file diff --git a/src/frontend/example/01_counter/app.js b/src/frontend/example/01_counter/app.js deleted file mode 100644 index 44f3afb..0000000 --- a/src/frontend/example/01_counter/app.js +++ /dev/null @@ -1,29 +0,0 @@ -// set initial count -let count = 0; - -// select value and buttons -const value = document.querySelector("#value"); -const buttons = document.querySelectorAll(".btn"); - -buttons.forEach(function (btn) { - btn.addEventListener("click", function (e) { - const styles = e.currentTarget.classList; - if (styles.contains("decrease")) { - count--; - } else if (styles.contains("increase")) { - count++; - } else if (styles.contains("reset")) { - count = 0; - } - if (count > 0) { - value.style.color = "green"; - } - if (count < 0) { - value.style.color = "red"; - } - if (count === 0) { - value.style.color = "#222" - } - value.textContent = count; - }) -}); diff --git a/src/frontend/example/01_counter/index.html b/src/frontend/example/01_counter/index.html deleted file mode 100644 index b1e6e92..0000000 --- a/src/frontend/example/01_counter/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - Counter - - - - - -
-

- counter -

- 0 -
- - - -
-
- - - - \ No newline at end of file diff --git a/src/frontend/example/01_counter/styles.css b/src/frontend/example/01_counter/styles.css deleted file mode 100644 index cf1668c..0000000 --- a/src/frontend/example/01_counter/styles.css +++ /dev/null @@ -1,207 +0,0 @@ -/* -=============== -Fonts -=============== -*/ -@import url("https://fonts.googleapis.com/css?family=Open+Sans|Roboto:400,700&display=swap"); - -/* -=============== -Variables -=============== -*/ - -:root { - /* dark shades of primary color*/ - --clr-primary-1: hsl(205, 86%, 17%); - --clr-primary-2: hsl(205, 77%, 27%); - --clr-primary-3: hsl(205, 72%, 37%); - --clr-primary-4: hsl(205, 63%, 48%); - /* primary/main color */ - --clr-primary-5: hsl(205, 78%, 60%); - /* lighter shades of primary color */ - --clr-primary-6: hsl(205, 89%, 70%); - --clr-primary-7: hsl(205, 90%, 76%); - --clr-primary-8: hsl(205, 86%, 81%); - --clr-primary-9: hsl(205, 90%, 88%); - --clr-primary-10: hsl(205, 100%, 96%); - /* darkest grey - used for headings */ - --clr-grey-1: hsl(209, 61%, 16%); - --clr-grey-2: hsl(211, 39%, 23%); - --clr-grey-3: hsl(209, 34%, 30%); - --clr-grey-4: hsl(209, 28%, 39%); - /* grey used for paragraphs */ - --clr-grey-5: hsl(210, 22%, 49%); - --clr-grey-6: hsl(209, 23%, 60%); - --clr-grey-7: hsl(211, 27%, 70%); - --clr-grey-8: hsl(210, 31%, 80%); - --clr-grey-9: hsl(212, 33%, 89%); - --clr-grey-10: hsl(210, 36%, 96%); - --clr-white: #fff; - --clr-red-dark: hsl(360, 67%, 44%); - --clr-red-light: hsl(360, 71%, 66%); - --clr-green-dark: hsl(125, 67%, 44%); - --clr-green-light: hsl(125, 71%, 66%); - --clr-black: #222; - --ff-primary: "Roboto", sans-serif; - --ff-secondary: "Open Sans", sans-serif; - --transition: all 0.3s linear; - --spacing: 0.1rem; - --radius: 0.25rem; - --light-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); - --dark-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); - --max-width: 1170px; - --fixed-width: 620px; -} - -/* -=============== -Global Styles -=============== -*/ - -*, -::after, -::before { - margin: 0; - padding: 0; - box-sizing: border-box; -} - -body { - font-family: var(--ff-secondary); - background: var(--clr-grey-10); - color: var(--clr-grey-1); - line-height: 1.5; - font-size: 0.875rem; -} - -ul { - list-style-type: none; -} - -a { - text-decoration: none; -} - -h1, -h2, -h3, -h4 { - letter-spacing: var(--spacing); - text-transform: capitalize; - line-height: 1.25; - margin-bottom: 0.75rem; - font-family: var(--ff-primary); -} - -h1 { - font-size: 3rem; -} - -h2 { - font-size: 2rem; -} - -h3 { - font-size: 1.25rem; -} - -h4 { - font-size: 0.875rem; -} - -p { - margin-bottom: 1.25rem; - color: var(--clr-grey-5); -} - -@media screen and (min-width: 800px) { - h1 { - font-size: 4rem; - } - - h2 { - font-size: 2.5rem; - } - - h3 { - font-size: 1.75rem; - } - - h4 { - font-size: 1rem; - } - - body { - font-size: 1rem; - } - - h1, - h2, - h3, - h4 { - line-height: 1; - } -} - -/* global classes */ - -/* section */ -.section { - padding: 5rem 0; -} - -.section-center { - width: 90vw; - margin: 0 auto; - max-width: 1170px; -} - -@media screen and (min-width: 992px) { - .section-center { - width: 95vw; - } -} - -main { - min-height: 100vh; - display: grid; - place-items: center; -} - -/* -=============== -Counter -=============== -*/ - -.container { - text-align: center; -} - -#value { - font-size: 6rem; - font-weight: bold; -} - -.btn { - text-transform: uppercase; - background: transparent; - color: var(--clr-black); - padding: 0.375rem 0.75rem; - letter-spacing: var(--spacing); - display: inline-block; - transition: var(--transition); - font-size: 0.875rem; - border: 2px solid var(--clr-black); - cursor: pointer; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); - border-radius: var(--radius); - margin: 0.5rem; -} - -.btn:hover { - color: var(--clr-white); - background: var(--clr-black); -} \ No newline at end of file diff --git a/src/frontend/example/05_sidebar/app.js b/src/frontend/example/05_sidebar/app.js deleted file mode 100644 index 0bf53f3..0000000 --- a/src/frontend/example/05_sidebar/app.js +++ /dev/null @@ -1,16 +0,0 @@ -const toggleBtn = document.querySelector(".sidebar-toggle"); -const closeBtn = document.querySelector(".close-btn"); -const sidebar = document.querySelector(".sidebar"); - -toggleBtn.addEventListener("click", function () { - // if (sidebar.classList.contains("show-sidebar")) { - // sidebar.classList.remove("show-sidebar"); - // } else { - // sidebar.classList.add("show-sidebar"); - // } - sidebar.classList.toggle("show-sidebar"); -}); - -closeBtn.addEventListener("click", function () { - sidebar.classList.remove("show-sidebar"); -}); diff --git a/src/frontend/example/05_sidebar/index.html b/src/frontend/example/05_sidebar/index.html deleted file mode 100644 index f4fb120..0000000 --- a/src/frontend/example/05_sidebar/index.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - Sidebar - - - - - - - - - - \ No newline at end of file diff --git a/src/frontend/example/05_sidebar/logo.svg b/src/frontend/example/05_sidebar/logo.svg deleted file mode 100644 index cccc49b..0000000 --- a/src/frontend/example/05_sidebar/logo.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/frontend/example/05_sidebar/styles.css b/src/frontend/example/05_sidebar/styles.css deleted file mode 100644 index 2bfcaf8..0000000 --- a/src/frontend/example/05_sidebar/styles.css +++ /dev/null @@ -1,289 +0,0 @@ -/* -=============== -Fonts -=============== -*/ -@import url('https://fonts.googleapis.com/css?family=Open+Sans|Roboto:400,700&display=swap'); - -/* -=============== -Variables -=============== -*/ - -:root { - /* dark shades of primary color*/ - --clr-primary-1: hsl(205, 86%, 17%); - --clr-primary-2: hsl(205, 77%, 27%); - --clr-primary-3: hsl(205, 72%, 37%); - --clr-primary-4: hsl(205, 63%, 48%); - /* primary/main color */ - --clr-primary-5: hsl(205, 78%, 60%); - /* lighter shades of primary color */ - --clr-primary-6: hsl(205, 89%, 70%); - --clr-primary-7: hsl(205, 90%, 76%); - --clr-primary-8: hsl(205, 86%, 81%); - --clr-primary-9: hsl(205, 90%, 88%); - --clr-primary-10: hsl(205, 100%, 96%); - /* darkest grey - used for headings */ - --clr-grey-1: hsl(209, 61%, 16%); - --clr-grey-2: hsl(211, 39%, 23%); - --clr-grey-3: hsl(209, 34%, 30%); - --clr-grey-4: hsl(209, 28%, 39%); - /* grey used for paragraphs */ - --clr-grey-5: hsl(210, 22%, 49%); - --clr-grey-6: hsl(209, 23%, 60%); - --clr-grey-7: hsl(211, 27%, 70%); - --clr-grey-8: hsl(210, 31%, 80%); - --clr-grey-9: hsl(212, 33%, 89%); - --clr-grey-10: hsl(210, 36%, 96%); - --clr-white: #fff; - --clr-red-dark: hsl(360, 67%, 44%); - --clr-red-light: hsl(360, 71%, 66%); - --clr-green-dark: hsl(125, 67%, 44%); - --clr-green-light: hsl(125, 71%, 66%); - --clr-black: #222; - --ff-primary: 'Roboto', sans-serif; - --ff-secondary: 'Open Sans', sans-serif; - --transition: all 0.3s linear; - --spacing: 0.1rem; - --radius: 0.25rem; - --light-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); - --dark-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); - --max-width: 1170px; - --fixed-width: 620px; -} - -/* -=============== -Global Styles -=============== -*/ - -*, -::after, -::before { - margin: 0; - padding: 0; - box-sizing: border-box; -} - -body { - font-family: var(--ff-secondary); - background: var(--clr-grey-10); - color: var(--clr-grey-1); - line-height: 1.5; - font-size: 0.875rem; -} - -ul { - list-style-type: none; -} - -a { - text-decoration: none; -} - -h1, -h2, -h3, -h4 { - letter-spacing: var(--spacing); - text-transform: capitalize; - line-height: 1.25; - margin-bottom: 0.75rem; - font-family: var(--ff-primary); -} - -h1 { - font-size: 3rem; -} - -h2 { - font-size: 2rem; -} - -h3 { - font-size: 1.25rem; -} - -h4 { - font-size: 0.875rem; -} - -p { - margin-bottom: 1.25rem; - color: var(--clr-grey-5); -} - -@media screen and (min-width: 800px) { - h1 { - font-size: 4rem; - } - - h2 { - font-size: 2.5rem; - } - - h3 { - font-size: 1.75rem; - } - - h4 { - font-size: 1rem; - } - - body { - font-size: 1rem; - } - - h1, - h2, - h3, - h4 { - line-height: 1; - } -} - -/* global classes */ - -/* section */ -.section { - padding: 5rem 0; -} - -.section-center { - width: 90vw; - margin: 0 auto; - max-width: 1170px; -} - -@media screen and (min-width: 992px) { - .section-center { - width: 95vw; - } -} - -main { - min-height: 100vh; - display: grid; - place-items: center; -} - -/* -=============== -Sidebar -=============== -*/ -.sidebar-toggle { - position: fixed; - top: 2rem; - right: 3rem; - font-size: 2rem; - background: transparent; - border-color: transparent; - color: var(--clr-primary-5); - transition: var(--transition); - cursor: pointer; - animation: bounce 2s ease-in-out infinite; -} - -.sidebar-toggle:hover { - color: var(--clr-primary-7); -} - -@keyframes bounce { - 0% { - transform: scale(1); - } - 50% { - transform: scale(1.5); - } - 100% { - transform: scale(1); - } -} - -.sidebar-header { - display: flex; - justify-content: space-between; - align-items: center; - padding: 1rem 1.5rem; -} - -.close-btn { - font-size: 1.75rem; - background: transparent; - border-color: transparent; - color: var(--clr-primary-5); - transition: var(--transition); - cursor: pointer; - color: var(--clr-red-dark); -} - -.close-btn:hover { - color: var(--clr-red-light); - transform: rotate(360deg); -} - -.logo { - justify-self: center; - height: 40px; -} - -.links a { - display: block; - font-size: 1.5rem; - text-transform: capitalize; - padding: 1rem 1.5rem; - color: var(--clr-grey-5); - transition: var(--transition); -} - -.links a:hover { - background: var(--clr-primary-8); - color: var(--clr-primary-5); - padding-left: 1.75rem; -} - -.social-icons { - justify-self: center; - display: flex; - padding-bottom: 2rem; -} - -.social-icons a { - font-size: 1.5rem; - margin: 0 0.5rem; - color: var(--clr-primary-5); - transition: var(--transition); -} - -.social-icons a:hover { - color: var(--clr-primary-1); -} - -.sidebar { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: var(--clr-white); - display: grid; - grid-template-rows: auto 1fr auto; - row-gap: 1rem; - box-shadow: var(--clr-red-dark); - transition: var(--transition); - /* transform: translate(-100%); */ -} - -.show-sidebar { - transform: translate(0); -} - -@media screen and (min-width: 676px) { - .sidebar { - width: 400px; - } -} diff --git a/src/frontend/example/grid_layout/grid_layout.css b/src/frontend/example/grid_layout/grid_layout.css deleted file mode 100644 index 9be4f0e..0000000 --- a/src/frontend/example/grid_layout/grid_layout.css +++ /dev/null @@ -1,37 +0,0 @@ -.item1 { - grid-area: header; -} - -.item2 { - grid-area: menu; -} - -.item3 { - grid-area: main; -} - -.item4 { - grid-area: right; -} - -.item5 { - grid-area: footer; -} - -.grid-container { - display: grid; - grid-template-areas: - 'header header header header header header' - 'menu main main main main right' - 'menu footer footer footer footer footer'; - gap: 10px; - background-color: whitesmoke; - padding: 10px; -} - -.grid-container > div { - background-color: rgba(255, 255, 255, 0.8); - text-align: center; - padding: 20px 0; - font-size: 30px; -} \ No newline at end of file diff --git a/src/frontend/example/grid_layout/index.html b/src/frontend/example/grid_layout/index.html deleted file mode 100644 index 39c892c..0000000 --- a/src/frontend/example/grid_layout/index.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - Example 1 - - - - -
-
header
-
menu
-
main
-
right
-
footer
-
- - \ No newline at end of file diff --git a/src/frontend/example/toggle_dark_light/app.js b/src/frontend/example/toggle_dark_light/app.js deleted file mode 100644 index 9b25a26..0000000 --- a/src/frontend/example/toggle_dark_light/app.js +++ /dev/null @@ -1,4 +0,0 @@ -function switchLightDark() { - let element = document.body - element.classList.toggle("dark-mode") -} \ No newline at end of file diff --git a/src/frontend/example/toggle_dark_light/index.html b/src/frontend/example/toggle_dark_light/index.html deleted file mode 100644 index 2b0ee21..0000000 --- a/src/frontend/example/toggle_dark_light/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - Darkmode - - - -

Toggle Dark/Light Mode

-

Click the button to toggle between dark and light mode for this page.

- - - - - - \ No newline at end of file diff --git a/src/frontend/example/toggle_dark_light/styles.css b/src/frontend/example/toggle_dark_light/styles.css deleted file mode 100644 index aebb339..0000000 --- a/src/frontend/example/toggle_dark_light/styles.css +++ /dev/null @@ -1,11 +0,0 @@ -body { - padding: 25px; - background-color: white; - color: black; - font-size: 25px; -} - -.dark-mode { - background-color: black; - color: white; -} \ No newline at end of file diff --git a/static/Styles/Warenkorb/warenkorb.css b/static/Styles/Warenkorb/warenkorb.css new file mode 100644 index 0000000..b1209d4 --- /dev/null +++ b/static/Styles/Warenkorb/warenkorb.css @@ -0,0 +1,79 @@ +body { + font-family: Arial, sans-serif; + background-color: #f3f3f3; + margin: 0; + padding: 130px; +} + +.warenkorb { + max-width: 500px; + margin: 0 auto; + background: white; + padding: 120px; + border-radius: 12px; + box-shadow: 0 4px 12px rgba(0,0,0,0.1); +} + +.warenkorb h2 { + font-size: 30px; + text-align: center; + margin-bottom: 60px; +} + +.item { + display: flex; + justify-content: space-between; + align-items: center; + border-bottom: 1px solid #ddd; + padding: 10px 0; + margin-bottom: 35px; +} + +.item .info { + display: flex; + flex-direction: column; +} + +.item .name { + font-weight: bold; +} + +.item .price { + color: #555; +} + +.remove { + background-color: #ff4d4f; + border: none; + color: white; + padding: 6px 12px; + border-radius: 6px; + cursor: pointer; +} + +.remove:hover { + background-color: #e60000; +} + +.summary { + text-align: right; + font-size: 1.1em; + margin: 20px 0; +} + +.checkout { + display: block; + width: 100%; + padding: 12px; + background-color: #4CAF50; + border: none; + color: white; + font-size: 16px; + border-radius: 8px; + cursor: pointer; + margin-top: 90px; +} + +.checkout:hover { + background-color: #45a049; +} diff --git a/static/Styles/example.css b/static/Styles/example.css new file mode 100644 index 0000000..d9450fe --- /dev/null +++ b/static/Styles/example.css @@ -0,0 +1,234 @@ +/* Allgemeine Einstellungen */ +* { + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: "Poppins", sans-serif; +} + +body { + background: #f8f9fa; + color: #333; + min-height: 100vh; + display: flex; + flex-direction: column; +} + +/* Header */ +header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 15px 20px; + width: 100%; + background: #ffffff; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + position: sticky; + top: 0; + z-index: 1000; +} + +header h1 { + font-size: 28px; + color: #333; +} + +.header-right { + display: flex; + align-items: center; + gap: 15px; +} + +header .login-btn { + font-size: 14px; + text-decoration: none; + color: white; + background: #ff6600; + padding: 10px 20px; + border-radius: 25px; + transition: background 0.3s ease; +} + +header .login-btn:hover { + background: #e95b00; +} + +.cart { + display: flex; + align-items: center; + position: relative; + font-size: 24px; + color: #ff6600; + cursor: pointer; +} + +.cart-count { + position: absolute; + top: -5px; + right: -10px; + background: #ff6600; + color: white; + font-size: 12px; + width: 20px; + height: 20px; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; +} + +/* Navigation */ +.menu { + background: #ffffff; + width: 100%; + margin-bottom: 20px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +.menu-list { + list-style: none; + display: flex; + justify-content: space-around; + padding: 15px 0; +} + +.menu-item { + position: relative; +} + +.menu-item a { + text-decoration: none; + color: #333; + font-size: 18px; + padding: 10px 20px; + transition: background 0.3s ease, color 0.3s ease; +} + +.menu-item a:hover { + background: #ff6600; + color: white; + border-radius: 10px; +} + +/* Submenu */ +.submenu { + position: absolute; + top: 100%; + left: 0; + background: #ffffff; + border-radius: 10px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + display: none; + list-style: none; + min-width: 200px; + z-index: 10; +} + +.submenu li { + padding: 10px 20px; +} + +.submenu li a { + color: #333; +} + +.submenu li a:hover { + color: white; + background: #ff6600; + border-radius: 5px; +} + +.menu-item:hover .submenu { + display: block; +} + +/* Suchleiste */ +.search-bar { + display: flex; + gap: 15px; + width: 100%; + padding: 20px; + background: #ffffff; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + position: sticky; + top: 65px; + z-index: 1000; +} + +.search-bar input, +.search-bar select { + padding: 12px; + font-size: 16px; + border: 1px solid #ddd; + border-radius: 5px; + flex: 1; +} + +.search-bar button { + padding: 12px 20px; + background: #ff6600; + color: white; + border: none; + border-radius: 5px; + cursor: pointer; + transition: background 0.3s ease; +} + +.search-bar button:hover { + background: #e95b00; +} + +/* Karten */ +.card-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); + gap: 20px; + width: 100%; + padding: 20px; +} + +.card { + background: #ffffff; + border-radius: 10px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + text-align: center; + padding: 20px; + height: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.card img { + max-width: 100%; + height: auto; + border-radius: 10px; + margin-bottom: 10px; +} + +.card h3 { + font-size: 20px; + color: #333; + margin: 10px 0; +} + +.card p { + font-size: 14px; + color: #666; + margin: 5px 0; +} + +.add-to-cart { + background: #ff6600; + color: white; + border: none; + padding: 12px 20px; + border-radius: 25px; + margin-top: 10px; + cursor: pointer; + transition: background 0.3s ease; +} + +.add-to-cart:hover { + background: #e95b00; +} diff --git a/static/Styles/login/login.css b/static/Styles/login/login.css new file mode 100644 index 0000000..7ff8038 --- /dev/null +++ b/static/Styles/login/login.css @@ -0,0 +1,109 @@ +/* Allgemeine Einstellungen */ +* { + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: "Poppins", sans-serif; +} + +body { + background: #f8f9fa; + color: #333; + min-height: 100vh; + display: flex; + justify-content: center; + align-items: center; +} + +/* Wrapper */ +.wrapper { + background: #ffffff; + padding: 40px; + border-radius: 10px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + max-width: 400px; + width: 100%; +} + +h1 { + font-size: 24px; + text-align: center; + color: #333; + margin-bottom: 20px; +} + +/* Input-Box */ +.input-box { + position: relative; + margin-bottom: 20px; +} + +.input-box input { + width: 100%; + padding: 12px 40px 12px 15px; + border: 1px solid #ddd; + border-radius: 5px; + font-size: 16px; + color: #333; +} + +/* Styling für das Schloss-Icon */ +.input-box i { + position: absolute; + top: 50%; + right: 15px; + transform: translateY(-50%); + color: #888; + font-size: 20px; + cursor: pointer; +} + +/* Remember and Forgot */ +.remember-forgot { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 20px; + font-size: 14px; +} + +.remember-forgot a { + color: #ff6600; + text-decoration: none; +} + +.remember-forgot a:hover { + text-decoration: underline; +} + +/* Button */ +.btn { + width: 100%; + padding: 12px 20px; + background: #ff6600; + color: white; + border: none; + border-radius: 5px; + font-size: 16px; + cursor: pointer; + transition: background 0.3s ease; +} + +.btn:hover { + background: #e95b00; +} + +/* Register-Link */ +.register-link { + text-align: center; + font-size: 14px; +} + +.register-link a { + color: #ff6600; + text-decoration: none; +} + +.register-link a:hover { + text-decoration: underline; +} \ No newline at end of file diff --git a/static/Styles/registrieren/registrieren.css b/static/Styles/registrieren/registrieren.css new file mode 100644 index 0000000..1027480 --- /dev/null +++ b/static/Styles/registrieren/registrieren.css @@ -0,0 +1,129 @@ +/* Allgemeine Einstellungen */ +* { + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: "Poppins", sans-serif; +} + +body { + background: #f8f9fa; + color: #333; + min-height: 100vh; + display: flex; + flex-direction: column; +} + +/* Wrapper für das Formular */ +.wrapper { + width: 100%; + max-width: 400px; + margin: 50px auto; + padding: 20px; + background: #fff; + border-radius: 10px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +h1 { + text-align: center; + margin-bottom: 20px; + color: #333; +} + +/* Eingabefelder */ +.input-box { + position: relative; + margin-bottom: 20px; +} + +/* Textfelder */ +.input-box input { + width: 100%; + padding: 12px 15px; + font-size: 16px; + border: 1px solid #ddd; + border-radius: 5px; + outline: none; + padding-left: 40px; /* Platz für das Icon */ +} + +/* Positionierung der Icons */ +.input-box i { + position: absolute; + top: 50%; + left: 10px; + transform: translateY(-50%); + font-size: 18px; + color: #888; +} + +/* Passwortfeld */ +.input-box input[type="password"] { + padding-right: 40px; /* Platz für das Passwort-Symbol rechts */ +} + +/* Positionierung des Passwort-Symbols */ +#toggleRegPassword { + position: absolute; + top: 50%; + right: 10px; + transform: translateY(-50%); + font-size: 18px; + color: #888; + cursor: pointer; +} + +/* Passwort Sicherheitsbalken */ +.password-strength-bar { + width: 100%; + height: 5px; + background-color: #ddd; + border-radius: 5px; + margin-top: 10px; +} + +/* Sicherheitsstufen */ +.password-strength-bar.weak { + background-color: #f44336; /* Rot für schwach */ +} + +.password-strength-bar.medium { + background-color: #ff9800; /* Orange für mittel */ +} + +.password-strength-bar.strong { + background-color: #4caf50; /* Grün für stark */ +} + +/* Button */ +.btn { + width: 100%; + padding: 12px; + background: #ff6600; + color: white; + border: none; + border-radius: 25px; + font-size: 16px; + cursor: pointer; + transition: background 0.3s ease; +} + +.btn:hover { + background: #e95b00; +} + +/* Registrierung-Link */ +.register-link { + text-align: center; + margin-top: 20px; +} + +.register-link a { + text-decoration: none; + color: #ff6600; +} + +.register-link a:hover { + color: #e95b00; +} diff --git a/static/Styles/startseite/startseite.css b/static/Styles/startseite/startseite.css new file mode 100644 index 0000000..d9450fe --- /dev/null +++ b/static/Styles/startseite/startseite.css @@ -0,0 +1,234 @@ +/* Allgemeine Einstellungen */ +* { + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: "Poppins", sans-serif; +} + +body { + background: #f8f9fa; + color: #333; + min-height: 100vh; + display: flex; + flex-direction: column; +} + +/* Header */ +header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 15px 20px; + width: 100%; + background: #ffffff; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + position: sticky; + top: 0; + z-index: 1000; +} + +header h1 { + font-size: 28px; + color: #333; +} + +.header-right { + display: flex; + align-items: center; + gap: 15px; +} + +header .login-btn { + font-size: 14px; + text-decoration: none; + color: white; + background: #ff6600; + padding: 10px 20px; + border-radius: 25px; + transition: background 0.3s ease; +} + +header .login-btn:hover { + background: #e95b00; +} + +.cart { + display: flex; + align-items: center; + position: relative; + font-size: 24px; + color: #ff6600; + cursor: pointer; +} + +.cart-count { + position: absolute; + top: -5px; + right: -10px; + background: #ff6600; + color: white; + font-size: 12px; + width: 20px; + height: 20px; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; +} + +/* Navigation */ +.menu { + background: #ffffff; + width: 100%; + margin-bottom: 20px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +.menu-list { + list-style: none; + display: flex; + justify-content: space-around; + padding: 15px 0; +} + +.menu-item { + position: relative; +} + +.menu-item a { + text-decoration: none; + color: #333; + font-size: 18px; + padding: 10px 20px; + transition: background 0.3s ease, color 0.3s ease; +} + +.menu-item a:hover { + background: #ff6600; + color: white; + border-radius: 10px; +} + +/* Submenu */ +.submenu { + position: absolute; + top: 100%; + left: 0; + background: #ffffff; + border-radius: 10px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + display: none; + list-style: none; + min-width: 200px; + z-index: 10; +} + +.submenu li { + padding: 10px 20px; +} + +.submenu li a { + color: #333; +} + +.submenu li a:hover { + color: white; + background: #ff6600; + border-radius: 5px; +} + +.menu-item:hover .submenu { + display: block; +} + +/* Suchleiste */ +.search-bar { + display: flex; + gap: 15px; + width: 100%; + padding: 20px; + background: #ffffff; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + position: sticky; + top: 65px; + z-index: 1000; +} + +.search-bar input, +.search-bar select { + padding: 12px; + font-size: 16px; + border: 1px solid #ddd; + border-radius: 5px; + flex: 1; +} + +.search-bar button { + padding: 12px 20px; + background: #ff6600; + color: white; + border: none; + border-radius: 5px; + cursor: pointer; + transition: background 0.3s ease; +} + +.search-bar button:hover { + background: #e95b00; +} + +/* Karten */ +.card-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); + gap: 20px; + width: 100%; + padding: 20px; +} + +.card { + background: #ffffff; + border-radius: 10px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + text-align: center; + padding: 20px; + height: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.card img { + max-width: 100%; + height: auto; + border-radius: 10px; + margin-bottom: 10px; +} + +.card h3 { + font-size: 20px; + color: #333; + margin: 10px 0; +} + +.card p { + font-size: 14px; + color: #666; + margin: 5px 0; +} + +.add-to-cart { + background: #ff6600; + color: white; + border: none; + padding: 12px 20px; + border-radius: 25px; + margin-top: 10px; + cursor: pointer; + transition: background 0.3s ease; +} + +.add-to-cart:hover { + background: #e95b00; +} diff --git a/static/Styles/styles-main.css b/static/Styles/styles-main.css new file mode 100644 index 0000000..b82692c --- /dev/null +++ b/static/Styles/styles-main.css @@ -0,0 +1,26 @@ + +/* +=============== +Fonts +=============== +*/ +@import url("https://fonts.googleapis.com/css?family=Open+Sans|Roboto:400,700&display=swap"); + +/* +=============== +Variables +=============== +*/ +:root { + --demo-clr: #ff0000; +} + +/* +=============== +Global Styles +=============== +*/ + +h1 { + color: var(--demo-clr); +} \ No newline at end of file diff --git a/static/images/LoginBackround.jpg b/static/images/LoginBackround.jpg new file mode 100644 index 0000000..087be46 Binary files /dev/null and b/static/images/LoginBackround.jpg differ