diff --git a/.github/workflows/build-project.yml b/.github/workflows/build-project.yml index 14e6ef28..369a1c1c 100644 --- a/.github/workflows/build-project.yml +++ b/.github/workflows/build-project.yml @@ -27,9 +27,6 @@ jobs: - name: Install dependencies run: cd flo_ai && uv sync - - name: Run Ruff - run: cd flo_ai && uv run pre-commit run --all-files - - name: Run build run: cd flo_ai && uv build diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 44cfaecd..3a6b5350 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,35 @@ repos: -- repo: https://github.com/astral-sh/ruff-pre-commit - # Ruff version. - rev: v0.7.3 - hooks: - # Run the linter. - - id: ruff - files: \.py$ - # Run the formatter. - - id: ruff-format - files: \.py$ - args: [--config, format.quote-style = 'single'] + - repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.7.3 + hooks: + # Run the linter. + - id: ruff + files: \.py$ + # Run the formatter. + - id: ruff-format + files: \.py$ + args: [--config, format.quote-style = 'single'] + + - repo: local + hooks: + - id: eslint + name: eslint + entry: bash -c 'cd wavefront/client && pnpm lint' + language: system + files: ^wavefront/client/.*\.(js|jsx|ts|tsx)$ + pass_filenames: false # let eslint use its own ignore & config + + - id: typescript-check + name: typescript-check + entry: bash -c 'cd wavefront/client && pnpm typecheck' + language: system + files: ^wavefront/client/.*\.(ts|tsx)$ + pass_filenames: false + + - id: prettier + name: prettier + entry: bash -c 'cd wavefront/client && pnpm format' + language: system + files: ^wavefront/client/ + pass_filenames: false diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..7a0e8c70 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,8 @@ +{ + "recommendations": [ + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "bradlc.vscode-tailwindcss", + "astral-sh.ty" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 9e26dfee..00000000 --- a/.vscode/launch.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/flo_ai/.vscode/settings.json b/flo_ai/.vscode/settings.json new file mode 100644 index 00000000..373e6cf3 --- /dev/null +++ b/flo_ai/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "python.defaultInterpreterPath": ".venv/bin/python", + "[python]": { + "editor.formatOnSave": true + } + } \ No newline at end of file diff --git a/install-dep-local.sh b/install-dep-local.sh new file mode 100755 index 00000000..b46b6cbf --- /dev/null +++ b/install-dep-local.sh @@ -0,0 +1,68 @@ +#!/bin/bash + +# Script to install dependencies for flo_ai, wavefront/server (using uv) and wavefront/client (using pnpm) + +set -e # Exit on error + +# Colors for output +GREEN='\033[0;32m' +BLUE='\033[0;34m' +YELLOW='\033[1;33m' +NC='\033[0m' # No Color + +echo -e "${BLUE}Installing dependencies for all projects...${NC}\n" + +# Get the script directory +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +cd "$SCRIPT_DIR" + +# 1. Install pre-commit using uv in the root and run pre-commit install +echo -e "${YELLOW}[1/4] Installing pre-commit using uv...${NC}" +if command -v uv &> /dev/null; then + uv pip install pre-commit --system + echo -e "${GREEN}✓ pre-commit installed successfully${NC}" + echo -e "${YELLOW}Running pre-commit install...${NC}" + uv run pre-commit install + echo -e "${GREEN}✓ pre-commit hooks installed successfully${NC}\n" +else + echo -e "${YELLOW}Warning: uv not found. Please install uv first.${NC}\n" + exit 1 +fi + +# 2. Install dependencies for flo_ai using uv +echo -e "${YELLOW}[2/4] Installing dependencies for flo_ai using uv...${NC}" +cd flo_ai +if command -v uv &> /dev/null; then + uv sync + echo -e "${GREEN}✓ flo_ai dependencies installed successfully${NC}\n" +else + echo -e "${YELLOW}Warning: uv not found. Please install uv first.${NC}\n" + exit 1 +fi +cd .. + +# 3. Install dependencies for wavefront/server using uv +echo -e "${YELLOW}[3/4] Installing dependencies for wavefront/server using uv...${NC}" +cd wavefront/server +if command -v uv &> /dev/null; then + uv sync --all-packages + echo -e "${GREEN}✓ wavefront/server dependencies installed successfully${NC}\n" +else + echo -e "${YELLOW}Warning: uv not found. Please install uv first.${NC}\n" + exit 1 +fi +cd ../.. + +# 4. Install dependencies for wavefront/client using pnpm +echo -e "${YELLOW}[4/4] Installing dependencies for wavefront/client using pnpm...${NC}" +cd wavefront/client +if command -v pnpm &> /dev/null; then + pnpm install + echo -e "${GREEN}✓ wavefront/client dependencies installed successfully${NC}\n" +else + echo -e "${YELLOW}Warning: pnpm not found. Please install pnpm first.${NC}\n" + exit 1 +fi +cd ../.. + +echo -e "${GREEN}All dependencies installed successfully!${NC}" diff --git a/wavefront.code-workspace b/wavefront.code-workspace new file mode 100644 index 00000000..1cce9a09 --- /dev/null +++ b/wavefront.code-workspace @@ -0,0 +1,7 @@ +{ + "folders": [ + { "path": "flo_ai" }, + { "path": "wavefront" } + ] + } + \ No newline at end of file diff --git a/wavefront/.vscode/settings.json b/wavefront/.vscode/settings.json new file mode 100644 index 00000000..4df88247 --- /dev/null +++ b/wavefront/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "python.defaultInterpreterPath": "server/.venv/bin/python", + "[python]": { + "editor.formatOnSave": true + }, +} \ No newline at end of file diff --git a/wavefront/client/.env b/wavefront/client/.env index d2894826..9f5f0aca 100644 --- a/wavefront/client/.env +++ b/wavefront/client/.env @@ -1,5 +1,5 @@ -VITE_BASE_URL=http://localhost:8002/floconsole -VITE_APP_ENV=production +VITE_BASE_URL=https://console.dev.rootflo.ai/floconsole +VITE_APP_ENV=local VITE_FEATURE_API_SERVICES=true # NOTE: Add the new variables to the /config endpoint in the server.cjs file(For docker) diff --git a/wavefront/client/.prettierignore b/wavefront/client/.prettierignore new file mode 100644 index 00000000..aad2012f --- /dev/null +++ b/wavefront/client/.prettierignore @@ -0,0 +1,12 @@ +**/.git +**/.vite +**/node_modules +**/dist +**/build +**/coverage +**/logs +**/tmp +**/cache +**/temp +**/test +**/tests diff --git a/wavefront/client/.prettierrc.json b/wavefront/client/.prettierrc.json new file mode 100644 index 00000000..045ae6b4 --- /dev/null +++ b/wavefront/client/.prettierrc.json @@ -0,0 +1,7 @@ +{ + "semi": true, + "singleQuote": true, + "printWidth": 120, + "trailingComma": "es5", + "plugins": ["prettier-plugin-tailwindcss"] +} diff --git a/wavefront/client/index.html b/wavefront/client/index.html index 7c7804d8..003b586f 100644 --- a/wavefront/client/index.html +++ b/wavefront/client/index.html @@ -1,18 +1,16 @@ +
+ + + + + +