diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 14db905..72a6aa7 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -4,7 +4,7 @@ name: Build and Deploy on: push: - branches: ["main"] + branches: ["deploytest"] jobs: build-and-deploy: diff --git a/rust-engine/Cargo.lock b/rust-engine/Cargo.lock index 82db808..a7ce9f3 100644 --- a/rust-engine/Cargo.lock +++ b/rust-engine/Cargo.lock @@ -143,12 +143,6 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" -[[package]] -name = "cors" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d2dacfa7c8e6a88bacdbd500047e86ac32f67a3706d5b55a1d7b36c80efbc2f" - [[package]] name = "cpufeatures" version = "0.2.17" @@ -232,12 +226,6 @@ dependencies = [ "syn", ] -[[package]] -name = "dotenv" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" - [[package]] name = "dotenvy" version = "0.15.7" @@ -1143,12 +1131,11 @@ dependencies = [ [[package]] name = "rust-engine" -version = "0.1.0" +version = "0.1.1" dependencies = [ "anyhow", "chrono", - "cors", - "dotenv", + "dotenvy", "serde", "serde_json", "sqlx", diff --git a/rust-engine/Cargo.toml b/rust-engine/Cargo.toml index 354f35e..7188aea 100644 --- a/rust-engine/Cargo.toml +++ b/rust-engine/Cargo.toml @@ -1,10 +1,13 @@ +# rust-engine/Cargo.toml + [package] name = "rust-engine" -version = "0.1.0" -edition = "2021" +version = "0.1.1" +edition = "2024" +# --- CORRECTED DEPENDENCIES --- [dependencies] -tokio = { version = "1.0", features = ["full"] } +tokio = { version = "1.38.0", features = ["full"] } warp = { version = "0.4.2", features = ["server"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" @@ -12,6 +15,5 @@ sqlx = { version = "0.8.6", features = ["runtime-tokio-rustls", "mysql", "chrono chrono = { version = "0.4", features = ["serde"] } tracing = "0.1" tracing-subscriber = "0.3" -dotenv = "0.15" -cors = "0.1.0" +dotenvy = "0.15.7" # Using 'dotenvy' as 'dotenv' is unmaintained anyhow = "1.0" \ No newline at end of file diff --git a/rust-engine/src/main.rs b/rust-engine/src/main.rs index bd70a46..a72db16 100644 --- a/rust-engine/src/main.rs +++ b/rust-engine/src/main.rs @@ -23,7 +23,7 @@ async fn main() -> Result<(), Box> { tracing_subscriber::fmt::init(); // Load environment variables - dotenv::dotenv().ok(); + dotenvy::dotenv().ok(); let database_url = env::var("DATABASE_URL") .unwrap_or_else(|_| "mysql://astraadmin:password@mysql:3306/astra".to_string()); diff --git a/web-app/eslint.config.js b/web-app/eslint.config.js index af876ec..53a87c7 100644 --- a/web-app/eslint.config.js +++ b/web-app/eslint.config.js @@ -1,11 +1,13 @@ import js from "@eslint/js"; import globals from "globals"; +import reactHooks from "eslint-plugin-react-hooks"; // Or import { configs as reactHooks } from "eslint-plugin-react-hooks"; +import reactRefresh from "eslint-plugin-react-refresh"; import { defineConfig, globalIgnores } from "eslint/config"; export default defineConfig([ globalIgnores(["dist"]), { - files: ["**/*.{js,jsx}"], + files: ["**/*{js,jsx}"], extends: [ js.configs.recommended, reactHooks.configs["recommended-latest"], diff --git a/web-app/package-lock.json b/web-app/package-lock.json index a974ff6..0aabb64 100644 --- a/web-app/package-lock.json +++ b/web-app/package-lock.json @@ -27,11 +27,13 @@ "vite-jsconfig-paths": "^2.0.1" }, "devDependencies": { + "@eslint/js": "^9.38.0", "eslint": "^9.38.0", "eslint-plugin-import": "^2.32.0", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^7.0.0", "eslint-plugin-react-refresh": "^0.4.24", + "globals": "^16.4.0", "nodemon": "^3.1.10", "prettier": "^3.6.2", "tailwindcss": "^4.1.14", @@ -863,6 +865,19 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@eslint/js": { "version": "9.38.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.38.0.tgz", @@ -3867,9 +3882,9 @@ } }, "node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "version": "16.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.4.0.tgz", + "integrity": "sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==", "dev": true, "license": "MIT", "engines": { diff --git a/web-app/package.json b/web-app/package.json index 198e9c6..91388fc 100644 --- a/web-app/package.json +++ b/web-app/package.json @@ -32,11 +32,13 @@ }, "packageManager": ">=npm@10.9.0", "devDependencies": { + "@eslint/js": "^9.38.0", "eslint": "^9.38.0", "eslint-plugin-import": "^2.32.0", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^7.0.0", "eslint-plugin-react-refresh": "^0.4.24", + "globals": "^16.4.0", "nodemon": "^3.1.10", "prettier": "^3.6.2", "tailwindcss": "^4.1.14", diff --git a/web-app/src/app/index.jsx b/web-app/src/app/index.jsx index 1aee3d4..9d0b576 100644 --- a/web-app/src/app/index.jsx +++ b/web-app/src/app/index.jsx @@ -1,5 +1,5 @@ import React from "react"; -import ChatLayout from "../components/layouts/chat-layout.jsx"; +import ChatLayout from "src/components/layouts/chat-layout"; function App() { return ( diff --git a/web-app/src/components/ui/chat/chat-header.jsx b/web-app/src/components/ui/chat/chat-header.jsx index d4a3564..97f561b 100644 --- a/web-app/src/components/ui/chat/chat-header.jsx +++ b/web-app/src/components/ui/chat/chat-header.jsx @@ -1,5 +1,5 @@ import React from "react"; -import ActionButton from "../Button/ActionButton.jsx"; +import ActionButton from "src/components/ui/Button/ActionButton.jsx"; export default function ChatHeader({ title = "AI Assistant" }) { // Delete chat log (frontend + backend) @@ -18,7 +18,7 @@ export default function ChatHeader({ title = "AI Assistant" }) { setMessages([]); } }; - + return (
@@ -34,7 +34,6 @@ export default function ChatHeader({ title = "AI Assistant" }) {
-
); }