From 5b82bf93907c5ae3e06f8f1c6b8817e6c9a210de Mon Sep 17 00:00:00 2001 From: Christbru Date: Sat, 18 Oct 2025 14:38:33 -0500 Subject: [PATCH 01/17] Updated deployment action to build all sections and deploy to the cloud server. --- .github/workflows/build-and-deploy.yml | 109 +++++++++++++++++-------- 1 file changed, 74 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index e9c1266..2f8d2cb 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -1,56 +1,95 @@ -# For information on GITHUB_TOKEN: https://docs.github.com/en/actions/concepts/security/github_token -# For information on github.actor: https://github.com/orgs/community/discussions/62108 +# .github/workflows/build-and-deploy.yml name: Build and Deploy +# This workflow runs only on pushes to the 'main' branch on: - pull_request: - branches: ["main"] push: branches: ["main"] -env: - CONTAINER_NAME: codered-astra - CONTAINER_TAG: ghcr.io/${{ github.repository_owner }}/codered-astra:latest - jobs: - # Set permissions for the job - build: + build-and-deploy: + # Set permissions for the job to read contents and write to GitHub Packages permissions: - contents: read - packages: write - attestations: write - id-token: write + contents: read + packages: write - name: Build Docker Image + name: Build Images and Deploy to Server runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v5 + - name: Checkout repository + uses: actions/checkout@v4 - - name: Login to Docker Hub + - name: Log in to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io - username: ${{ github.actor }} # User that commits + username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build and push - uses: docker/build-push-action@v6 - + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 with: - context: . - platforms: linux/amd64 - push: true - tags: ${{ env.CONTAINER_TAG }} + images: | + ghcr.io/${{ github.repository }}/frontend + ghcr.io/${{ github.repository }}/nodejs-backend + ghcr.io/${{ github.repository }}/rust-engine -# WIP: For deployment - deploy: - name: Deploy Docker Image to Server - runs-on: self-hosted - needs: build - steps: + # --- Build and push one image for each service --- + - name: Build and push frontend image šŸš€ + uses: docker/build-push-action@v6 + with: + context: ./frontend + push: true + tags: ${{ steps.meta.outputs.tags_frontend }} + labels: ${{ steps.meta.outputs.labels_frontend }} + cache-from: type=gha + cache-to: type=gha,mode=max + + - name: Build and push Node.js backend image šŸš€ + uses: docker/build-push-action@v6 + with: + context: ./nodejs-backend + push: true + tags: ${{ steps.meta.outputs.tags_nodejs-backend }} + labels: ${{ steps.meta.outputs.labels_nodejs-backend }} + cache-from: type=gha + cache-to: type=gha,mode=max + + - name: Build and push Rust engine image šŸš€ + uses: docker/build-push-action@v6 + with: + context: ./rust-engine + push: true + tags: ${{ steps.meta.outputs.tags_rust-engine }} + labels: ${{ steps.meta.outputs.labels_rust-engine }} + cache-from: type=gha + cache-to: type=gha,mode=max + + # --- Deploy the new images to your server --- + - name: Deploy to server via SSH ā˜ļø + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ secrets.SERVER_HOST }} + username: ${{ secrets.SERVER_USERNAME }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + script: | + # Navigate to your project directory on the server + cd /var/www/codered-astra + + # Export secrets as environment variables for Docker Compose + export GEMINI_API_KEY='${{ secrets.GEMINI_API_KEY }}' + export MYSQL_DATABASE='${{ secrets.MYSQL_DATABASE }}' + export MYSQL_USER='${{ secrets.MYSQL_USER }}' + export MYSQL_PASSWORD='${{ secrets.MYSQL_PASSWORD }}' + + # Set the image tag to the specific commit SHA for a precise deployment + export IMAGE_TAG=${{ github.sha }} + + # Pull the new images you just pushed to the registry + docker-compose pull + + # Stop the old containers and start new ones with the updated images + docker-compose up -d --force-recreate \ No newline at end of file From a69c697b2483e1f088271fdd49b2056ea43bfb17 Mon Sep 17 00:00:00 2001 From: Christbru Date: Sat, 18 Oct 2025 14:43:31 -0500 Subject: [PATCH 02/17] Added environment example boilerplate. --- .env.example | 14 ++++++++++++++ .github/workflows/build-and-deploy.yml | 1 + 2 files changed, 15 insertions(+) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..7015a31 --- /dev/null +++ b/.env.example @@ -0,0 +1,14 @@ +# .env.example + +# --- PLEASE FILL THIS OUT WITH THE SECURELY PROVIDED CREDENTIALS --- + +# Application Database Credentials +MYSQL_DATABASE=astra +MYSQL_USER=astraadmin +MYSQL_PASSWORD= + +# MySQL Container Root Password (for first-time setup only, not used by the app) +MYSQL_ROOT_PASSWORD= + +# API Keys +GEMINI_API_KEY= \ No newline at end of file diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 2f8d2cb..c466eae 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -84,6 +84,7 @@ jobs: export MYSQL_DATABASE='${{ secrets.MYSQL_DATABASE }}' export MYSQL_USER='${{ secrets.MYSQL_USER }}' export MYSQL_PASSWORD='${{ secrets.MYSQL_PASSWORD }}' + export MYSQL_ROOT_PASSWORD='${{ secrets.MYSQL_ROOT_PASSWORD }}' # Set the image tag to the specific commit SHA for a precise deployment export IMAGE_TAG=${{ github.sha }} From 3a761e3eb1c5ca137f4e96cfc5af0beb1d95149a Mon Sep 17 00:00:00 2001 From: Christbru Date: Sat, 18 Oct 2025 15:12:42 -0500 Subject: [PATCH 03/17] Preparing file structure for multi service build and host. --- Dockerfile | 15 ------ docker-compose.yml | 53 +++++++++++++++++++ rust-engine/Cargo.toml | 0 rust-engine/Dockerfile | 12 +++++ web-app/Dockerfile | 22 ++++++++ eslint.config.js => web-app/eslint.config.js | 0 index.html => web-app/index.html | 0 jsconfig.json => web-app/jsconfig.json | 4 +- .../package-lock.json | 0 package.json => web-app/package.json | 0 {public => web-app/public}/vite.svg | 0 {src => web-app/src}/App.jsx | 0 {src => web-app/src}/index.css | 0 {src => web-app/src}/main.jsx | 0 .../tailwind.config.js | 0 vite.config.js => web-app/vite.config.js | 0 16 files changed, 89 insertions(+), 17 deletions(-) delete mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100644 rust-engine/Cargo.toml create mode 100644 rust-engine/Dockerfile create mode 100644 web-app/Dockerfile rename eslint.config.js => web-app/eslint.config.js (100%) rename index.html => web-app/index.html (100%) rename jsconfig.json => web-app/jsconfig.json (52%) rename package-lock.json => web-app/package-lock.json (100%) rename package.json => web-app/package.json (100%) rename {public => web-app/public}/vite.svg (100%) rename {src => web-app/src}/App.jsx (100%) rename {src => web-app/src}/index.css (100%) rename {src => web-app/src}/main.jsx (100%) rename tailwind.config.js => web-app/tailwind.config.js (100%) rename vite.config.js => web-app/vite.config.js (100%) diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index a39f697..0000000 --- a/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM node:23-alpine - -COPY . /codered-astra - -WORKDIR /codered-astra - -RUN npm i - -EXPOSE 3000 - -RUN npm run format - -RUN npm run build - -CMD ["npm", "run", "host"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f61275f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,53 @@ +# docker-compose.yml +version: '3.8' + +services: + web-app: + build: + context: ./web-app + restart: always + ports: + - "80:3000" + environment: + # The connection string remains the same, but points to the 'mysql' service + - DATABASE_URL=mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@mysql:3306/${MYSQL_DATABASE} + - RUST_ENGINE_URL=http://rust-engine:8000 + - GEMINI_API_KEY=${GEMINI_API_KEY} + depends_on: + - mysql # <-- Updated dependency + - rust-engine + + rust-engine: + build: + context: ./rust-engine + restart: always + environment: + - DATABASE_URL=mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@mysql:3306/${MYSQL_DATABASE} + depends_on: + - mysql # <-- Updated dependency + + # --- Key Changes are in this section --- + mysql: # <-- Renamed service for clarity + image: mysql:8.0 # <-- CHANGED: Using the official MySQL 8.0 image + restart: always + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} + - MYSQL_DATABASE=${MYSQL_DATABASE} + - MYSQL_USER=${MYSQL_USER} + - MYSQL_PASSWORD=${MYSQL_PASSWORD} + volumes: + - mysql-data:/var/lib/mysql + + phpmyadmin: + image: phpmyadmin/phpmyadmin + restart: always + ports: + # CHANGED: Binds port 8080 to localhost ONLY. + - "127.0.0.1:8080:80" + environment: + - PMA_HOST=mysql + depends_on: + - mysql + +volumes: + mysql-data: # Renamed volume for clarity (optional but good practice) \ No newline at end of file diff --git a/rust-engine/Cargo.toml b/rust-engine/Cargo.toml new file mode 100644 index 0000000..e69de29 diff --git a/rust-engine/Dockerfile b/rust-engine/Dockerfile new file mode 100644 index 0000000..3c81632 --- /dev/null +++ b/rust-engine/Dockerfile @@ -0,0 +1,12 @@ +# rust-engine/Dockerfile +# --- Stage 1: Builder --- +FROM rust:1.7-slim as builder +WORKDIR /usr/src/app +COPY . . +RUN cargo build --release + +# --- Stage 2: Final Image --- +FROM debian:buster-slim +COPY --from=builder /usr/src/app/target/release/rust-engine /usr/local/bin/rust-engine +EXPOSE 8000 +CMD ["rust-engine"] \ No newline at end of file diff --git a/web-app/Dockerfile b/web-app/Dockerfile new file mode 100644 index 0000000..0788896 --- /dev/null +++ b/web-app/Dockerfile @@ -0,0 +1,22 @@ +# web-app/Dockerfile +FROM node:20-alpine + +WORKDIR /app + +# Copy package files first to leverage Docker's build cache +COPY package*.json ./ + +# Install all dependencies needed for the build +RUN npm install + +# Copy the rest of your application code +COPY . . + +# Run the build script to compile the React frontend +RUN npm run build + +# Expose the port your server will listen on +EXPOSE 3000 + +# The command to start your production server +CMD ["npm", "run", "host"] \ No newline at end of file diff --git a/eslint.config.js b/web-app/eslint.config.js similarity index 100% rename from eslint.config.js rename to web-app/eslint.config.js diff --git a/index.html b/web-app/index.html similarity index 100% rename from index.html rename to web-app/index.html diff --git a/jsconfig.json b/web-app/jsconfig.json similarity index 52% rename from jsconfig.json rename to web-app/jsconfig.json index ef46175..8fd87b4 100644 --- a/jsconfig.json +++ b/web-app/jsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { - "baseUrl": "src" + "baseUrl": "web-app/src" }, "include": [ - "src" + "web-app/src" ] } diff --git a/package-lock.json b/web-app/package-lock.json similarity index 100% rename from package-lock.json rename to web-app/package-lock.json diff --git a/package.json b/web-app/package.json similarity index 100% rename from package.json rename to web-app/package.json diff --git a/public/vite.svg b/web-app/public/vite.svg similarity index 100% rename from public/vite.svg rename to web-app/public/vite.svg diff --git a/src/App.jsx b/web-app/src/App.jsx similarity index 100% rename from src/App.jsx rename to web-app/src/App.jsx diff --git a/src/index.css b/web-app/src/index.css similarity index 100% rename from src/index.css rename to web-app/src/index.css diff --git a/src/main.jsx b/web-app/src/main.jsx similarity index 100% rename from src/main.jsx rename to web-app/src/main.jsx diff --git a/tailwind.config.js b/web-app/tailwind.config.js similarity index 100% rename from tailwind.config.js rename to web-app/tailwind.config.js diff --git a/vite.config.js b/web-app/vite.config.js similarity index 100% rename from vite.config.js rename to web-app/vite.config.js From bd2ffee9aecfbcc47c53910a765604847235c51a Mon Sep 17 00:00:00 2001 From: Christbru Date: Sat, 18 Oct 2025 15:26:44 -0500 Subject: [PATCH 04/17] Prep build setup for stack --- .dockerignore | 39 ++++++++++ DEVELOPMENT.md | 117 +++++++++++++++++++++++++++++ README.md | 77 ++++++++++++++++--- rust-engine/Cargo.lock | 6 ++ rust-engine/Cargo.toml | 17 +++++ rust-engine/Dockerfile | 24 +++++- rust-engine/src/main.rs | 132 ++++++++++++++++++++++++++++++++ setup-check.ps1 | 62 +++++++++++++++ web-app/Dockerfile | 12 +-- web-app/package.json | 51 ++++++------- web-app/postcss.config.js | 6 ++ web-app/src/App.jsx | 154 +++++++++++++++++++++++++++++++------- web-app/src/index.css | 44 ++++++----- web-app/vite.config.js | 18 +++++ 14 files changed, 668 insertions(+), 91 deletions(-) create mode 100644 .dockerignore create mode 100644 DEVELOPMENT.md create mode 100644 rust-engine/Cargo.lock create mode 100644 rust-engine/src/main.rs create mode 100644 setup-check.ps1 create mode 100644 web-app/postcss.config.js diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..ff515b3 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,39 @@ +# Node modules +node_modules +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Build outputs +dist +build +target + +# Environment files +.env +.env.local +.env.development.local +.env.test.local +.env.production.local + +# IDE +.vscode +.idea +*.swp +*.swo + +# OS +.DS_Store +Thumbs.db + +# Git +.git +.gitignore + +# Documentation +README.md +DEVELOPMENT.md +*.md + +# Scripts +setup-check.ps1 \ No newline at end of file diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md new file mode 100644 index 0000000..f0d2201 --- /dev/null +++ b/DEVELOPMENT.md @@ -0,0 +1,117 @@ +# CodeRED-Astra Development Guide + +## Project Structure + +This is a hackathon-ready project with a clean separation between frontend and backend: + +- **React Frontend** (`web-app/`): Modern React app with Vite and Tailwind CSS +- **Rust Engine** (`rust-engine/`): High-performance backend API server +- **Database**: MySQL 8.0 with phpMyAdmin for management + +## Quick Start + +### Prerequisites +- Docker & Docker Compose +- Node.js 20+ (for local development) +- Rust 1.82+ (for local development) + +### Development Setup + +1. **Clone and setup environment**: +```bash +cp .env.example .env +# Edit .env with your database passwords and API keys +``` + +2. **Start the entire stack**: +```bash +docker-compose up --build +``` + +3. **Access the application**: +- Frontend: http://localhost (port 80) +- Rust API: http://localhost:8000 +- phpMyAdmin: http://127.0.0.1:8080 + +### Local Development (Recommended for Hackathon) + +**Frontend Development**: +```bash +cd web-app +npm install +npm run dev # Starts on http://localhost:5173 +``` + +**Backend Development**: +```bash +cd rust-engine +cargo run # Starts on http://localhost:8000 +``` + +## Team Workflow + +### Frontend Team (React) +- Work in `web-app/src/` +- Main entry: `src/App.jsx` +- Add new components in `src/components/` +- API calls go through `/api/*` (auto-proxied to Rust engine) +- Use Tailwind CSS for styling +- Hot reload enabled with Vite + +### Backend Team (Rust) +- Work in `rust-engine/src/` +- Main server: `src/main.rs` +- Add new modules in `src/` +- API endpoints start with `/api/` +- Database connection via SQLx +- CORS enabled for frontend communication + +## API Communication + +The frontend communicates with the Rust engine via: +```javascript +// This automatically proxies to http://rust-engine:8000 in Docker +// or http://localhost:8000 in local development +fetch('/api/health') + .then(response => response.json()) + .then(data => console.log(data)); +``` + +## Database Schema + +Edit `rust-engine/src/main.rs` to add database migrations and models as needed. + +## Environment Variables + +Required in `.env`: +``` +MYSQL_DATABASE=astra +MYSQL_USER=astraadmin +MYSQL_PASSWORD=your_secure_password +MYSQL_ROOT_PASSWORD=your_root_password +GEMINI_API_KEY=your_gemini_key +``` + +## Deployment + +The project is containerized and ready for deployment: +- Frontend: Static files served via Vite preview +- Backend: Optimized Rust binary +- Database: Persistent MySQL data volume + +## Hackathon Tips + +1. **Frontend team**: Start with the existing App.jsx and build your UI components +2. **Backend team**: Add new API endpoints in the Rust main.rs file +3. **Database**: Use phpMyAdmin at http://127.0.0.1:8080 to manage data +4. **Testing**: The app shows connection status between frontend and backend +5. **Hot reload**: Both frontend and backend support hot reload during development + +## Common Issues + +- **CORS errors**: Already configured, but check Rust engine CORS settings if needed +- **Database connection**: Engine gracefully handles DB offline state for initial development +- **Port conflicts**: Web runs on 80, API on 8000, phpMyAdmin on 8080 +- **Build failures**: Check Node.js and Rust versions match requirements + +Happy hacking! šŸš€ \ No newline at end of file diff --git a/README.md b/README.md index 18bc70e..b0b6190 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,75 @@ -# React + Vite +# CodeRED-Astra šŸš€ -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. +A hackathon-ready project with React frontend and Rust backend engine. -Currently, two official plugins are available: +## Quick Start -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh +```bash +# 1. Setup environment +cp .env.example .env +# Edit .env with your credentials -## React Compiler +# 2. Start everything with Docker +docker-compose up --build -The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). +# 3. Access your app +# Frontend: http://localhost +# API: http://localhost:8000 +# Database Admin: http://127.0.0.1:8080 +``` -## Expanding the ESLint configuration +## Development -If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project. +**Frontend (React + Vite)**: +```bash +cd web-app +npm install +npm run dev # http://localhost:5173 +``` + +**Backend (Rust)**: +```bash +cd rust-engine +cargo run # http://localhost:8000 +``` + +## Architecture + +- **Frontend**: React 18 + Vite + Tailwind CSS +- **Backend**: Rust + Warp + SQLx +- **Database**: MySQL 8.0 + phpMyAdmin +- **API**: RESTful endpoints with CORS enabled +- **Docker**: Full containerization for easy deployment + +## Project Structure + +``` +ā”œā”€ā”€ web-app/ # React frontend +│ ā”œā”€ā”€ src/ +│ │ ā”œā”€ā”€ App.jsx # Main component +│ │ └── main.jsx # Entry point +│ └── Dockerfile +ā”œā”€ā”€ rust-engine/ # Rust backend +│ ā”œā”€ā”€ src/ +│ │ └── main.rs # API server +│ └── Dockerfile +ā”œā”€ā”€ docker-compose.yml # Full stack orchestration +└── .env.example # Environment template +``` + +## Team Workflow + +- **Frontend devs**: Work in `web-app/src/`, use `/api/*` for backend calls +- **Backend devs**: Work in `rust-engine/src/`, add endpoints to main.rs +- **Database**: Access phpMyAdmin at http://127.0.0.1:8080 + +## Features + +āœ… Hot reload for both frontend and backend +āœ… Automatic API proxying from React to Rust +āœ… Database connection with graceful fallback +āœ… CORS configured for cross-origin requests +āœ… Production-ready Docker containers +āœ… Health monitoring and status dashboard + +Ready for your hackathon! See `DEVELOPMENT.md` for detailed setup instructions. diff --git a/rust-engine/Cargo.lock b/rust-engine/Cargo.lock new file mode 100644 index 0000000..1762e5a --- /dev/null +++ b/rust-engine/Cargo.lock @@ -0,0 +1,6 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +# This file will be generated when you first run cargo build +# Leaving it as a placeholder for Docker caching \ No newline at end of file diff --git a/rust-engine/Cargo.toml b/rust-engine/Cargo.toml index e69de29..cb5d0fc 100644 --- a/rust-engine/Cargo.toml +++ b/rust-engine/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "rust-engine" +version = "0.1.0" +edition = "2021" + +[dependencies] +tokio = { version = "1.0", features = ["full"] } +warp = "0.3" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +sqlx = { version = "0.7", features = ["runtime-tokio-rustls", "mysql", "chrono"] } +chrono = { version = "0.4", features = ["serde"] } +tracing = "0.1" +tracing-subscriber = "0.3" +dotenv = "0.15" +cors = "0.6" +anyhow = "1.0" \ No newline at end of file diff --git a/rust-engine/Dockerfile b/rust-engine/Dockerfile index 3c81632..509c5ce 100644 --- a/rust-engine/Dockerfile +++ b/rust-engine/Dockerfile @@ -1,12 +1,30 @@ # rust-engine/Dockerfile # --- Stage 1: Builder --- -FROM rust:1.7-slim as builder +FROM rust:1.82-slim AS builder WORKDIR /usr/src/app -COPY . . + +# Install build dependencies +RUN apt-get update && apt-get install -y \ + pkg-config \ + libssl-dev \ + && rm -rf /var/lib/apt/lists/* + +# Copy Cargo files for dependency caching +COPY Cargo.toml Cargo.lock ./ +# Create a dummy src/main.rs for dependency build +RUN mkdir src && echo "fn main() {}" > src/main.rs +RUN cargo build --release && rm src/main.rs + +# Copy source code and build +COPY src ./src RUN cargo build --release # --- Stage 2: Final Image --- -FROM debian:buster-slim +FROM debian:bookworm-slim +RUN apt-get update && apt-get install -y \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* + COPY --from=builder /usr/src/app/target/release/rust-engine /usr/local/bin/rust-engine EXPOSE 8000 CMD ["rust-engine"] \ No newline at end of file diff --git a/rust-engine/src/main.rs b/rust-engine/src/main.rs new file mode 100644 index 0000000..672007c --- /dev/null +++ b/rust-engine/src/main.rs @@ -0,0 +1,132 @@ +use std::env; +use warp::Filter; +use sqlx::mysql::MySqlPool; +use serde::{Deserialize, Serialize}; +use tracing::{info, warn}; + +#[derive(Debug, Serialize, Deserialize)] +struct HealthResponse { + status: String, + timestamp: String, +} + +#[derive(Debug, Serialize, Deserialize)] +struct ApiResponse { + success: bool, + data: Option, + message: Option, +} + +#[tokio::main] +async fn main() -> Result<(), Box> { + // Initialize tracing + tracing_subscriber::init(); + + // Load environment variables + dotenv::dotenv().ok(); + + let database_url = env::var("DATABASE_URL") + .unwrap_or_else(|_| "mysql://astraadmin:password@mysql:3306/astra".to_string()); + + info!("Starting Rust Engine..."); + info!("Connecting to database: {}", database_url); + + // Connect to database + let pool = match MySqlPool::connect(&database_url).await { + Ok(pool) => { + info!("Successfully connected to database"); + pool + } + Err(e) => { + warn!("Failed to connect to database: {}. Starting without DB connection.", e); + // In a hackathon setting, we might want to continue without DB for initial testing + return start_server_without_db().await; + } + }; + + // CORS configuration + let cors = warp::cors() + .allow_any_origin() + .allow_headers(vec!["content-type", "authorization"]) + .allow_methods(vec!["GET", "POST", "PUT", "DELETE", "OPTIONS"]); + + // Health check endpoint + let health = warp::path("health") + .and(warp::get()) + .map(|| { + let response = HealthResponse { + status: "healthy".to_string(), + timestamp: chrono::Utc::now().to_rfc3339(), + }; + warp::reply::json(&ApiResponse { + success: true, + data: Some(response), + message: None, + }) + }); + + // API routes - you'll expand these for your hackathon needs + let api = warp::path("api") + .and( + health.or( + // Add more routes here as needed + warp::path("version") + .and(warp::get()) + .map(|| { + warp::reply::json(&ApiResponse { + success: true, + data: Some("1.0.0"), + message: Some("Rust Engine API".to_string()), + }) + }) + ) + ); + + let routes = api + .with(cors) + .with(warp::log("rust_engine")); + + info!("Rust Engine started on http://0.0.0.0:8000"); + + warp::serve(routes) + .run(([0, 0, 0, 0], 8000)) + .await; + + Ok(()) +} + +async fn start_server_without_db() -> Result<(), Box> { + info!("Starting server in DB-less mode for development"); + + let cors = warp::cors() + .allow_any_origin() + .allow_headers(vec!["content-type", "authorization"]) + .allow_methods(vec!["GET", "POST", "PUT", "DELETE", "OPTIONS"]); + + let health = warp::path("health") + .and(warp::get()) + .map(|| { + let response = HealthResponse { + status: "healthy (no db)".to_string(), + timestamp: chrono::Utc::now().to_rfc3339(), + }; + warp::reply::json(&ApiResponse { + success: true, + data: Some(response), + message: Some("Running without database connection".to_string()), + }) + }); + + let routes = warp::path("api") + .and(health) + .with(cors) + .with(warp::log("rust_engine")); + + info!("Rust Engine started on http://0.0.0.0:8000 (DB-less mode)"); + + warp::serve(routes) + .run(([0, 0, 0, 0], 8000)) + .await; + + Ok(()) +} \ No newline at end of file diff --git a/setup-check.ps1 b/setup-check.ps1 new file mode 100644 index 0000000..a4ca199 --- /dev/null +++ b/setup-check.ps1 @@ -0,0 +1,62 @@ +#!/usr/bin/env pwsh + +Write-Host "šŸš€ CodeRED-Astra Setup Verification" -ForegroundColor Green +Write-Host "=================================" -ForegroundColor Green + +# Check if Docker is available +Write-Host "`nšŸ“¦ Checking Docker..." -ForegroundColor Yellow +try { + $dockerVersion = docker --version + Write-Host "āœ… Docker found: $dockerVersion" -ForegroundColor Green +} catch { + Write-Host "āŒ Docker not found. Please install Docker Desktop." -ForegroundColor Red + exit 1 +} + +# Check if .env exists +Write-Host "`nšŸ”§ Checking environment setup..." -ForegroundColor Yellow +if (Test-Path ".env") { + Write-Host "āœ… .env file exists" -ForegroundColor Green +} else { + Write-Host "āš ļø .env file not found. Creating from template..." -ForegroundColor Yellow + Copy-Item ".env.example" ".env" + Write-Host "āœ… Created .env file. Please edit it with your credentials!" -ForegroundColor Green +} + +# Check Node.js (for local development) +Write-Host "`nšŸ“± Checking Node.js..." -ForegroundColor Yellow +try { + $nodeVersion = node --version + Write-Host "āœ… Node.js found: $nodeVersion" -ForegroundColor Green +} catch { + Write-Host "āš ļø Node.js not found (needed for local frontend development)" -ForegroundColor Yellow +} + +# Check Rust (for local development) +Write-Host "`nšŸ¦€ Checking Rust..." -ForegroundColor Yellow +try { + $rustVersion = rustc --version + Write-Host "āœ… Rust found: $rustVersion" -ForegroundColor Green +} catch { + Write-Host "āš ļø Rust not found (needed for local backend development)" -ForegroundColor Yellow +} + +Write-Host "`nšŸŽÆ Setup Summary:" -ForegroundColor Cyan +Write-Host "=================" -ForegroundColor Cyan +Write-Host "• Frontend: React + Vite + Tailwind CSS" -ForegroundColor White +Write-Host "• Backend: Rust + Warp + SQLx + MySQL" -ForegroundColor White +Write-Host "• Docker: Full stack containerization" -ForegroundColor White + +Write-Host "`nšŸš€ Quick Start Commands:" -ForegroundColor Magenta +Write-Host "========================" -ForegroundColor Magenta +Write-Host "1. Start full stack: docker-compose up --build" -ForegroundColor White +Write-Host "2. Frontend dev: cd web-app && npm install && npm run dev" -ForegroundColor White +Write-Host "3. Backend dev: cd rust-engine && cargo run" -ForegroundColor White + +Write-Host "`nšŸ“ Access URLs:" -ForegroundColor Cyan +Write-Host "===============" -ForegroundColor Cyan +Write-Host "• Web App: http://localhost (Docker) or http://localhost:5173 (local)" -ForegroundColor White +Write-Host "• Rust API: http://localhost:8000" -ForegroundColor White +Write-Host "• phpMyAdmin: http://127.0.0.1:8080" -ForegroundColor White + +Write-Host "`n✨ Your hackathon project is ready! Happy coding! ✨" -ForegroundColor Green \ No newline at end of file diff --git a/web-app/Dockerfile b/web-app/Dockerfile index 0788896..4d1e34d 100644 --- a/web-app/Dockerfile +++ b/web-app/Dockerfile @@ -6,17 +6,17 @@ WORKDIR /app # Copy package files first to leverage Docker's build cache COPY package*.json ./ -# Install all dependencies needed for the build -RUN npm install +# Install dependencies +RUN npm ci --only=production=false # Copy the rest of your application code COPY . . -# Run the build script to compile the React frontend +# Build the React application RUN npm run build -# Expose the port your server will listen on +# Expose the port EXPOSE 3000 -# The command to start your production server -CMD ["npm", "run", "host"] \ No newline at end of file +# Use preview mode for production-like serving +CMD ["npm", "run", "preview"] \ No newline at end of file diff --git a/web-app/package.json b/web-app/package.json index 1a7815b..d275cee 100644 --- a/web-app/package.json +++ b/web-app/package.json @@ -1,40 +1,37 @@ { "name": "codered-astra", "private": true, + "type": "module", "scripts": { - "build": "vite build", "dev": "vite", - "host": "vite host", - "format": "prettier --write \"**/*.{ts,tsx,md}\"", - "clean-dist": "find apps/ -type d -name 'dist' -print0 | xargs -r0 -- rm -r", - "clean-all": "find apps/ -type d -name 'dist' -print0 | xargs -r0 -- rm -r && find . -path ./node_modules -prune -o -name 'node_modules' | xargs rm -rf " + "build": "vite build", + "preview": "vite preview", + "host": "vite --host 0.0.0.0 --port 3000", + "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", + "format": "prettier --write \"**/*.{js,jsx,md}\"" }, "license": "ISC", "dependencies": { - "@google/genai": "^1.25.0", - "@vitejs/plugin-react": "^5.0.4", - "cors": "^2.8.5", - "dotenv": "^17.2.3", - "express": "^5.1.0", - "helmet": "^8.1.0", + "@google/generative-ai": "^0.21.0", + "axios": "^1.7.7", "lucide-react": "^0.546.0", - "pg": "^8.16.3", - "react": "^19.2.0", - "react-dom": "^19.2.0", - "react-router": "^7.9.4", - "react-router-dom": "^7.9.4", - "tailwindcss": "^4.1.14", - "vite-jsconfig-paths": "^2.0.1" + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-router-dom": "^6.28.0" }, - "packageManager": ">=npm@10.9.0", "devDependencies": { - "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", - "nodemon": "^3.1.10", - "prettier": "^3.6.2", - "vite": "^7.1.10" + "@types/react": "^18.3.12", + "@types/react-dom": "^18.3.1", + "@vitejs/plugin-react": "^4.3.3", + "autoprefixer": "^10.4.20", + "eslint": "^9.14.0", + "eslint-plugin-react": "^7.37.2", + "eslint-plugin-react-hooks": "^5.0.0", + "eslint-plugin-react-refresh": "^0.4.14", + "postcss": "^8.4.47", + "prettier": "^3.3.3", + "tailwindcss": "^3.4.14", + "vite": "^5.4.10", + "vite-jsconfig-paths": "^2.0.1" } } diff --git a/web-app/postcss.config.js b/web-app/postcss.config.js new file mode 100644 index 0000000..e99ebc2 --- /dev/null +++ b/web-app/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} \ No newline at end of file diff --git a/web-app/src/App.jsx b/web-app/src/App.jsx index 2682776..7f203e5 100644 --- a/web-app/src/App.jsx +++ b/web-app/src/App.jsx @@ -1,34 +1,136 @@ -import { useState } from "react"; -import reactLogo from "./assets/react.svg"; -import viteLogo from "/vite.svg"; -import "./App.css"; +import { useState, useEffect } from "react"; +import { Cpu, Database, Zap, Activity } from "lucide-react"; function App() { - const [count, setCount] = useState(0); + const [engineStatus, setEngineStatus] = useState(null); + const [loading, setLoading] = useState(true); + + useEffect(() => { + checkEngineHealth(); + }, []); + + const checkEngineHealth = async () => { + try { + const response = await fetch('/api/health'); + const data = await response.json(); + setEngineStatus(data); + } catch (error) { + console.error('Engine health check failed:', error); + setEngineStatus({ success: false, message: 'Engine offline' }); + } finally { + setLoading(false); + } + }; return ( - <> -
- - Vite logo - - - React logo - +
+
+ {/* Header */} +
+
+ +

+ CodeRED-Astra +

+
+

+ Hackathon Project - React Frontend + Rust Engine +

+
+ + {/* Status Cards */} +
+ {/* React App Status */} +
+
+ +

React Frontend

+
+
āœ“ Online
+

+ Vite + React development environment ready +

+
+ + {/* Rust Engine Status */} +
+
+ +

Rust Engine

+
+
+ {loading ? 'ā³ Checking...' : engineStatus?.success ? 'āœ“ Online' : 'āœ— Offline'} +
+

+ {loading ? 'Connecting to engine...' : + engineStatus?.success ? 'Engine responding normally' : + 'Engine may still be starting up'} +

+
+
+ + {/* Engine Details */} + {engineStatus?.success && ( +
+
+ +

Engine Status

+
+
+
+ Status: + {engineStatus.data?.status} +
+
+ Last Check: + + {engineStatus.data?.timestamp ? new Date(engineStatus.data.timestamp).toLocaleTimeString() : 'N/A'} + +
+
+ {engineStatus.message && ( +
+ {engineStatus.message} +
+ )} +
+ )} + + {/* Quick Actions */} +
+

Quick Actions

+
+ + + +
+
+ + {/* Development Notes */} +
+

šŸš€ Ready for hackathon development!

+

+ Frontend team: Work in web-app/src/ | + Backend team: Work in rust-engine/src/ +

+
-

Vite + React

-
- -

- Edit src/App.jsx and save to test HMR -

-
-

- Click on the Vite and React logos to learn more -

- +
); } diff --git a/web-app/src/index.css b/web-app/src/index.css index 9330886..ec9640b 100644 --- a/web-app/src/index.css +++ b/web-app/src/index.css @@ -2,28 +2,32 @@ @tailwind components; @tailwind utilities; -.light { - --paragraph: 16, 17, 20; - --background: 229, 230, 240; - --primary: 41, 49, 97; - --secondary: 122, 137, 220; - --accent: 32, 55, 203; - background: rgba(var(--background)); -} -.dark { - --paragraph: 235, 236, 239; - --background: 15, 16, 26; - --primary: 158, 166, 214; - --secondary: 35, 50, 133; - --accent: 52, 75, 223; - background: rgba(var(--background)); +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + color-scheme: dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } body { margin: 0; - font-family: - -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", - "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +#root { + width: 100%; + margin: 0; +} + +code { + font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace; } diff --git a/web-app/vite.config.js b/web-app/vite.config.js index eebfd72..226be7d 100644 --- a/web-app/vite.config.js +++ b/web-app/vite.config.js @@ -5,4 +5,22 @@ import jsconfigPaths from "vite-jsconfig-paths"; // https://vite.dev/config/ export default defineConfig({ plugins: [react(), jsconfigPaths()], + server: { + host: '0.0.0.0', + port: 3000, + proxy: { + '/api': { + target: process.env.RUST_ENGINE_URL || 'http://localhost:8000', + changeOrigin: true, + rewrite: (path) => path.replace(/^\/api/, '') + } + } + }, + preview: { + host: '0.0.0.0', + port: 3000 + }, + build: { + outDir: 'dist' + } }); From 49b676ad310fe7b30e3f96fd41c2e7b55592c35b Mon Sep 17 00:00:00 2001 From: Christbru Date: Sat, 18 Oct 2025 15:41:39 -0500 Subject: [PATCH 05/17] Patched rust setup to be capable of building --- .gitignore | 3 + rust-engine/Cargo.lock | 2390 ++++++++++++++++++++++++++++++++++++++- rust-engine/Cargo.toml | 6 +- rust-engine/src/main.rs | 2 +- 4 files changed, 2394 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 365cebb..70866f6 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,9 @@ dist turbo-build.log turbo-host.log +# rust +rust-engine/target + # debug npm-debug.log* yarn-debug.log* diff --git a/rust-engine/Cargo.lock b/rust-engine/Cargo.lock index 1762e5a..82db808 100644 --- a/rust-engine/Cargo.lock +++ b/rust-engine/Cargo.lock @@ -1,6 +1,2390 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 -# This file will be generated when you first run cargo build -# Leaving it as a placeholder for Docker caching \ No newline at end of file +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" + +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" + +[[package]] +name = "bitflags" +version = "2.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" +dependencies = [ + "serde", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" + +[[package]] +name = "cc" +version = "1.2.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac9fe6cdbb24b6ade63616c0a0688e45bb56732262c158df3c0c4bea4ca47cb7" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "chrono" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "core-foundation-sys" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "crossbeam-queue" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +dependencies = [ + "serde", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "etcetera" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" +dependencies = [ + "cfg-if", + "home", + "windows-sys 0.48.0", +] + +[[package]] +name = "event-listener" +version = "5.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" + +[[package]] +name = "flume" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" +dependencies = [ + "futures-core", + "futures-sink", + "spin", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-intrusive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" +dependencies = [ + "futures-core", + "lock_api", + "parking_lot", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "h2" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" + +[[package]] +name = "hashlink" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" +dependencies = [ + "hashbrown 0.15.5", +] + +[[package]] +name = "headers" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3314d5adb5d94bcdf56771f2e50dbbc80bb4bdf88967526706205ac9eff24eb" +dependencies = [ + "base64", + "bytes", + "headers-core", + "http", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" +dependencies = [ + "http", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", +] + +[[package]] +name = "hyper-util" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "hyper", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" + +[[package]] +name = "icu_properties" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "potential_utf", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" + +[[package]] +name = "icu_provider" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +dependencies = [ + "displaydoc", + "icu_locale_core", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" +dependencies = [ + "equivalent", + "hashbrown 0.16.0", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "js-sys" +version = "0.3.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] + +[[package]] +name = "libc" +version = "0.2.177" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" + +[[package]] +name = "libm" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" + +[[package]] +name = "libredox" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" +dependencies = [ + "bitflags", + "libc", + "redox_syscall", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" +dependencies = [ + "pkg-config", + "vcpkg", +] + +[[package]] +name = "litemap" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "mio" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "nu-ansi-term" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "num-bigint-dig" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +dependencies = [ + "byteorder", + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand", + "smallvec", + "zeroize", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "potential_utf" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" +dependencies = [ + "zerovec", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro2" +version = "1.0.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rsa" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78928ac1ed176a5ca1d17e578a1825f3d81ca54cf41053a592584b020cfd691b" +dependencies = [ + "const-oid", + "digest", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core", + "signature", + "spki", + "subtle", + "zeroize", +] + +[[package]] +name = "rust-engine" +version = "0.1.0" +dependencies = [ + "anyhow", + "chrono", + "cors", + "dotenv", + "serde", + "serde_json", + "sqlx", + "tokio", + "tracing", + "tracing-subscriber", + "warp", +] + +[[package]] +name = "rustls" +version = "0.23.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "751e04a496ca00bb97a5e043158d23d66b5aabf2e1d5aa2a0aaebb1aafe6f82c" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10b3f4191e8a80e6b43eebabfac91e5dcecebb27a71f04e820c47ec41d314bf" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.145" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core", +] + +[[package]] +name = "slab" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +dependencies = [ + "serde", +] + +[[package]] +name = "socket2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "sqlx" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fefb893899429669dcdd979aff487bd78f4064e5e7907e4269081e0ef7d97dc" +dependencies = [ + "sqlx-core", + "sqlx-macros", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", +] + +[[package]] +name = "sqlx-core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6798b1838b6a0f69c007c133b8df5866302197e404e8b6ee8ed3e3a5e68dc6" +dependencies = [ + "base64", + "bytes", + "chrono", + "crc", + "crossbeam-queue", + "either", + "event-listener", + "futures-core", + "futures-intrusive", + "futures-io", + "futures-util", + "hashbrown 0.15.5", + "hashlink", + "indexmap", + "log", + "memchr", + "once_cell", + "percent-encoding", + "rustls", + "serde", + "serde_json", + "sha2", + "smallvec", + "thiserror", + "tokio", + "tokio-stream", + "tracing", + "url", + "webpki-roots 0.26.11", +] + +[[package]] +name = "sqlx-macros" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2d452988ccaacfbf5e0bdbc348fb91d7c8af5bee192173ac3636b5fb6e6715d" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19a9c1841124ac5a61741f96e1d9e2ec77424bf323962dd894bdb93f37d5219b" +dependencies = [ + "dotenvy", + "either", + "heck", + "hex", + "once_cell", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2", + "sqlx-core", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", + "syn", + "tokio", + "url", +] + +[[package]] +name = "sqlx-mysql" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa003f0038df784eb8fecbbac13affe3da23b45194bd57dba231c8f48199c526" +dependencies = [ + "atoi", + "base64", + "bitflags", + "byteorder", + "bytes", + "chrono", + "crc", + "digest", + "dotenvy", + "either", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "generic-array", + "hex", + "hkdf", + "hmac", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "percent-encoding", + "rand", + "rsa", + "serde", + "sha1", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-postgres" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db58fcd5a53cf07c184b154801ff91347e4c30d17a3562a635ff028ad5deda46" +dependencies = [ + "atoi", + "base64", + "bitflags", + "byteorder", + "chrono", + "crc", + "dotenvy", + "etcetera", + "futures-channel", + "futures-core", + "futures-util", + "hex", + "hkdf", + "hmac", + "home", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "rand", + "serde", + "serde_json", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-sqlite" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2d12fe70b2c1b4401038055f90f151b78208de1f9f89a7dbfd41587a10c3eea" +dependencies = [ + "atoi", + "chrono", + "flume", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "serde_urlencoded", + "sqlx-core", + "thiserror", + "tracing", + "url", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "stringprep" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" +dependencies = [ + "unicode-bidi", + "unicode-normalization", + "unicode-properties", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a26dbd934e5451d21ef060c018dae56fc073894c5a7896f882928a76e6d081b" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thiserror" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "tinystr" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-stream" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" +dependencies = [ + "nu-ansi-term", + "sharded-slab", + "smallvec", + "thread_local", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "unicase" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" + +[[package]] +name = "unicode-bidi" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" + +[[package]] +name = "unicode-ident" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" + +[[package]] +name = "unicode-normalization" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-properties" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "warp" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d06d9202adc1f15d709c4f4a2069be5428aa912cc025d6f268ac441ab066b0" +dependencies = [ + "bytes", + "futures-util", + "headers", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "log", + "mime", + "mime_guess", + "percent-encoding", + "pin-project", + "scoped-tls", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-util", + "tower-service", + "tracing", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + +[[package]] +name = "wasm-bindgen" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "webpki-roots" +version = "0.26.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" +dependencies = [ + "webpki-roots 1.0.3", +] + +[[package]] +name = "webpki-roots" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b130c0d2d49f8b6889abc456e795e82525204f27c42cf767cf0d7734e089b8" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "whoami" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" +dependencies = [ + "libredox", + "wasite", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "writeable" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" + +[[package]] +name = "yoke" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/rust-engine/Cargo.toml b/rust-engine/Cargo.toml index cb5d0fc..354f35e 100644 --- a/rust-engine/Cargo.toml +++ b/rust-engine/Cargo.toml @@ -5,13 +5,13 @@ edition = "2021" [dependencies] tokio = { version = "1.0", features = ["full"] } -warp = "0.3" +warp = { version = "0.4.2", features = ["server"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -sqlx = { version = "0.7", features = ["runtime-tokio-rustls", "mysql", "chrono"] } +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.6" +cors = "0.1.0" anyhow = "1.0" \ No newline at end of file diff --git a/rust-engine/src/main.rs b/rust-engine/src/main.rs index 672007c..bd70a46 100644 --- a/rust-engine/src/main.rs +++ b/rust-engine/src/main.rs @@ -20,7 +20,7 @@ struct ApiResponse { #[tokio::main] async fn main() -> Result<(), Box> { // Initialize tracing - tracing_subscriber::init(); + tracing_subscriber::fmt::init(); // Load environment variables dotenv::dotenv().ok(); From 5b32587f21b465819e7fa6d7b429b2ec4f99674a Mon Sep 17 00:00:00 2001 From: JK-le-dev Date: Sat, 18 Oct 2025 14:29:47 -0500 Subject: [PATCH 06/17] fix(tailwindcss): now working, need everyone to npm i again --- web-app/package-lock.json | 691 ++++++++++++++++++++++++++++++++++++- web-app/tailwind.config.js | 2 +- 2 files changed, 691 insertions(+), 2 deletions(-) diff --git a/web-app/package-lock.json b/web-app/package-lock.json index 7e65fb4..48eceeb 100644 --- a/web-app/package-lock.json +++ b/web-app/package-lock.json @@ -8,6 +8,7 @@ "license": "ISC", "dependencies": { "@google/genai": "^1.25.0", + "@tailwindcss/postcss": "^4.1.14", "@vitejs/plugin-react": "^5.0.4", "cors": "^2.8.5", "dotenv": "^17.2.3", @@ -19,10 +20,10 @@ "react-dom": "^19.2.0", "react-router": "^7.9.4", "react-router-dom": "^7.9.4", - "tailwindcss": "^4.1.14", "vite-jsconfig-paths": "^2.0.1" }, "devDependencies": { + "autoprefixer": "^10.4.21", "eslint": "^9.38.0", "eslint-plugin-import": "^2.32.0", "eslint-plugin-react": "^7.37.5", @@ -30,9 +31,22 @@ "eslint-plugin-react-refresh": "^0.4.24", "nodemon": "^3.1.10", "prettier": "^3.6.2", + "tailwindcss": "^4.1.14", "vite": "^7.1.10" } }, + "node_modules/@alloc/quick-lru": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@babel/code-frame": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", @@ -964,6 +978,18 @@ "node": ">=12" } }, + "node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", + "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", + "license": "ISC", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", @@ -1318,6 +1344,267 @@ "dev": true, "license": "MIT" }, + "node_modules/@tailwindcss/node": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.14.tgz", + "integrity": "sha512-hpz+8vFk3Ic2xssIA3e01R6jkmsAhvkQdXlEbRTk6S10xDAtiQiM3FyvZVGsucefq764euO/b8WUW9ysLdThHw==", + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.4", + "enhanced-resolve": "^5.18.3", + "jiti": "^2.6.0", + "lightningcss": "1.30.1", + "magic-string": "^0.30.19", + "source-map-js": "^1.2.1", + "tailwindcss": "4.1.14" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.14.tgz", + "integrity": "sha512-23yx+VUbBwCg2x5XWdB8+1lkPajzLmALEfMb51zZUBYaYVPDQvBSD/WYDqiVyBIo2BZFa3yw1Rpy3G2Jp+K0dw==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.4", + "tar": "^7.5.1" + }, + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.1.14", + "@tailwindcss/oxide-darwin-arm64": "4.1.14", + "@tailwindcss/oxide-darwin-x64": "4.1.14", + "@tailwindcss/oxide-freebsd-x64": "4.1.14", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.14", + "@tailwindcss/oxide-linux-arm64-gnu": "4.1.14", + "@tailwindcss/oxide-linux-arm64-musl": "4.1.14", + "@tailwindcss/oxide-linux-x64-gnu": "4.1.14", + "@tailwindcss/oxide-linux-x64-musl": "4.1.14", + "@tailwindcss/oxide-wasm32-wasi": "4.1.14", + "@tailwindcss/oxide-win32-arm64-msvc": "4.1.14", + "@tailwindcss/oxide-win32-x64-msvc": "4.1.14" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.14.tgz", + "integrity": "sha512-a94ifZrGwMvbdeAxWoSuGcIl6/DOP5cdxagid7xJv6bwFp3oebp7y2ImYsnZBMTwjn5Ev5xESvS3FFYUGgPODQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.14.tgz", + "integrity": "sha512-HkFP/CqfSh09xCnrPJA7jud7hij5ahKyWomrC3oiO2U9i0UjP17o9pJbxUN0IJ471GTQQmzwhp0DEcpbp4MZTA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.14.tgz", + "integrity": "sha512-eVNaWmCgdLf5iv6Qd3s7JI5SEFBFRtfm6W0mphJYXgvnDEAZ5sZzqmI06bK6xo0IErDHdTA5/t7d4eTfWbWOFw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.14.tgz", + "integrity": "sha512-QWLoRXNikEuqtNb0dhQN6wsSVVjX6dmUFzuuiL09ZeXju25dsei2uIPl71y2Ic6QbNBsB4scwBoFnlBfabHkEw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.14.tgz", + "integrity": "sha512-VB4gjQni9+F0VCASU+L8zSIyjrLLsy03sjcR3bM0V2g4SNamo0FakZFKyUQ96ZVwGK4CaJsc9zd/obQy74o0Fw==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.14.tgz", + "integrity": "sha512-qaEy0dIZ6d9vyLnmeg24yzA8XuEAD9WjpM5nIM1sUgQ/Zv7cVkharPDQcmm/t/TvXoKo/0knI3me3AGfdx6w1w==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.14.tgz", + "integrity": "sha512-ISZjT44s59O8xKsPEIesiIydMG/sCXoMBCqsphDm/WcbnuWLxxb+GcvSIIA5NjUw6F8Tex7s5/LM2yDy8RqYBQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.14.tgz", + "integrity": "sha512-02c6JhLPJj10L2caH4U0zF8Hji4dOeahmuMl23stk0MU1wfd1OraE7rOloidSF8W5JTHkFdVo/O7uRUJJnUAJg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.14.tgz", + "integrity": "sha512-TNGeLiN1XS66kQhxHG/7wMeQDOoL0S33x9BgmydbrWAb9Qw0KYdd8o1ifx4HOGDWhVmJ+Ul+JQ7lyknQFilO3Q==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.14.tgz", + "integrity": "sha512-uZYAsaW/jS/IYkd6EWPJKW/NlPNSkWkBlaeVBi/WsFQNP05/bzkebUL8FH1pdsqx4f2fH/bWFcUABOM9nfiJkQ==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.5.0", + "@emnapi/runtime": "^1.5.0", + "@emnapi/wasi-threads": "^1.1.0", + "@napi-rs/wasm-runtime": "^1.0.5", + "@tybys/wasm-util": "^0.10.1", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.14.tgz", + "integrity": "sha512-Az0RnnkcvRqsuoLH2Z4n3JfAef0wElgzHD5Aky/e+0tBUxUhIeIqFBTMNQvmMRSP15fWwmvjBxZ3Q8RhsDnxAA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.14.tgz", + "integrity": "sha512-ttblVGHgf68kEE4om1n/n44I0yGPkCPbLsqzjvybhpwa6mKKtgFfAzy6btc3HRmuW7nHe0OOrSeNP9sQmmH9XA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/postcss": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.1.14.tgz", + "integrity": "sha512-BdMjIxy7HUNThK87C7BC8I1rE8BVUsfNQSI5siQ4JK3iIa3w0XyVvVL9SXLWO//CtYTcp1v7zci0fYwJOjB+Zg==", + "license": "MIT", + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "@tailwindcss/node": "4.1.14", + "@tailwindcss/oxide": "4.1.14", + "postcss": "^8.4.41", + "tailwindcss": "4.1.14" + } + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -1697,6 +1984,44 @@ "node": ">= 0.4" } }, + "node_modules/autoprefixer": { + "version": "10.4.21", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.21.tgz", + "integrity": "sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "browserslist": "^4.24.4", + "caniuse-lite": "^1.0.30001702", + "fraction.js": "^4.3.7", + "normalize-range": "^0.1.2", + "picocolors": "^1.1.1", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, "node_modules/available-typed-arrays": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", @@ -1995,6 +2320,15 @@ "node": ">= 6" } }, + "node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -2224,6 +2558,15 @@ "node": ">= 0.8" } }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, "node_modules/doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", @@ -2305,6 +2648,19 @@ "node": ">= 0.8" } }, + "node_modules/enhanced-resolve": { + "version": "5.18.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz", + "integrity": "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/es-abstract": { "version": "1.24.0", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz", @@ -3103,6 +3459,20 @@ "node": ">= 0.6" } }, + "node_modules/fraction.js": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://github.com/sponsors/rawify" + } + }, "node_modules/fresh": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", @@ -3406,6 +3776,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, "node_modules/gtoken": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz", @@ -4139,6 +4515,15 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "node_modules/jiti": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", + "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -4273,6 +4658,234 @@ "node": ">= 0.8.0" } }, + "node_modules/lightningcss": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.30.1.tgz", + "integrity": "sha512-xi6IyHML+c9+Q3W0S4fCQJOym42pyurFiJUHEcEyHS0CeKzia4yZDEsLlqOFykxOdHpNy0NmvVO31vcSqAxJCg==", + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-darwin-arm64": "1.30.1", + "lightningcss-darwin-x64": "1.30.1", + "lightningcss-freebsd-x64": "1.30.1", + "lightningcss-linux-arm-gnueabihf": "1.30.1", + "lightningcss-linux-arm64-gnu": "1.30.1", + "lightningcss-linux-arm64-musl": "1.30.1", + "lightningcss-linux-x64-gnu": "1.30.1", + "lightningcss-linux-x64-musl": "1.30.1", + "lightningcss-win32-arm64-msvc": "1.30.1", + "lightningcss-win32-x64-msvc": "1.30.1" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.30.1.tgz", + "integrity": "sha512-c8JK7hyE65X1MHMN+Viq9n11RRC7hgin3HhYKhrMyaXflk5GVplZ60IxyoVtzILeKr+xAJwg6zK6sjTBJ0FKYQ==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.30.1.tgz", + "integrity": "sha512-k1EvjakfumAQoTfcXUcHQZhSpLlkAuEkdMBsI/ivWw9hL+7FtilQc0Cy3hrx0AAQrVtQAbMI7YjCgYgvn37PzA==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.30.1.tgz", + "integrity": "sha512-kmW6UGCGg2PcyUE59K5r0kWfKPAVy4SltVeut+umLCFoJ53RdCUWxcRDzO1eTaxf/7Q2H7LTquFHPL5R+Gjyig==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.30.1.tgz", + "integrity": "sha512-MjxUShl1v8pit+6D/zSPq9S9dQ2NPFSQwGvxBCYaBYLPlCWuPh9/t1MRS8iUaR8i+a6w7aps+B4N0S1TYP/R+Q==", + "cpu": [ + "arm" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.30.1.tgz", + "integrity": "sha512-gB72maP8rmrKsnKYy8XUuXi/4OctJiuQjcuqWNlJQ6jZiWqtPvqFziskH3hnajfvKB27ynbVCucKSm2rkQp4Bw==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.30.1.tgz", + "integrity": "sha512-jmUQVx4331m6LIX+0wUhBbmMX7TCfjF5FoOH6SD1CttzuYlGNVpA7QnrmLxrsub43ClTINfGSYyHe2HWeLl5CQ==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.30.1.tgz", + "integrity": "sha512-piWx3z4wN8J8z3+O5kO74+yr6ze/dKmPnI7vLqfSqI8bccaTGY5xiSGVIJBDd5K5BHlvVLpUB3S2YCfelyJ1bw==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.30.1.tgz", + "integrity": "sha512-rRomAK7eIkL+tHY0YPxbc5Dra2gXlI63HL+v1Pdi1a3sC+tJTcFrHX+E86sulgAXeI7rSzDYhPSeHHjqFhqfeQ==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.30.1.tgz", + "integrity": "sha512-mSL4rqPi4iXq5YVqzSsJgMVFENoa4nGTT/GjO2c0Yl9OuQfPsIfncvLrEW6RbbB24WtZ3xP/2CCmI3tNkNV4oA==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.30.1.tgz", + "integrity": "sha512-PVqXh48wh4T53F/1CCu8PIPCxLzWyCnn/9T5W1Jpmdy5h9Cwd+0YQS6/LwhHXSafuc61/xg9Lv5OrCby6a++jg==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -4333,6 +4946,15 @@ "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, + "node_modules/magic-string": { + "version": "0.30.19", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.19.tgz", + "integrity": "sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -4415,6 +5037,18 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/minizlib": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz", + "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -4567,6 +5201,16 @@ "node": ">=0.10.0" } }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -5017,6 +5661,13 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true, + "license": "MIT" + }, "node_modules/postgres-array": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", @@ -6070,6 +6721,44 @@ "integrity": "sha512-b7pCxjGO98LnxVkKjaZSDeNuljC4ueKUddjENJOADtubtdo8llTaJy7HwBMeLNSSo2N5QIAgklslK1+Ir8r6CA==", "license": "MIT" }, + "node_modules/tapable": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", + "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==", + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/tar": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.1.tgz", + "integrity": "sha512-nlGpxf+hv0v7GkWBK2V9spgactGOp0qvfWRxUMjqHyzrt3SgwE48DIv/FhqPHJYLHpgW1opq3nERbz5Anq7n1g==", + "license": "ISC", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.1.0", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", diff --git a/web-app/tailwind.config.js b/web-app/tailwind.config.js index ce274b0..5b480dc 100644 --- a/web-app/tailwind.config.js +++ b/web-app/tailwind.config.js @@ -1,6 +1,6 @@ /** @type {import('tailwindcss').Config} */ module.exports = { - content: ["./src/**/*.{html,js}"], + content: ["./src/**/*.{js,ts,jsx,tsx}"], theme: { extend: { colors: { From a2e97ef05b8c8117255d7f8b685b96cbb18c32d7 Mon Sep 17 00:00:00 2001 From: Christbru Date: Sat, 18 Oct 2025 17:17:14 -0500 Subject: [PATCH 07/17] Clear setup file that's not needed --- setup-check.ps1 | 62 ------------------------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 setup-check.ps1 diff --git a/setup-check.ps1 b/setup-check.ps1 deleted file mode 100644 index a4ca199..0000000 --- a/setup-check.ps1 +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env pwsh - -Write-Host "šŸš€ CodeRED-Astra Setup Verification" -ForegroundColor Green -Write-Host "=================================" -ForegroundColor Green - -# Check if Docker is available -Write-Host "`nšŸ“¦ Checking Docker..." -ForegroundColor Yellow -try { - $dockerVersion = docker --version - Write-Host "āœ… Docker found: $dockerVersion" -ForegroundColor Green -} catch { - Write-Host "āŒ Docker not found. Please install Docker Desktop." -ForegroundColor Red - exit 1 -} - -# Check if .env exists -Write-Host "`nšŸ”§ Checking environment setup..." -ForegroundColor Yellow -if (Test-Path ".env") { - Write-Host "āœ… .env file exists" -ForegroundColor Green -} else { - Write-Host "āš ļø .env file not found. Creating from template..." -ForegroundColor Yellow - Copy-Item ".env.example" ".env" - Write-Host "āœ… Created .env file. Please edit it with your credentials!" -ForegroundColor Green -} - -# Check Node.js (for local development) -Write-Host "`nšŸ“± Checking Node.js..." -ForegroundColor Yellow -try { - $nodeVersion = node --version - Write-Host "āœ… Node.js found: $nodeVersion" -ForegroundColor Green -} catch { - Write-Host "āš ļø Node.js not found (needed for local frontend development)" -ForegroundColor Yellow -} - -# Check Rust (for local development) -Write-Host "`nšŸ¦€ Checking Rust..." -ForegroundColor Yellow -try { - $rustVersion = rustc --version - Write-Host "āœ… Rust found: $rustVersion" -ForegroundColor Green -} catch { - Write-Host "āš ļø Rust not found (needed for local backend development)" -ForegroundColor Yellow -} - -Write-Host "`nšŸŽÆ Setup Summary:" -ForegroundColor Cyan -Write-Host "=================" -ForegroundColor Cyan -Write-Host "• Frontend: React + Vite + Tailwind CSS" -ForegroundColor White -Write-Host "• Backend: Rust + Warp + SQLx + MySQL" -ForegroundColor White -Write-Host "• Docker: Full stack containerization" -ForegroundColor White - -Write-Host "`nšŸš€ Quick Start Commands:" -ForegroundColor Magenta -Write-Host "========================" -ForegroundColor Magenta -Write-Host "1. Start full stack: docker-compose up --build" -ForegroundColor White -Write-Host "2. Frontend dev: cd web-app && npm install && npm run dev" -ForegroundColor White -Write-Host "3. Backend dev: cd rust-engine && cargo run" -ForegroundColor White - -Write-Host "`nšŸ“ Access URLs:" -ForegroundColor Cyan -Write-Host "===============" -ForegroundColor Cyan -Write-Host "• Web App: http://localhost (Docker) or http://localhost:5173 (local)" -ForegroundColor White -Write-Host "• Rust API: http://localhost:8000" -ForegroundColor White -Write-Host "• phpMyAdmin: http://127.0.0.1:8080" -ForegroundColor White - -Write-Host "`n✨ Your hackathon project is ready! Happy coding! ✨" -ForegroundColor Green \ No newline at end of file From 85e65b6e75e2bd545835b6bad9057439a26932f0 Mon Sep 17 00:00:00 2001 From: JK-le-dev Date: Sat, 18 Oct 2025 14:44:28 -0500 Subject: [PATCH 08/17] fix(tailwindcss): tailwindcss works with vite, no custom theme --- package.json | 42 +++++++++++++++++++ src/App.jsx | 11 +++++ src/index.css | 14 +++++++ src/styles/theme.css | 7 ++++ vite.config.js | 9 +++++ web-app/index.html | 1 + web-app/package-lock.json | 85 +++++++-------------------------------- 7 files changed, 99 insertions(+), 70 deletions(-) create mode 100644 package.json create mode 100644 src/App.jsx create mode 100644 src/index.css create mode 100644 src/styles/theme.css create mode 100644 vite.config.js diff --git a/package.json b/package.json new file mode 100644 index 0000000..1833938 --- /dev/null +++ b/package.json @@ -0,0 +1,42 @@ +{ + "name": "codered-astra", + "private": true, + "scripts": { + "build": "vite build", + "dev": "vite", + "host": "vite host", + "format": "prettier --write \"**/*.{ts,tsx,md}\"", + "clean-dist": "find apps/ -type d -name 'dist' -print0 | xargs -r0 -- rm -r", + "clean-all": "find apps/ -type d -name 'dist' -print0 | xargs -r0 -- rm -r && find . -path ./node_modules -prune -o -name 'node_modules' | xargs rm -rf " + }, + "license": "ISC", + "dependencies": { + "@google/genai": "^1.25.0", + "@tailwindcss/postcss": "^4.1.14", + "@tailwindcss/vite": "^4.1.14", + "@vitejs/plugin-react": "^5.0.4", + "cors": "^2.8.5", + "dotenv": "^17.2.3", + "express": "^5.1.0", + "helmet": "^8.1.0", + "lucide-react": "^0.546.0", + "pg": "^8.16.3", + "react": "^19.2.0", + "react-dom": "^19.2.0", + "react-router": "^7.9.4", + "react-router-dom": "^7.9.4", + "vite-jsconfig-paths": "^2.0.1" + }, + "packageManager": ">=npm@10.9.0", + "devDependencies": { + "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", + "nodemon": "^3.1.10", + "prettier": "^3.6.2", + "tailwindcss": "^4.1.14", + "vite": "^7.1.10" + } +} diff --git a/src/App.jsx b/src/App.jsx new file mode 100644 index 0000000..35aab7c --- /dev/null +++ b/src/App.jsx @@ -0,0 +1,11 @@ +import React from "react"; + +function App() { + return ( +
+

Hello, world!

+
+ ); +} + +export default App; diff --git a/src/index.css b/src/index.css new file mode 100644 index 0000000..f1f7c63 --- /dev/null +++ b/src/index.css @@ -0,0 +1,14 @@ +@import "tailwindcss"; + +body { + margin: 0; + background: rgba(var(--background)); +} + +@theme { + --color-primary: 15, 40, 98; + --color-secondary: 79, 95, 118; + --color-accent: 158, 54, 58; + --color-paragraph: 255, 255, 255; + --color-background: 9, 31, 54; +} diff --git a/src/styles/theme.css b/src/styles/theme.css new file mode 100644 index 0000000..e9e4594 --- /dev/null +++ b/src/styles/theme.css @@ -0,0 +1,7 @@ +@theme { + --color-paragraph: 255, 255, 255; + --color-background: 9, 31, 54; + --color-primary: 15, 40, 98; + --color-secondary: 79, 95, 118; + --color-accent: 158, 54, 58; +} diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..9632d41 --- /dev/null +++ b/vite.config.js @@ -0,0 +1,9 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; +import jsconfigPaths from "vite-jsconfig-paths"; +import tailwindcss from "@tailwindcss/vite"; + +// https://vite.dev/config/ +export default defineConfig({ + plugins: [tailwindcss(), react(), jsconfigPaths()], +}); diff --git a/web-app/index.html b/web-app/index.html index 12f80c9..ddadf4a 100644 --- a/web-app/index.html +++ b/web-app/index.html @@ -4,6 +4,7 @@ + codered-astra diff --git a/web-app/package-lock.json b/web-app/package-lock.json index 48eceeb..c8c08ce 100644 --- a/web-app/package-lock.json +++ b/web-app/package-lock.json @@ -9,6 +9,7 @@ "dependencies": { "@google/genai": "^1.25.0", "@tailwindcss/postcss": "^4.1.14", + "@tailwindcss/vite": "^4.1.14", "@vitejs/plugin-react": "^5.0.4", "cors": "^2.8.5", "dotenv": "^17.2.3", @@ -23,7 +24,6 @@ "vite-jsconfig-paths": "^2.0.1" }, "devDependencies": { - "autoprefixer": "^10.4.21", "eslint": "^9.38.0", "eslint-plugin-import": "^2.32.0", "eslint-plugin-react": "^7.37.5", @@ -1605,6 +1605,20 @@ "tailwindcss": "4.1.14" } }, + "node_modules/@tailwindcss/vite": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.1.14.tgz", + "integrity": "sha512-BoFUoU0XqgCUS1UXWhmDJroKKhNXeDzD7/XwabjkDIAbMnc4ULn5e2FuEuBbhZ6ENZoSYzKlzvZ44Yr6EUDUSA==", + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.1.14", + "@tailwindcss/oxide": "4.1.14", + "tailwindcss": "4.1.14" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7" + } + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -1984,44 +1998,6 @@ "node": ">= 0.4" } }, - "node_modules/autoprefixer": { - "version": "10.4.21", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.21.tgz", - "integrity": "sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/autoprefixer" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "browserslist": "^4.24.4", - "caniuse-lite": "^1.0.30001702", - "fraction.js": "^4.3.7", - "normalize-range": "^0.1.2", - "picocolors": "^1.1.1", - "postcss-value-parser": "^4.2.0" - }, - "bin": { - "autoprefixer": "bin/autoprefixer" - }, - "engines": { - "node": "^10 || ^12 || >=14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, "node_modules/available-typed-arrays": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", @@ -3459,20 +3435,6 @@ "node": ">= 0.6" } }, - "node_modules/fraction.js": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", - "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - }, - "funding": { - "type": "patreon", - "url": "https://github.com/sponsors/rawify" - } - }, "node_modules/fresh": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", @@ -5201,16 +5163,6 @@ "node": ">=0.10.0" } }, - "node_modules/normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -5661,13 +5613,6 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true, - "license": "MIT" - }, "node_modules/postgres-array": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", From 3dd229b16c44d29597eaab5444c79f12231fda8f Mon Sep 17 00:00:00 2001 From: yenminh269 Date: Sat, 18 Oct 2025 14:40:49 -0500 Subject: [PATCH 09/17] "front end structure" --- src/components/ui/Button/DeleteButton.jsx | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/components/ui/Button/DeleteButton.jsx diff --git a/src/components/ui/Button/DeleteButton.jsx b/src/components/ui/Button/DeleteButton.jsx new file mode 100644 index 0000000..e69de29 From 21aa150fd880b7d43691dfda19d4c378fb61baba Mon Sep 17 00:00:00 2001 From: yenminh269 Date: Sat, 18 Oct 2025 14:42:54 -0500 Subject: [PATCH 10/17] "front end structure" --- src/app/index.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/app/index.js diff --git a/src/app/index.js b/src/app/index.js new file mode 100644 index 0000000..e69de29 From 3429c764e80f18cb25534d744830c72c2ee7b963 Mon Sep 17 00:00:00 2001 From: JK-le-dev Date: Sat, 18 Oct 2025 15:03:25 -0500 Subject: [PATCH 11/17] attempt to fix tailwindcss utlity class but no worky --- src/App.jsx | 2 +- src/index.css | 16 ++++++++-------- src/styles/theme.css | 10 +++++----- web-app/eslint.config.js | 24 ++++++++++++------------ 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 35aab7c..53c1e17 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -3,7 +3,7 @@ import React from "react"; function App() { return (
-

Hello, world!

+

Hello, world!

); } diff --git a/src/index.css b/src/index.css index f1f7c63..69e3086 100644 --- a/src/index.css +++ b/src/index.css @@ -1,14 +1,14 @@ @import "tailwindcss"; +@theme { + --color-primary: rgba(15, 40, 98); + --color-secondary: rgba(79, 95, 118); + --color-accent: rgba(158, 54, 58); + --color-paragraph: rgba(255, 255, 255); + --color-background: rgba(9, 31, 54); +} + body { margin: 0; background: rgba(var(--background)); } - -@theme { - --color-primary: 15, 40, 98; - --color-secondary: 79, 95, 118; - --color-accent: 158, 54, 58; - --color-paragraph: 255, 255, 255; - --color-background: 9, 31, 54; -} diff --git a/src/styles/theme.css b/src/styles/theme.css index e9e4594..5287314 100644 --- a/src/styles/theme.css +++ b/src/styles/theme.css @@ -1,7 +1,7 @@ @theme { - --color-paragraph: 255, 255, 255; - --color-background: 9, 31, 54; - --color-primary: 15, 40, 98; - --color-secondary: 79, 95, 118; - --color-accent: 158, 54, 58; + --color-primary: rgba(15, 40, 98); + --color-secondary: rgba(79, 95, 118); + --color-accent: rgba(158, 54, 58); + --color-paragraph: rgba(255, 255, 255); + --color-background: rgba(9, 31, 54); } diff --git a/web-app/eslint.config.js b/web-app/eslint.config.js index cee1e2c..777fe18 100644 --- a/web-app/eslint.config.js +++ b/web-app/eslint.config.js @@ -1,29 +1,29 @@ -import js from '@eslint/js' -import globals from 'globals' -import reactHooks from 'eslint-plugin-react-hooks' -import reactRefresh from 'eslint-plugin-react-refresh' -import { defineConfig, globalIgnores } from 'eslint/config' +import js from "@eslint/js"; +import globals from "globals"; +import reactHooks from "eslint-plugin-react-hooks"; +import reactRefresh from "eslint-plugin-react-refresh"; +import { defineConfig, globalIgnores } from "eslint/config"; export default defineConfig([ - globalIgnores(['dist']), + globalIgnores(["dist"]), { - files: ['**/*.{js,jsx}'], + files: ["**/*.{js,jsx}"], extends: [ js.configs.recommended, - reactHooks.configs['recommended-latest'], + reactHooks.configs["recommended-latest"], reactRefresh.configs.vite, ], languageOptions: { ecmaVersion: 2020, globals: globals.browser, parserOptions: { - ecmaVersion: 'latest', + ecmaVersion: "latest", ecmaFeatures: { jsx: true }, - sourceType: 'module', + sourceType: "module", }, }, rules: { - 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }], + "no-unused-vars": ["error", { varsIgnorePattern: "^[A-Z_]" }], }, }, -]) +]); From 4774b2c8a5388519672c739fcea6c028b0706b2d Mon Sep 17 00:00:00 2001 From: JK-le-dev Date: Sat, 18 Oct 2025 15:22:13 -0500 Subject: [PATCH 12/17] feat(chat): created basic chat layout --- src/App.jsx | 11 ---------- src/app/index.js | 0 src/app/index.jsx | 12 +++++++++++ src/components/ui/ChatHeader.jsx | 19 +++++++++++++++++ src/components/ui/ChatLayout.jsx | 34 ++++++++++++++++++++++++++++++ src/components/ui/ChatWindow.jsx | 28 ++++++++++++++++++++++++ src/components/ui/MessageInput.jsx | 31 +++++++++++++++++++++++++++ src/index.css | 26 ++++++++++++++++------- vite.config.js | 5 +++++ web-app/src/main.jsx | 14 ++++++------ 10 files changed, 154 insertions(+), 26 deletions(-) delete mode 100644 src/App.jsx delete mode 100644 src/app/index.js create mode 100644 src/app/index.jsx create mode 100644 src/components/ui/ChatHeader.jsx create mode 100644 src/components/ui/ChatLayout.jsx create mode 100644 src/components/ui/ChatWindow.jsx create mode 100644 src/components/ui/MessageInput.jsx diff --git a/src/App.jsx b/src/App.jsx deleted file mode 100644 index 53c1e17..0000000 --- a/src/App.jsx +++ /dev/null @@ -1,11 +0,0 @@ -import React from "react"; - -function App() { - return ( -
-

Hello, world!

-
- ); -} - -export default App; diff --git a/src/app/index.js b/src/app/index.js deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/index.jsx b/src/app/index.jsx new file mode 100644 index 0000000..86327c4 --- /dev/null +++ b/src/app/index.jsx @@ -0,0 +1,12 @@ +import React from "react"; +import ChatLayout from "src/components/ui/ChatLayout"; + +function App() { + return ( +
+ +
+ ); +} + +export default App; diff --git a/src/components/ui/ChatHeader.jsx b/src/components/ui/ChatHeader.jsx new file mode 100644 index 0000000..13f5c83 --- /dev/null +++ b/src/components/ui/ChatHeader.jsx @@ -0,0 +1,19 @@ +import React from "react"; + +export default function ChatHeader({ title = "AI Assistant" }) { + return ( +
+
+
+ AI +
+
+

{title}

+

+ Ask anything — AI is listening +

+
+
+
+ ); +} diff --git a/src/components/ui/ChatLayout.jsx b/src/components/ui/ChatLayout.jsx new file mode 100644 index 0000000..060c0cd --- /dev/null +++ b/src/components/ui/ChatLayout.jsx @@ -0,0 +1,34 @@ +import React, { useState } from "react"; +import ChatHeader from "./ChatHeader"; +import ChatWindow from "./ChatWindow"; +import MessageInput from "./MessageInput"; + +export default function ChatLayout() { + const [messages, setMessages] = useState([ + { + role: "assistant", + content: "Hello — I can help you with code, explanations, and more.", + }, + ]); + + function handleSend(text) { + const userMsg = { role: "user", content: text }; + setMessages((s) => [...s, userMsg]); + + // fake assistant reply after short delay + setTimeout(() => { + setMessages((s) => [ + ...s, + { role: "assistant", content: `You said: ${text}` }, + ]); + }, 600); + } + + return ( +
+ + + +
+ ); +} diff --git a/src/components/ui/ChatWindow.jsx b/src/components/ui/ChatWindow.jsx new file mode 100644 index 0000000..649180f --- /dev/null +++ b/src/components/ui/ChatWindow.jsx @@ -0,0 +1,28 @@ +import React from "react"; + +function MessageBubble({ message }) { + const isUser = message.role === "user"; + return ( +
+
+
{message.content}
+
+
+ ); +} + +export default function ChatWindow({ messages }) { + return ( +
+
+ {messages.map((m, i) => ( + + ))} +
+
+ ); +} diff --git a/src/components/ui/MessageInput.jsx b/src/components/ui/MessageInput.jsx new file mode 100644 index 0000000..2ca272e --- /dev/null +++ b/src/components/ui/MessageInput.jsx @@ -0,0 +1,31 @@ +import React, { useState } from "react"; + +export default function MessageInput({ onSend }) { + const [text, setText] = useState(""); + + function handleSubmit(e) { + e.preventDefault(); + if (!text.trim()) return; + onSend(text.trim()); + setText(""); + } + + return ( +
+
+ setText(e.target.value)} + placeholder="Type a message..." + className="flex-1 rounded-md bg-slate-800 border border-slate-700 px-3 py-2 text-white focus:outline-none focus:ring-2 focus:ring-indigo-500" + /> + +
+
+ ); +} diff --git a/src/index.css b/src/index.css index 69e3086..9895c36 100644 --- a/src/index.css +++ b/src/index.css @@ -1,14 +1,24 @@ -@import "tailwindcss"; +@import "tailwindcss/preflight"; +@import "tailwindcss/utilities"; -@theme { - --color-primary: rgba(15, 40, 98); - --color-secondary: rgba(79, 95, 118); - --color-accent: rgba(158, 54, 58); - --color-paragraph: rgba(255, 255, 255); - --color-background: rgba(9, 31, 54); +:root { + --color-primary: 15 40 98; + --color-secondary: 79 95 118; + --color-accent: 158 54 58; + --color-paragraph: 255 255 255; + --color-background: 9 31 54; } body { margin: 0; - background: rgba(var(--background)); + background-color: rgb(var(--color-background)); + color: rgb(var(--color-paragraph)); + font-family: + ui-sans-serif, + system-ui, + -apple-system, + "Segoe UI", + Roboto, + "Helvetica Neue", + Arial; } diff --git a/vite.config.js b/vite.config.js index 9632d41..db0ad28 100644 --- a/vite.config.js +++ b/vite.config.js @@ -6,4 +6,9 @@ import tailwindcss from "@tailwindcss/vite"; // https://vite.dev/config/ export default defineConfig({ plugins: [tailwindcss(), react(), jsconfigPaths()], + resolve: { + alias: { + src: "/src", + }, + }, }); diff --git a/web-app/src/main.jsx b/web-app/src/main.jsx index b9a1a6d..e054df6 100644 --- a/web-app/src/main.jsx +++ b/web-app/src/main.jsx @@ -1,10 +1,10 @@ -import { StrictMode } from 'react' -import { createRoot } from 'react-dom/client' -import './index.css' -import App from './App.jsx' +import { StrictMode } from "react"; +import { createRoot } from "react-dom/client"; +import "./index.css"; +import App from "./app/index.jsx"; -createRoot(document.getElementById('root')).render( +createRoot(document.getElementById("root")).render( - , -) + +); From 1da5f8e083af768133ab06084ef4583fd8150612 Mon Sep 17 00:00:00 2001 From: yenminh269 Date: Sat, 18 Oct 2025 16:11:14 -0500 Subject: [PATCH 13/17] "auto-scroll down when new messages appear " --- src/components/layouts/dashboard-layout.jsx | 0 src/components/ui/ChatWindow.jsx | 11 ++++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 src/components/layouts/dashboard-layout.jsx diff --git a/src/components/layouts/dashboard-layout.jsx b/src/components/layouts/dashboard-layout.jsx new file mode 100644 index 0000000..e69de29 diff --git a/src/components/ui/ChatWindow.jsx b/src/components/ui/ChatWindow.jsx index 649180f..9f35aba 100644 --- a/src/components/ui/ChatWindow.jsx +++ b/src/components/ui/ChatWindow.jsx @@ -1,5 +1,5 @@ import React from "react"; - +import { useRef } from "react"; function MessageBubble({ message }) { const isUser = message.role === "user"; return ( @@ -16,6 +16,15 @@ function MessageBubble({ message }) { } export default function ChatWindow({ messages }) { + const chatRef = useRef(null); + // Auto-scroll to bottom when new messages appear + useEffect(() => { + chatRef.current?.scrollTo({ + top: chatRef.current.scrollHeight, + behavior: "smooth", + }); + }, [messages]); + return (
From 18084ebc47fcdb16068037e003129c13dab1ef16 Mon Sep 17 00:00:00 2001 From: yenminh269 Date: Sat, 18 Oct 2025 16:35:50 -0500 Subject: [PATCH 14/17] "add chat and delete chat button" --- package.json | 3 + src/components/ui/Button/DeleteButton.jsx | 19 ++ src/components/ui/Button/NewChatButton.css | 13 + src/components/ui/Button/NewChatButton.jsx | 19 ++ web-app/package-lock.json | 304 ++++++++++++++++++++- 5 files changed, 355 insertions(+), 3 deletions(-) create mode 100644 src/components/ui/Button/NewChatButton.css create mode 100644 src/components/ui/Button/NewChatButton.jsx diff --git a/package.json b/package.json index 1833938..198e9c6 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,8 @@ "@tailwindcss/postcss": "^4.1.14", "@tailwindcss/vite": "^4.1.14", "@vitejs/plugin-react": "^5.0.4", + "bootstrap": "^5.3.8", + "bootstrap-icons": "^1.13.1", "cors": "^2.8.5", "dotenv": "^17.2.3", "express": "^5.1.0", @@ -22,6 +24,7 @@ "lucide-react": "^0.546.0", "pg": "^8.16.3", "react": "^19.2.0", + "react-bootstrap": "^2.10.10", "react-dom": "^19.2.0", "react-router": "^7.9.4", "react-router-dom": "^7.9.4", diff --git a/src/components/ui/Button/DeleteButton.jsx b/src/components/ui/Button/DeleteButton.jsx index e69de29..9df06da 100644 --- a/src/components/ui/Button/DeleteButton.jsx +++ b/src/components/ui/Button/DeleteButton.jsx @@ -0,0 +1,19 @@ +import Button from 'react-bootstrap/Button'; + +export default function DeleteButton({ onClick, variant = "outline-danger", children, ...props }) { + return ( + + ); +} diff --git a/src/components/ui/Button/NewChatButton.css b/src/components/ui/Button/NewChatButton.css new file mode 100644 index 0000000..7217f58 --- /dev/null +++ b/src/components/ui/Button/NewChatButton.css @@ -0,0 +1,13 @@ +.custom-btn { + background-color: white !important; + border: 2px solid #0F2862 !important; + color: #0F2862 !important; + transition: all 0.25s ease; +} + +.custom-btn:hover, +.custom-btn:focus { + background-color: #0F2862 !important; + color: white !important; + border-color: #0F2862 !important; +} diff --git a/src/components/ui/Button/NewChatButton.jsx b/src/components/ui/Button/NewChatButton.jsx new file mode 100644 index 0000000..3ff7052 --- /dev/null +++ b/src/components/ui/Button/NewChatButton.jsx @@ -0,0 +1,19 @@ +import Button from 'react-bootstrap/Button'; +import './NewChatButton.css' +export default function NewChatButton({ onClick, variant = "outline-light", children, ...props }) { + return ( + + ); +} diff --git a/web-app/package-lock.json b/web-app/package-lock.json index c8c08ce..a974ff6 100644 --- a/web-app/package-lock.json +++ b/web-app/package-lock.json @@ -11,6 +11,8 @@ "@tailwindcss/postcss": "^4.1.14", "@tailwindcss/vite": "^4.1.14", "@vitejs/plugin-react": "^5.0.4", + "bootstrap": "^5.3.8", + "bootstrap-icons": "^1.13.1", "cors": "^2.8.5", "dotenv": "^17.2.3", "express": "^5.1.0", @@ -18,6 +20,7 @@ "lucide-react": "^0.546.0", "pg": "^8.16.3", "react": "^19.2.0", + "react-bootstrap": "^2.10.10", "react-dom": "^19.2.0", "react-router": "^7.9.4", "react-router-dom": "^7.9.4", @@ -277,6 +280,15 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/runtime": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", + "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/template": { "version": "7.27.2", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", @@ -1045,6 +1057,85 @@ "node": ">=14" } }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/@react-aria/ssr": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.9.10.tgz", + "integrity": "sha512-hvTm77Pf+pMBhuBm760Li0BVIO38jv1IBws1xFm1NoL26PU+fe+FMW5+VZWyANR6nYL65joaJKZqOdTQMkO9IQ==", + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.0" + }, + "engines": { + "node": ">= 12" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@restart/hooks": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/@restart/hooks/-/hooks-0.4.16.tgz", + "integrity": "sha512-f7aCv7c+nU/3mF7NWLtVVr0Ra80RqsO89hO72r+Y/nvQr5+q0UFGkocElTH6MJApvReVh6JHUFYn2cw1WdHF3w==", + "license": "MIT", + "dependencies": { + "dequal": "^2.0.3" + }, + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@restart/ui": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/@restart/ui/-/ui-1.9.4.tgz", + "integrity": "sha512-N4C7haUc3vn4LTwVUPlkJN8Ach/+yIMvRuTVIhjilNHqegY60SGLrzud6errOMNJwSnmYFnt1J0H/k8FE3A4KA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@popperjs/core": "^2.11.8", + "@react-aria/ssr": "^3.5.0", + "@restart/hooks": "^0.5.0", + "@types/warning": "^3.0.3", + "dequal": "^2.0.3", + "dom-helpers": "^5.2.0", + "uncontrollable": "^8.0.4", + "warning": "^4.0.3" + }, + "peerDependencies": { + "react": ">=16.14.0", + "react-dom": ">=16.14.0" + } + }, + "node_modules/@restart/ui/node_modules/@restart/hooks": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@restart/hooks/-/hooks-0.5.1.tgz", + "integrity": "sha512-EMoH04NHS1pbn07iLTjIjgttuqb7qu4+/EyhAx27MHpoENcB2ZdSsLTNxmKD+WEPnZigo62Qc8zjGnNxoSE/5Q==", + "license": "MIT", + "dependencies": { + "dequal": "^2.0.3" + }, + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@restart/ui/node_modules/uncontrollable": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/uncontrollable/-/uncontrollable-8.0.4.tgz", + "integrity": "sha512-ulRWYWHvscPFc0QQXvyJjY6LIXU56f0h8pQFvhxiKk5V1fcI8gp9Ht9leVAhrVjzqMw0BgjspBINx9r6oyJUvQ==", + "license": "MIT", + "peerDependencies": { + "react": ">=16.14.0" + } + }, "node_modules/@rolldown/pluginutils": { "version": "1.0.0-beta.38", "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.38.tgz", @@ -1344,6 +1435,21 @@ "dev": true, "license": "MIT" }, + "node_modules/@swc/helpers": { + "version": "0.5.17", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.17.tgz", + "integrity": "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@swc/helpers/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@tailwindcss/node": { "version": "4.1.14", "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.14.tgz", @@ -1679,6 +1785,36 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "license": "MIT" }, + "node_modules/@types/prop-types": { + "version": "15.7.15", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", + "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "19.2.2", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.2.tgz", + "integrity": "sha512-6mDvHUFSjyT2B2yeNx2nUgMxh9LtOWvkhIU3uePn2I2oyNymUAX1NIsdgviM4CH+JSrp2D2hsMvJOkxY+0wNRA==", + "license": "MIT", + "dependencies": { + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-transition-group": { + "version": "4.4.12", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.12.tgz", + "integrity": "sha512-8TV6R3h2j7a91c+1DXdJi3Syo69zzIZbz7Lg5tORM5LEJG7X/E6a1V3drRyBRZq7/utz7A+c4OgYLiLcYGHG6w==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/warning": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/warning/-/warning-3.0.3.tgz", + "integrity": "sha512-D1XC7WK8K+zZEveUPY+cf4+kgauk8N4eHr/XIHXGlGYkHLud6hK9lYfZk1ry1TNh798cZUCgb6MqGEG8DkJt6Q==", + "license": "MIT" + }, "node_modules/@vitejs/plugin-react": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-5.0.4.tgz", @@ -2091,6 +2227,41 @@ "node": ">=18" } }, + "node_modules/bootstrap": { + "version": "5.3.8", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.8.tgz", + "integrity": "sha512-HP1SZDqaLDPwsNiqRqi5NcP0SSXciX2s9E+RyqJIIqGo+vJeN5AJVM98CXmW/Wux0nQ5L7jeWUdplCEf0Ee+tg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/twbs" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + } + ], + "license": "MIT", + "peerDependencies": { + "@popperjs/core": "^2.11.8" + } + }, + "node_modules/bootstrap-icons": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.13.1.tgz", + "integrity": "sha512-ijombt4v6bv5CLeXvRWKy7CuM3TRTuPEuGaGKvTV5cz65rQSY8RQ2JcHt6b90cBBAC7s8fsf2EkQDldzCoXUjw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/twbs" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + } + ], + "license": "MIT" + }, "node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", @@ -2305,6 +2476,12 @@ "node": ">=18" } }, + "node_modules/classnames": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==", + "license": "MIT" + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -2411,6 +2588,12 @@ "node": ">= 8" } }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "license": "MIT" + }, "node_modules/data-view-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", @@ -2534,6 +2717,15 @@ "node": ">= 0.8" } }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/detect-libc": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", @@ -2556,6 +2748,16 @@ "node": ">=0.10.0" } }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, "node_modules/dotenv": { "version": "17.2.3", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz", @@ -3990,6 +4192,15 @@ "node": ">= 0.4" } }, + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -4881,7 +5092,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, "license": "MIT", "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" @@ -5682,7 +5892,6 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, "license": "MIT", "dependencies": { "loose-envify": "^1.4.0", @@ -5690,6 +5899,19 @@ "react-is": "^16.13.1" } }, + "node_modules/prop-types-extra": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/prop-types-extra/-/prop-types-extra-1.1.1.tgz", + "integrity": "sha512-59+AHNnHYCdiC+vMwY52WmvP5dM3QLeoumYuEyceQDi9aEhtwN9zIQ2ZNo25sMyXnbh32h+P1ezDsUpUH3JAew==", + "license": "MIT", + "dependencies": { + "react-is": "^16.3.2", + "warning": "^4.0.0" + }, + "peerDependencies": { + "react": ">=0.14.0" + } + }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -5784,6 +6006,37 @@ "node": ">=0.10.0" } }, + "node_modules/react-bootstrap": { + "version": "2.10.10", + "resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-2.10.10.tgz", + "integrity": "sha512-gMckKUqn8aK/vCnfwoBpBVFUGT9SVQxwsYrp9yDHt0arXMamxALerliKBxr1TPbntirK/HGrUAHYbAeQTa9GHQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.24.7", + "@restart/hooks": "^0.4.9", + "@restart/ui": "^1.9.4", + "@types/prop-types": "^15.7.12", + "@types/react-transition-group": "^4.4.6", + "classnames": "^2.3.2", + "dom-helpers": "^5.2.1", + "invariant": "^2.2.4", + "prop-types": "^15.8.1", + "prop-types-extra": "^1.1.0", + "react-transition-group": "^4.4.5", + "uncontrollable": "^7.2.1", + "warning": "^4.0.3" + }, + "peerDependencies": { + "@types/react": ">=16.14.8", + "react": ">=16.14.0", + "react-dom": ">=16.14.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/react-dom": { "version": "19.2.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.0.tgz", @@ -5800,7 +6053,12 @@ "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true, + "license": "MIT" + }, + "node_modules/react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==", "license": "MIT" }, "node_modules/react-refresh": { @@ -5850,6 +6108,22 @@ "react-dom": ">=18" } }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "license": "BSD-3-Clause", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -6927,6 +7201,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/uncontrollable": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/uncontrollable/-/uncontrollable-7.2.1.tgz", + "integrity": "sha512-svtcfoTADIB0nT9nltgjujTi7BzVmwjZClOmskKu/E8FW9BXzg9os8OLr4f8Dlnk0rYWJIWr4wv9eKUXiQvQwQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.6.3", + "@types/react": ">=16.9.11", + "invariant": "^2.2.4", + "react-lifecycles-compat": "^3.0.4" + }, + "peerDependencies": { + "react": ">=15.0.0" + } + }, "node_modules/undefsafe": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", @@ -7094,6 +7383,15 @@ "vite": ">2.0.0-0" } }, + "node_modules/warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", From 5d0d88c535c983f54674da9223d76a5d6130d92b Mon Sep 17 00:00:00 2001 From: devaine Date: Sat, 18 Oct 2025 17:21:36 -0500 Subject: [PATCH 15/17] fix(repo): shoud be fixed now --- DEVELOPMENT.md | 117 --------------- eslint.config.js | 29 ---- package.json | 45 ------ src/index.css | 24 --- src/main.jsx | 10 -- vite.config.js | 14 -- web-app/Dockerfile | 25 ++-- web-app/README.md | 16 ++ web-app/eslint.config.js | 2 - web-app/jsconfig.json | 6 +- web-app/package.json | 58 ++++---- web-app/postcss.config.js | 6 - web-app/src/App.jsx | 137 ------------------ {src => web-app/src}/app/index.jsx | 2 +- .../src/components/layouts/chat-layout.jsx | 6 +- .../components/layouts/dashboard-layout.jsx | 0 .../components/ui/Button/DeleteButton.jsx | 0 .../components/ui/Button/NewChatButton.css | 0 .../components/ui/Button/NewChatButton.jsx | 0 .../src/components/ui/chat/chat-header.jsx | 0 .../src/components/ui/chat/chat-window.jsx | 0 .../src/components/ui/chat/message-input.jsx | 0 web-app/src/index.css | 43 +++--- {src => web-app/src}/styles/theme.css | 0 web-app/tailwind.config.js | 19 --- web-app/vite.config.js | 24 +-- 26 files changed, 87 insertions(+), 496 deletions(-) delete mode 100644 DEVELOPMENT.md delete mode 100644 eslint.config.js delete mode 100644 package.json delete mode 100644 src/index.css delete mode 100644 src/main.jsx delete mode 100644 vite.config.js create mode 100644 web-app/README.md delete mode 100644 web-app/postcss.config.js delete mode 100644 web-app/src/App.jsx rename {src => web-app/src}/app/index.jsx (77%) rename src/components/ui/ChatLayout.jsx => web-app/src/components/layouts/chat-layout.jsx (81%) rename {src => web-app/src}/components/layouts/dashboard-layout.jsx (100%) rename {src => web-app/src}/components/ui/Button/DeleteButton.jsx (100%) rename {src => web-app/src}/components/ui/Button/NewChatButton.css (100%) rename {src => web-app/src}/components/ui/Button/NewChatButton.jsx (100%) rename src/components/ui/ChatHeader.jsx => web-app/src/components/ui/chat/chat-header.jsx (100%) rename src/components/ui/ChatWindow.jsx => web-app/src/components/ui/chat/chat-window.jsx (100%) rename src/components/ui/MessageInput.jsx => web-app/src/components/ui/chat/message-input.jsx (100%) rename {src => web-app/src}/styles/theme.css (100%) delete mode 100644 web-app/tailwind.config.js diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md deleted file mode 100644 index f0d2201..0000000 --- a/DEVELOPMENT.md +++ /dev/null @@ -1,117 +0,0 @@ -# CodeRED-Astra Development Guide - -## Project Structure - -This is a hackathon-ready project with a clean separation between frontend and backend: - -- **React Frontend** (`web-app/`): Modern React app with Vite and Tailwind CSS -- **Rust Engine** (`rust-engine/`): High-performance backend API server -- **Database**: MySQL 8.0 with phpMyAdmin for management - -## Quick Start - -### Prerequisites -- Docker & Docker Compose -- Node.js 20+ (for local development) -- Rust 1.82+ (for local development) - -### Development Setup - -1. **Clone and setup environment**: -```bash -cp .env.example .env -# Edit .env with your database passwords and API keys -``` - -2. **Start the entire stack**: -```bash -docker-compose up --build -``` - -3. **Access the application**: -- Frontend: http://localhost (port 80) -- Rust API: http://localhost:8000 -- phpMyAdmin: http://127.0.0.1:8080 - -### Local Development (Recommended for Hackathon) - -**Frontend Development**: -```bash -cd web-app -npm install -npm run dev # Starts on http://localhost:5173 -``` - -**Backend Development**: -```bash -cd rust-engine -cargo run # Starts on http://localhost:8000 -``` - -## Team Workflow - -### Frontend Team (React) -- Work in `web-app/src/` -- Main entry: `src/App.jsx` -- Add new components in `src/components/` -- API calls go through `/api/*` (auto-proxied to Rust engine) -- Use Tailwind CSS for styling -- Hot reload enabled with Vite - -### Backend Team (Rust) -- Work in `rust-engine/src/` -- Main server: `src/main.rs` -- Add new modules in `src/` -- API endpoints start with `/api/` -- Database connection via SQLx -- CORS enabled for frontend communication - -## API Communication - -The frontend communicates with the Rust engine via: -```javascript -// This automatically proxies to http://rust-engine:8000 in Docker -// or http://localhost:8000 in local development -fetch('/api/health') - .then(response => response.json()) - .then(data => console.log(data)); -``` - -## Database Schema - -Edit `rust-engine/src/main.rs` to add database migrations and models as needed. - -## Environment Variables - -Required in `.env`: -``` -MYSQL_DATABASE=astra -MYSQL_USER=astraadmin -MYSQL_PASSWORD=your_secure_password -MYSQL_ROOT_PASSWORD=your_root_password -GEMINI_API_KEY=your_gemini_key -``` - -## Deployment - -The project is containerized and ready for deployment: -- Frontend: Static files served via Vite preview -- Backend: Optimized Rust binary -- Database: Persistent MySQL data volume - -## Hackathon Tips - -1. **Frontend team**: Start with the existing App.jsx and build your UI components -2. **Backend team**: Add new API endpoints in the Rust main.rs file -3. **Database**: Use phpMyAdmin at http://127.0.0.1:8080 to manage data -4. **Testing**: The app shows connection status between frontend and backend -5. **Hot reload**: Both frontend and backend support hot reload during development - -## Common Issues - -- **CORS errors**: Already configured, but check Rust engine CORS settings if needed -- **Database connection**: Engine gracefully handles DB offline state for initial development -- **Port conflicts**: Web runs on 80, API on 8000, phpMyAdmin on 8080 -- **Build failures**: Check Node.js and Rust versions match requirements - -Happy hacking! šŸš€ \ No newline at end of file diff --git a/eslint.config.js b/eslint.config.js deleted file mode 100644 index 777fe18..0000000 --- a/eslint.config.js +++ /dev/null @@ -1,29 +0,0 @@ -import js from "@eslint/js"; -import globals from "globals"; -import 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}"], - extends: [ - js.configs.recommended, - reactHooks.configs["recommended-latest"], - reactRefresh.configs.vite, - ], - languageOptions: { - ecmaVersion: 2020, - globals: globals.browser, - parserOptions: { - ecmaVersion: "latest", - ecmaFeatures: { jsx: true }, - sourceType: "module", - }, - }, - rules: { - "no-unused-vars": ["error", { varsIgnorePattern: "^[A-Z_]" }], - }, - }, -]); diff --git a/package.json b/package.json deleted file mode 100644 index 198e9c6..0000000 --- a/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "codered-astra", - "private": true, - "scripts": { - "build": "vite build", - "dev": "vite", - "host": "vite host", - "format": "prettier --write \"**/*.{ts,tsx,md}\"", - "clean-dist": "find apps/ -type d -name 'dist' -print0 | xargs -r0 -- rm -r", - "clean-all": "find apps/ -type d -name 'dist' -print0 | xargs -r0 -- rm -r && find . -path ./node_modules -prune -o -name 'node_modules' | xargs rm -rf " - }, - "license": "ISC", - "dependencies": { - "@google/genai": "^1.25.0", - "@tailwindcss/postcss": "^4.1.14", - "@tailwindcss/vite": "^4.1.14", - "@vitejs/plugin-react": "^5.0.4", - "bootstrap": "^5.3.8", - "bootstrap-icons": "^1.13.1", - "cors": "^2.8.5", - "dotenv": "^17.2.3", - "express": "^5.1.0", - "helmet": "^8.1.0", - "lucide-react": "^0.546.0", - "pg": "^8.16.3", - "react": "^19.2.0", - "react-bootstrap": "^2.10.10", - "react-dom": "^19.2.0", - "react-router": "^7.9.4", - "react-router-dom": "^7.9.4", - "vite-jsconfig-paths": "^2.0.1" - }, - "packageManager": ">=npm@10.9.0", - "devDependencies": { - "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", - "nodemon": "^3.1.10", - "prettier": "^3.6.2", - "tailwindcss": "^4.1.14", - "vite": "^7.1.10" - } -} diff --git a/src/index.css b/src/index.css deleted file mode 100644 index 9895c36..0000000 --- a/src/index.css +++ /dev/null @@ -1,24 +0,0 @@ -@import "tailwindcss/preflight"; -@import "tailwindcss/utilities"; - -:root { - --color-primary: 15 40 98; - --color-secondary: 79 95 118; - --color-accent: 158 54 58; - --color-paragraph: 255 255 255; - --color-background: 9 31 54; -} - -body { - margin: 0; - background-color: rgb(var(--color-background)); - color: rgb(var(--color-paragraph)); - font-family: - ui-sans-serif, - system-ui, - -apple-system, - "Segoe UI", - Roboto, - "Helvetica Neue", - Arial; -} diff --git a/src/main.jsx b/src/main.jsx deleted file mode 100644 index e054df6..0000000 --- a/src/main.jsx +++ /dev/null @@ -1,10 +0,0 @@ -import { StrictMode } from "react"; -import { createRoot } from "react-dom/client"; -import "./index.css"; -import App from "./app/index.jsx"; - -createRoot(document.getElementById("root")).render( - - - -); diff --git a/vite.config.js b/vite.config.js deleted file mode 100644 index db0ad28..0000000 --- a/vite.config.js +++ /dev/null @@ -1,14 +0,0 @@ -import { defineConfig } from "vite"; -import react from "@vitejs/plugin-react"; -import jsconfigPaths from "vite-jsconfig-paths"; -import tailwindcss from "@tailwindcss/vite"; - -// https://vite.dev/config/ -export default defineConfig({ - plugins: [tailwindcss(), react(), jsconfigPaths()], - resolve: { - alias: { - src: "/src", - }, - }, -}); diff --git a/web-app/Dockerfile b/web-app/Dockerfile index 4d1e34d..a39f697 100644 --- a/web-app/Dockerfile +++ b/web-app/Dockerfile @@ -1,22 +1,15 @@ -# web-app/Dockerfile -FROM node:20-alpine +FROM node:23-alpine -WORKDIR /app +COPY . /codered-astra -# Copy package files first to leverage Docker's build cache -COPY package*.json ./ +WORKDIR /codered-astra -# Install dependencies -RUN npm ci --only=production=false +RUN npm i -# Copy the rest of your application code -COPY . . - -# Build the React application -RUN npm run build - -# Expose the port EXPOSE 3000 -# Use preview mode for production-like serving -CMD ["npm", "run", "preview"] \ No newline at end of file +RUN npm run format + +RUN npm run build + +CMD ["npm", "run", "host"] diff --git a/web-app/README.md b/web-app/README.md new file mode 100644 index 0000000..18bc70e --- /dev/null +++ b/web-app/README.md @@ -0,0 +1,16 @@ +# React + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + +## React Compiler + +The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project. diff --git a/web-app/eslint.config.js b/web-app/eslint.config.js index 777fe18..af876ec 100644 --- a/web-app/eslint.config.js +++ b/web-app/eslint.config.js @@ -1,7 +1,5 @@ import js from "@eslint/js"; import globals from "globals"; -import reactHooks from "eslint-plugin-react-hooks"; -import reactRefresh from "eslint-plugin-react-refresh"; import { defineConfig, globalIgnores } from "eslint/config"; export default defineConfig([ diff --git a/web-app/jsconfig.json b/web-app/jsconfig.json index 8fd87b4..c48ffbb 100644 --- a/web-app/jsconfig.json +++ b/web-app/jsconfig.json @@ -1,8 +1,6 @@ { "compilerOptions": { - "baseUrl": "web-app/src" + "baseUrl": "./" }, - "include": [ - "web-app/src" - ] + "include": ["src"] } diff --git a/web-app/package.json b/web-app/package.json index d275cee..198e9c6 100644 --- a/web-app/package.json +++ b/web-app/package.json @@ -1,37 +1,45 @@ { "name": "codered-astra", "private": true, - "type": "module", "scripts": { - "dev": "vite", "build": "vite build", - "preview": "vite preview", - "host": "vite --host 0.0.0.0 --port 3000", - "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", - "format": "prettier --write \"**/*.{js,jsx,md}\"" + "dev": "vite", + "host": "vite host", + "format": "prettier --write \"**/*.{ts,tsx,md}\"", + "clean-dist": "find apps/ -type d -name 'dist' -print0 | xargs -r0 -- rm -r", + "clean-all": "find apps/ -type d -name 'dist' -print0 | xargs -r0 -- rm -r && find . -path ./node_modules -prune -o -name 'node_modules' | xargs rm -rf " }, "license": "ISC", "dependencies": { - "@google/generative-ai": "^0.21.0", - "axios": "^1.7.7", + "@google/genai": "^1.25.0", + "@tailwindcss/postcss": "^4.1.14", + "@tailwindcss/vite": "^4.1.14", + "@vitejs/plugin-react": "^5.0.4", + "bootstrap": "^5.3.8", + "bootstrap-icons": "^1.13.1", + "cors": "^2.8.5", + "dotenv": "^17.2.3", + "express": "^5.1.0", + "helmet": "^8.1.0", "lucide-react": "^0.546.0", - "react": "^18.3.1", - "react-dom": "^18.3.1", - "react-router-dom": "^6.28.0" - }, - "devDependencies": { - "@types/react": "^18.3.12", - "@types/react-dom": "^18.3.1", - "@vitejs/plugin-react": "^4.3.3", - "autoprefixer": "^10.4.20", - "eslint": "^9.14.0", - "eslint-plugin-react": "^7.37.2", - "eslint-plugin-react-hooks": "^5.0.0", - "eslint-plugin-react-refresh": "^0.4.14", - "postcss": "^8.4.47", - "prettier": "^3.3.3", - "tailwindcss": "^3.4.14", - "vite": "^5.4.10", + "pg": "^8.16.3", + "react": "^19.2.0", + "react-bootstrap": "^2.10.10", + "react-dom": "^19.2.0", + "react-router": "^7.9.4", + "react-router-dom": "^7.9.4", "vite-jsconfig-paths": "^2.0.1" + }, + "packageManager": ">=npm@10.9.0", + "devDependencies": { + "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", + "nodemon": "^3.1.10", + "prettier": "^3.6.2", + "tailwindcss": "^4.1.14", + "vite": "^7.1.10" } } diff --git a/web-app/postcss.config.js b/web-app/postcss.config.js deleted file mode 100644 index e99ebc2..0000000 --- a/web-app/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} \ No newline at end of file diff --git a/web-app/src/App.jsx b/web-app/src/App.jsx deleted file mode 100644 index 7f203e5..0000000 --- a/web-app/src/App.jsx +++ /dev/null @@ -1,137 +0,0 @@ -import { useState, useEffect } from "react"; -import { Cpu, Database, Zap, Activity } from "lucide-react"; - -function App() { - const [engineStatus, setEngineStatus] = useState(null); - const [loading, setLoading] = useState(true); - - useEffect(() => { - checkEngineHealth(); - }, []); - - const checkEngineHealth = async () => { - try { - const response = await fetch('/api/health'); - const data = await response.json(); - setEngineStatus(data); - } catch (error) { - console.error('Engine health check failed:', error); - setEngineStatus({ success: false, message: 'Engine offline' }); - } finally { - setLoading(false); - } - }; - - return ( -
-
- {/* Header */} -
-
- -

- CodeRED-Astra -

-
-

- Hackathon Project - React Frontend + Rust Engine -

-
- - {/* Status Cards */} -
- {/* React App Status */} -
-
- -

React Frontend

-
-
āœ“ Online
-

- Vite + React development environment ready -

-
- - {/* Rust Engine Status */} -
-
- -

Rust Engine

-
-
- {loading ? 'ā³ Checking...' : engineStatus?.success ? 'āœ“ Online' : 'āœ— Offline'} -
-

- {loading ? 'Connecting to engine...' : - engineStatus?.success ? 'Engine responding normally' : - 'Engine may still be starting up'} -

-
-
- - {/* Engine Details */} - {engineStatus?.success && ( -
-
- -

Engine Status

-
-
-
- Status: - {engineStatus.data?.status} -
-
- Last Check: - - {engineStatus.data?.timestamp ? new Date(engineStatus.data.timestamp).toLocaleTimeString() : 'N/A'} - -
-
- {engineStatus.message && ( -
- {engineStatus.message} -
- )} -
- )} - - {/* Quick Actions */} -
-

Quick Actions

-
- - - -
-
- - {/* Development Notes */} -
-

šŸš€ Ready for hackathon development!

-

- Frontend team: Work in web-app/src/ | - Backend team: Work in rust-engine/src/ -

-
-
-
- ); -} - -export default App; diff --git a/src/app/index.jsx b/web-app/src/app/index.jsx similarity index 77% rename from src/app/index.jsx rename to web-app/src/app/index.jsx index 86327c4..9d0b576 100644 --- a/src/app/index.jsx +++ b/web-app/src/app/index.jsx @@ -1,5 +1,5 @@ import React from "react"; -import ChatLayout from "src/components/ui/ChatLayout"; +import ChatLayout from "src/components/layouts/chat-layout"; function App() { return ( diff --git a/src/components/ui/ChatLayout.jsx b/web-app/src/components/layouts/chat-layout.jsx similarity index 81% rename from src/components/ui/ChatLayout.jsx rename to web-app/src/components/layouts/chat-layout.jsx index 060c0cd..fbfb5f0 100644 --- a/src/components/ui/ChatLayout.jsx +++ b/web-app/src/components/layouts/chat-layout.jsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; -import ChatHeader from "./ChatHeader"; -import ChatWindow from "./ChatWindow"; -import MessageInput from "./MessageInput"; +import ChatHeader from "src/components/ui/chat/chat-header"; +import ChatWindow from "src/components/ui/chat/chat-window"; +import MessageInput from "src/components/ui/chat/message-input"; export default function ChatLayout() { const [messages, setMessages] = useState([ diff --git a/src/components/layouts/dashboard-layout.jsx b/web-app/src/components/layouts/dashboard-layout.jsx similarity index 100% rename from src/components/layouts/dashboard-layout.jsx rename to web-app/src/components/layouts/dashboard-layout.jsx diff --git a/src/components/ui/Button/DeleteButton.jsx b/web-app/src/components/ui/Button/DeleteButton.jsx similarity index 100% rename from src/components/ui/Button/DeleteButton.jsx rename to web-app/src/components/ui/Button/DeleteButton.jsx diff --git a/src/components/ui/Button/NewChatButton.css b/web-app/src/components/ui/Button/NewChatButton.css similarity index 100% rename from src/components/ui/Button/NewChatButton.css rename to web-app/src/components/ui/Button/NewChatButton.css diff --git a/src/components/ui/Button/NewChatButton.jsx b/web-app/src/components/ui/Button/NewChatButton.jsx similarity index 100% rename from src/components/ui/Button/NewChatButton.jsx rename to web-app/src/components/ui/Button/NewChatButton.jsx diff --git a/src/components/ui/ChatHeader.jsx b/web-app/src/components/ui/chat/chat-header.jsx similarity index 100% rename from src/components/ui/ChatHeader.jsx rename to web-app/src/components/ui/chat/chat-header.jsx diff --git a/src/components/ui/ChatWindow.jsx b/web-app/src/components/ui/chat/chat-window.jsx similarity index 100% rename from src/components/ui/ChatWindow.jsx rename to web-app/src/components/ui/chat/chat-window.jsx diff --git a/src/components/ui/MessageInput.jsx b/web-app/src/components/ui/chat/message-input.jsx similarity index 100% rename from src/components/ui/MessageInput.jsx rename to web-app/src/components/ui/chat/message-input.jsx diff --git a/web-app/src/index.css b/web-app/src/index.css index ec9640b..9895c36 100644 --- a/web-app/src/index.css +++ b/web-app/src/index.css @@ -1,33 +1,24 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; +@import "tailwindcss/preflight"; +@import "tailwindcss/utilities"; :root { - font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; - line-height: 1.5; - font-weight: 400; - color-scheme: dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; + --color-primary: 15 40 98; + --color-secondary: 79 95 118; + --color-accent: 158 54 58; + --color-paragraph: 255 255 255; + --color-background: 9 31 54; } body { margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -#root { - width: 100%; - margin: 0; -} - -code { - font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace; + background-color: rgb(var(--color-background)); + color: rgb(var(--color-paragraph)); + font-family: + ui-sans-serif, + system-ui, + -apple-system, + "Segoe UI", + Roboto, + "Helvetica Neue", + Arial; } diff --git a/src/styles/theme.css b/web-app/src/styles/theme.css similarity index 100% rename from src/styles/theme.css rename to web-app/src/styles/theme.css diff --git a/web-app/tailwind.config.js b/web-app/tailwind.config.js deleted file mode 100644 index 5b480dc..0000000 --- a/web-app/tailwind.config.js +++ /dev/null @@ -1,19 +0,0 @@ -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: ["./src/**/*.{js,ts,jsx,tsx}"], - theme: { - extend: { - colors: { - background: "rgba(var(--background))", - paragraph: "rgba(var(--paragraph))", - primary: "rgba(var(--primary))", - secondary: "rgba(var(--secondary))", - accent: "rgba(var(--accent))", - }, - flex: { - 0: "0 0 100%", - }, - }, - }, - plugins: [], -}; diff --git a/web-app/vite.config.js b/web-app/vite.config.js index 226be7d..db0ad28 100644 --- a/web-app/vite.config.js +++ b/web-app/vite.config.js @@ -1,26 +1,14 @@ import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import jsconfigPaths from "vite-jsconfig-paths"; +import tailwindcss from "@tailwindcss/vite"; // https://vite.dev/config/ export default defineConfig({ - plugins: [react(), jsconfigPaths()], - server: { - host: '0.0.0.0', - port: 3000, - proxy: { - '/api': { - target: process.env.RUST_ENGINE_URL || 'http://localhost:8000', - changeOrigin: true, - rewrite: (path) => path.replace(/^\/api/, '') - } - } + plugins: [tailwindcss(), react(), jsconfigPaths()], + resolve: { + alias: { + src: "/src", + }, }, - preview: { - host: '0.0.0.0', - port: 3000 - }, - build: { - outDir: 'dist' - } }); From 84ca283a0067f792c887257ba8f3929bdd97bbf1 Mon Sep 17 00:00:00 2001 From: devaine Date: Sat, 18 Oct 2025 17:21:36 -0500 Subject: [PATCH 16/17] fix(repo): shoud be fixed now --- DEVELOPMENT.md | 117 --------------- eslint.config.js | 29 ---- package.json | 45 ------ src/index.css | 24 --- src/main.jsx | 10 -- vite.config.js | 14 -- web-app/Dockerfile | 25 ++-- web-app/README.md | 16 ++ web-app/eslint.config.js | 2 - web-app/jsconfig.json | 6 +- web-app/package.json | 58 ++++---- web-app/postcss.config.js | 6 - web-app/src/App.jsx | 137 ------------------ {src => web-app/src}/app/index.jsx | 2 +- .../src/components/layouts/chat-layout.jsx | 6 +- .../components/layouts/dashboard-layout.jsx | 0 .../components/ui/Button/DeleteButton.jsx | 0 .../components/ui/Button/NewChatButton.css | 0 .../components/ui/Button/NewChatButton.jsx | 0 .../src/components/ui/chat/chat-header.jsx | 0 .../src/components/ui/chat/chat-window.jsx | 0 .../src/components/ui/chat/message-input.jsx | 0 web-app/src/index.css | 43 +++--- {src => web-app/src}/styles/theme.css | 0 web-app/tailwind.config.js | 19 --- web-app/vite.config.js | 24 +-- 26 files changed, 87 insertions(+), 496 deletions(-) delete mode 100644 DEVELOPMENT.md delete mode 100644 eslint.config.js delete mode 100644 package.json delete mode 100644 src/index.css delete mode 100644 src/main.jsx delete mode 100644 vite.config.js create mode 100644 web-app/README.md delete mode 100644 web-app/postcss.config.js delete mode 100644 web-app/src/App.jsx rename {src => web-app/src}/app/index.jsx (77%) rename src/components/ui/ChatLayout.jsx => web-app/src/components/layouts/chat-layout.jsx (81%) rename {src => web-app/src}/components/layouts/dashboard-layout.jsx (100%) rename {src => web-app/src}/components/ui/Button/DeleteButton.jsx (100%) rename {src => web-app/src}/components/ui/Button/NewChatButton.css (100%) rename {src => web-app/src}/components/ui/Button/NewChatButton.jsx (100%) rename src/components/ui/ChatHeader.jsx => web-app/src/components/ui/chat/chat-header.jsx (100%) rename src/components/ui/ChatWindow.jsx => web-app/src/components/ui/chat/chat-window.jsx (100%) rename src/components/ui/MessageInput.jsx => web-app/src/components/ui/chat/message-input.jsx (100%) rename {src => web-app/src}/styles/theme.css (100%) delete mode 100644 web-app/tailwind.config.js diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md deleted file mode 100644 index f0d2201..0000000 --- a/DEVELOPMENT.md +++ /dev/null @@ -1,117 +0,0 @@ -# CodeRED-Astra Development Guide - -## Project Structure - -This is a hackathon-ready project with a clean separation between frontend and backend: - -- **React Frontend** (`web-app/`): Modern React app with Vite and Tailwind CSS -- **Rust Engine** (`rust-engine/`): High-performance backend API server -- **Database**: MySQL 8.0 with phpMyAdmin for management - -## Quick Start - -### Prerequisites -- Docker & Docker Compose -- Node.js 20+ (for local development) -- Rust 1.82+ (for local development) - -### Development Setup - -1. **Clone and setup environment**: -```bash -cp .env.example .env -# Edit .env with your database passwords and API keys -``` - -2. **Start the entire stack**: -```bash -docker-compose up --build -``` - -3. **Access the application**: -- Frontend: http://localhost (port 80) -- Rust API: http://localhost:8000 -- phpMyAdmin: http://127.0.0.1:8080 - -### Local Development (Recommended for Hackathon) - -**Frontend Development**: -```bash -cd web-app -npm install -npm run dev # Starts on http://localhost:5173 -``` - -**Backend Development**: -```bash -cd rust-engine -cargo run # Starts on http://localhost:8000 -``` - -## Team Workflow - -### Frontend Team (React) -- Work in `web-app/src/` -- Main entry: `src/App.jsx` -- Add new components in `src/components/` -- API calls go through `/api/*` (auto-proxied to Rust engine) -- Use Tailwind CSS for styling -- Hot reload enabled with Vite - -### Backend Team (Rust) -- Work in `rust-engine/src/` -- Main server: `src/main.rs` -- Add new modules in `src/` -- API endpoints start with `/api/` -- Database connection via SQLx -- CORS enabled for frontend communication - -## API Communication - -The frontend communicates with the Rust engine via: -```javascript -// This automatically proxies to http://rust-engine:8000 in Docker -// or http://localhost:8000 in local development -fetch('/api/health') - .then(response => response.json()) - .then(data => console.log(data)); -``` - -## Database Schema - -Edit `rust-engine/src/main.rs` to add database migrations and models as needed. - -## Environment Variables - -Required in `.env`: -``` -MYSQL_DATABASE=astra -MYSQL_USER=astraadmin -MYSQL_PASSWORD=your_secure_password -MYSQL_ROOT_PASSWORD=your_root_password -GEMINI_API_KEY=your_gemini_key -``` - -## Deployment - -The project is containerized and ready for deployment: -- Frontend: Static files served via Vite preview -- Backend: Optimized Rust binary -- Database: Persistent MySQL data volume - -## Hackathon Tips - -1. **Frontend team**: Start with the existing App.jsx and build your UI components -2. **Backend team**: Add new API endpoints in the Rust main.rs file -3. **Database**: Use phpMyAdmin at http://127.0.0.1:8080 to manage data -4. **Testing**: The app shows connection status between frontend and backend -5. **Hot reload**: Both frontend and backend support hot reload during development - -## Common Issues - -- **CORS errors**: Already configured, but check Rust engine CORS settings if needed -- **Database connection**: Engine gracefully handles DB offline state for initial development -- **Port conflicts**: Web runs on 80, API on 8000, phpMyAdmin on 8080 -- **Build failures**: Check Node.js and Rust versions match requirements - -Happy hacking! šŸš€ \ No newline at end of file diff --git a/eslint.config.js b/eslint.config.js deleted file mode 100644 index 777fe18..0000000 --- a/eslint.config.js +++ /dev/null @@ -1,29 +0,0 @@ -import js from "@eslint/js"; -import globals from "globals"; -import 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}"], - extends: [ - js.configs.recommended, - reactHooks.configs["recommended-latest"], - reactRefresh.configs.vite, - ], - languageOptions: { - ecmaVersion: 2020, - globals: globals.browser, - parserOptions: { - ecmaVersion: "latest", - ecmaFeatures: { jsx: true }, - sourceType: "module", - }, - }, - rules: { - "no-unused-vars": ["error", { varsIgnorePattern: "^[A-Z_]" }], - }, - }, -]); diff --git a/package.json b/package.json deleted file mode 100644 index 198e9c6..0000000 --- a/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "codered-astra", - "private": true, - "scripts": { - "build": "vite build", - "dev": "vite", - "host": "vite host", - "format": "prettier --write \"**/*.{ts,tsx,md}\"", - "clean-dist": "find apps/ -type d -name 'dist' -print0 | xargs -r0 -- rm -r", - "clean-all": "find apps/ -type d -name 'dist' -print0 | xargs -r0 -- rm -r && find . -path ./node_modules -prune -o -name 'node_modules' | xargs rm -rf " - }, - "license": "ISC", - "dependencies": { - "@google/genai": "^1.25.0", - "@tailwindcss/postcss": "^4.1.14", - "@tailwindcss/vite": "^4.1.14", - "@vitejs/plugin-react": "^5.0.4", - "bootstrap": "^5.3.8", - "bootstrap-icons": "^1.13.1", - "cors": "^2.8.5", - "dotenv": "^17.2.3", - "express": "^5.1.0", - "helmet": "^8.1.0", - "lucide-react": "^0.546.0", - "pg": "^8.16.3", - "react": "^19.2.0", - "react-bootstrap": "^2.10.10", - "react-dom": "^19.2.0", - "react-router": "^7.9.4", - "react-router-dom": "^7.9.4", - "vite-jsconfig-paths": "^2.0.1" - }, - "packageManager": ">=npm@10.9.0", - "devDependencies": { - "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", - "nodemon": "^3.1.10", - "prettier": "^3.6.2", - "tailwindcss": "^4.1.14", - "vite": "^7.1.10" - } -} diff --git a/src/index.css b/src/index.css deleted file mode 100644 index 9895c36..0000000 --- a/src/index.css +++ /dev/null @@ -1,24 +0,0 @@ -@import "tailwindcss/preflight"; -@import "tailwindcss/utilities"; - -:root { - --color-primary: 15 40 98; - --color-secondary: 79 95 118; - --color-accent: 158 54 58; - --color-paragraph: 255 255 255; - --color-background: 9 31 54; -} - -body { - margin: 0; - background-color: rgb(var(--color-background)); - color: rgb(var(--color-paragraph)); - font-family: - ui-sans-serif, - system-ui, - -apple-system, - "Segoe UI", - Roboto, - "Helvetica Neue", - Arial; -} diff --git a/src/main.jsx b/src/main.jsx deleted file mode 100644 index e054df6..0000000 --- a/src/main.jsx +++ /dev/null @@ -1,10 +0,0 @@ -import { StrictMode } from "react"; -import { createRoot } from "react-dom/client"; -import "./index.css"; -import App from "./app/index.jsx"; - -createRoot(document.getElementById("root")).render( - - - -); diff --git a/vite.config.js b/vite.config.js deleted file mode 100644 index db0ad28..0000000 --- a/vite.config.js +++ /dev/null @@ -1,14 +0,0 @@ -import { defineConfig } from "vite"; -import react from "@vitejs/plugin-react"; -import jsconfigPaths from "vite-jsconfig-paths"; -import tailwindcss from "@tailwindcss/vite"; - -// https://vite.dev/config/ -export default defineConfig({ - plugins: [tailwindcss(), react(), jsconfigPaths()], - resolve: { - alias: { - src: "/src", - }, - }, -}); diff --git a/web-app/Dockerfile b/web-app/Dockerfile index 4d1e34d..a39f697 100644 --- a/web-app/Dockerfile +++ b/web-app/Dockerfile @@ -1,22 +1,15 @@ -# web-app/Dockerfile -FROM node:20-alpine +FROM node:23-alpine -WORKDIR /app +COPY . /codered-astra -# Copy package files first to leverage Docker's build cache -COPY package*.json ./ +WORKDIR /codered-astra -# Install dependencies -RUN npm ci --only=production=false +RUN npm i -# Copy the rest of your application code -COPY . . - -# Build the React application -RUN npm run build - -# Expose the port EXPOSE 3000 -# Use preview mode for production-like serving -CMD ["npm", "run", "preview"] \ No newline at end of file +RUN npm run format + +RUN npm run build + +CMD ["npm", "run", "host"] diff --git a/web-app/README.md b/web-app/README.md new file mode 100644 index 0000000..18bc70e --- /dev/null +++ b/web-app/README.md @@ -0,0 +1,16 @@ +# React + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + +## React Compiler + +The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project. diff --git a/web-app/eslint.config.js b/web-app/eslint.config.js index 777fe18..af876ec 100644 --- a/web-app/eslint.config.js +++ b/web-app/eslint.config.js @@ -1,7 +1,5 @@ import js from "@eslint/js"; import globals from "globals"; -import reactHooks from "eslint-plugin-react-hooks"; -import reactRefresh from "eslint-plugin-react-refresh"; import { defineConfig, globalIgnores } from "eslint/config"; export default defineConfig([ diff --git a/web-app/jsconfig.json b/web-app/jsconfig.json index 8fd87b4..c48ffbb 100644 --- a/web-app/jsconfig.json +++ b/web-app/jsconfig.json @@ -1,8 +1,6 @@ { "compilerOptions": { - "baseUrl": "web-app/src" + "baseUrl": "./" }, - "include": [ - "web-app/src" - ] + "include": ["src"] } diff --git a/web-app/package.json b/web-app/package.json index d275cee..198e9c6 100644 --- a/web-app/package.json +++ b/web-app/package.json @@ -1,37 +1,45 @@ { "name": "codered-astra", "private": true, - "type": "module", "scripts": { - "dev": "vite", "build": "vite build", - "preview": "vite preview", - "host": "vite --host 0.0.0.0 --port 3000", - "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", - "format": "prettier --write \"**/*.{js,jsx,md}\"" + "dev": "vite", + "host": "vite host", + "format": "prettier --write \"**/*.{ts,tsx,md}\"", + "clean-dist": "find apps/ -type d -name 'dist' -print0 | xargs -r0 -- rm -r", + "clean-all": "find apps/ -type d -name 'dist' -print0 | xargs -r0 -- rm -r && find . -path ./node_modules -prune -o -name 'node_modules' | xargs rm -rf " }, "license": "ISC", "dependencies": { - "@google/generative-ai": "^0.21.0", - "axios": "^1.7.7", + "@google/genai": "^1.25.0", + "@tailwindcss/postcss": "^4.1.14", + "@tailwindcss/vite": "^4.1.14", + "@vitejs/plugin-react": "^5.0.4", + "bootstrap": "^5.3.8", + "bootstrap-icons": "^1.13.1", + "cors": "^2.8.5", + "dotenv": "^17.2.3", + "express": "^5.1.0", + "helmet": "^8.1.0", "lucide-react": "^0.546.0", - "react": "^18.3.1", - "react-dom": "^18.3.1", - "react-router-dom": "^6.28.0" - }, - "devDependencies": { - "@types/react": "^18.3.12", - "@types/react-dom": "^18.3.1", - "@vitejs/plugin-react": "^4.3.3", - "autoprefixer": "^10.4.20", - "eslint": "^9.14.0", - "eslint-plugin-react": "^7.37.2", - "eslint-plugin-react-hooks": "^5.0.0", - "eslint-plugin-react-refresh": "^0.4.14", - "postcss": "^8.4.47", - "prettier": "^3.3.3", - "tailwindcss": "^3.4.14", - "vite": "^5.4.10", + "pg": "^8.16.3", + "react": "^19.2.0", + "react-bootstrap": "^2.10.10", + "react-dom": "^19.2.0", + "react-router": "^7.9.4", + "react-router-dom": "^7.9.4", "vite-jsconfig-paths": "^2.0.1" + }, + "packageManager": ">=npm@10.9.0", + "devDependencies": { + "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", + "nodemon": "^3.1.10", + "prettier": "^3.6.2", + "tailwindcss": "^4.1.14", + "vite": "^7.1.10" } } diff --git a/web-app/postcss.config.js b/web-app/postcss.config.js deleted file mode 100644 index e99ebc2..0000000 --- a/web-app/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} \ No newline at end of file diff --git a/web-app/src/App.jsx b/web-app/src/App.jsx deleted file mode 100644 index 7f203e5..0000000 --- a/web-app/src/App.jsx +++ /dev/null @@ -1,137 +0,0 @@ -import { useState, useEffect } from "react"; -import { Cpu, Database, Zap, Activity } from "lucide-react"; - -function App() { - const [engineStatus, setEngineStatus] = useState(null); - const [loading, setLoading] = useState(true); - - useEffect(() => { - checkEngineHealth(); - }, []); - - const checkEngineHealth = async () => { - try { - const response = await fetch('/api/health'); - const data = await response.json(); - setEngineStatus(data); - } catch (error) { - console.error('Engine health check failed:', error); - setEngineStatus({ success: false, message: 'Engine offline' }); - } finally { - setLoading(false); - } - }; - - return ( -
-
- {/* Header */} -
-
- -

- CodeRED-Astra -

-
-

- Hackathon Project - React Frontend + Rust Engine -

-
- - {/* Status Cards */} -
- {/* React App Status */} -
-
- -

React Frontend

-
-
āœ“ Online
-

- Vite + React development environment ready -

-
- - {/* Rust Engine Status */} -
-
- -

Rust Engine

-
-
- {loading ? 'ā³ Checking...' : engineStatus?.success ? 'āœ“ Online' : 'āœ— Offline'} -
-

- {loading ? 'Connecting to engine...' : - engineStatus?.success ? 'Engine responding normally' : - 'Engine may still be starting up'} -

-
-
- - {/* Engine Details */} - {engineStatus?.success && ( -
-
- -

Engine Status

-
-
-
- Status: - {engineStatus.data?.status} -
-
- Last Check: - - {engineStatus.data?.timestamp ? new Date(engineStatus.data.timestamp).toLocaleTimeString() : 'N/A'} - -
-
- {engineStatus.message && ( -
- {engineStatus.message} -
- )} -
- )} - - {/* Quick Actions */} -
-

Quick Actions

-
- - - -
-
- - {/* Development Notes */} -
-

šŸš€ Ready for hackathon development!

-

- Frontend team: Work in web-app/src/ | - Backend team: Work in rust-engine/src/ -

-
-
-
- ); -} - -export default App; diff --git a/src/app/index.jsx b/web-app/src/app/index.jsx similarity index 77% rename from src/app/index.jsx rename to web-app/src/app/index.jsx index 86327c4..9d0b576 100644 --- a/src/app/index.jsx +++ b/web-app/src/app/index.jsx @@ -1,5 +1,5 @@ import React from "react"; -import ChatLayout from "src/components/ui/ChatLayout"; +import ChatLayout from "src/components/layouts/chat-layout"; function App() { return ( diff --git a/src/components/ui/ChatLayout.jsx b/web-app/src/components/layouts/chat-layout.jsx similarity index 81% rename from src/components/ui/ChatLayout.jsx rename to web-app/src/components/layouts/chat-layout.jsx index 060c0cd..fbfb5f0 100644 --- a/src/components/ui/ChatLayout.jsx +++ b/web-app/src/components/layouts/chat-layout.jsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; -import ChatHeader from "./ChatHeader"; -import ChatWindow from "./ChatWindow"; -import MessageInput from "./MessageInput"; +import ChatHeader from "src/components/ui/chat/chat-header"; +import ChatWindow from "src/components/ui/chat/chat-window"; +import MessageInput from "src/components/ui/chat/message-input"; export default function ChatLayout() { const [messages, setMessages] = useState([ diff --git a/src/components/layouts/dashboard-layout.jsx b/web-app/src/components/layouts/dashboard-layout.jsx similarity index 100% rename from src/components/layouts/dashboard-layout.jsx rename to web-app/src/components/layouts/dashboard-layout.jsx diff --git a/src/components/ui/Button/DeleteButton.jsx b/web-app/src/components/ui/Button/DeleteButton.jsx similarity index 100% rename from src/components/ui/Button/DeleteButton.jsx rename to web-app/src/components/ui/Button/DeleteButton.jsx diff --git a/src/components/ui/Button/NewChatButton.css b/web-app/src/components/ui/Button/NewChatButton.css similarity index 100% rename from src/components/ui/Button/NewChatButton.css rename to web-app/src/components/ui/Button/NewChatButton.css diff --git a/src/components/ui/Button/NewChatButton.jsx b/web-app/src/components/ui/Button/NewChatButton.jsx similarity index 100% rename from src/components/ui/Button/NewChatButton.jsx rename to web-app/src/components/ui/Button/NewChatButton.jsx diff --git a/src/components/ui/ChatHeader.jsx b/web-app/src/components/ui/chat/chat-header.jsx similarity index 100% rename from src/components/ui/ChatHeader.jsx rename to web-app/src/components/ui/chat/chat-header.jsx diff --git a/src/components/ui/ChatWindow.jsx b/web-app/src/components/ui/chat/chat-window.jsx similarity index 100% rename from src/components/ui/ChatWindow.jsx rename to web-app/src/components/ui/chat/chat-window.jsx diff --git a/src/components/ui/MessageInput.jsx b/web-app/src/components/ui/chat/message-input.jsx similarity index 100% rename from src/components/ui/MessageInput.jsx rename to web-app/src/components/ui/chat/message-input.jsx diff --git a/web-app/src/index.css b/web-app/src/index.css index ec9640b..9895c36 100644 --- a/web-app/src/index.css +++ b/web-app/src/index.css @@ -1,33 +1,24 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; +@import "tailwindcss/preflight"; +@import "tailwindcss/utilities"; :root { - font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; - line-height: 1.5; - font-weight: 400; - color-scheme: dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; + --color-primary: 15 40 98; + --color-secondary: 79 95 118; + --color-accent: 158 54 58; + --color-paragraph: 255 255 255; + --color-background: 9 31 54; } body { margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -#root { - width: 100%; - margin: 0; -} - -code { - font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace; + background-color: rgb(var(--color-background)); + color: rgb(var(--color-paragraph)); + font-family: + ui-sans-serif, + system-ui, + -apple-system, + "Segoe UI", + Roboto, + "Helvetica Neue", + Arial; } diff --git a/src/styles/theme.css b/web-app/src/styles/theme.css similarity index 100% rename from src/styles/theme.css rename to web-app/src/styles/theme.css diff --git a/web-app/tailwind.config.js b/web-app/tailwind.config.js deleted file mode 100644 index 5b480dc..0000000 --- a/web-app/tailwind.config.js +++ /dev/null @@ -1,19 +0,0 @@ -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: ["./src/**/*.{js,ts,jsx,tsx}"], - theme: { - extend: { - colors: { - background: "rgba(var(--background))", - paragraph: "rgba(var(--paragraph))", - primary: "rgba(var(--primary))", - secondary: "rgba(var(--secondary))", - accent: "rgba(var(--accent))", - }, - flex: { - 0: "0 0 100%", - }, - }, - }, - plugins: [], -}; diff --git a/web-app/vite.config.js b/web-app/vite.config.js index 226be7d..db0ad28 100644 --- a/web-app/vite.config.js +++ b/web-app/vite.config.js @@ -1,26 +1,14 @@ import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import jsconfigPaths from "vite-jsconfig-paths"; +import tailwindcss from "@tailwindcss/vite"; // https://vite.dev/config/ export default defineConfig({ - plugins: [react(), jsconfigPaths()], - server: { - host: '0.0.0.0', - port: 3000, - proxy: { - '/api': { - target: process.env.RUST_ENGINE_URL || 'http://localhost:8000', - changeOrigin: true, - rewrite: (path) => path.replace(/^\/api/, '') - } - } + plugins: [tailwindcss(), react(), jsconfigPaths()], + resolve: { + alias: { + src: "/src", + }, }, - preview: { - host: '0.0.0.0', - port: 3000 - }, - build: { - outDir: 'dist' - } }); From cb9cff44215b6de81ed81ef2a1c6abe090fbf1b1 Mon Sep 17 00:00:00 2001 From: Christbru Date: Sat, 18 Oct 2025 17:39:47 -0500 Subject: [PATCH 17/17] Fixing automated build and deployment. Corrected outdated file structure and added build cache to the action. --- .github/workflows/build-and-deploy.yml | 36 +++++++------------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index c466eae..639087e 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -28,37 +28,30 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + # --- NEW STEP TO FIX THE CACHING ERROR --- + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 with: images: | - ghcr.io/${{ github.repository }}/frontend - ghcr.io/${{ github.repository }}/nodejs-backend + ghcr.io/${{ github.repository }}/web-app ghcr.io/${{ github.repository }}/rust-engine # --- Build and push one image for each service --- - - name: Build and push frontend image šŸš€ + - name: Build and push web-app image šŸš€ uses: docker/build-push-action@v6 with: - context: ./frontend + context: ./web-app push: true - tags: ${{ steps.meta.outputs.tags_frontend }} - labels: ${{ steps.meta.outputs.labels_frontend }} + tags: ${{ steps.meta.outputs.tags_web-app }} + labels: ${{ steps.meta.outputs.labels_web-app }} cache-from: type=gha cache-to: type=gha,mode=max - - name: Build and push Node.js backend image šŸš€ - uses: docker/build-push-action@v6 - with: - context: ./nodejs-backend - push: true - tags: ${{ steps.meta.outputs.tags_nodejs-backend }} - labels: ${{ steps.meta.outputs.labels_nodejs-backend }} - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Build and push Rust engine image šŸš€ + - name: Build and push Rust engine image āš™ļø uses: docker/build-push-action@v6 with: context: ./rust-engine @@ -76,21 +69,12 @@ jobs: username: ${{ secrets.SERVER_USERNAME }} key: ${{ secrets.SSH_PRIVATE_KEY }} script: | - # Navigate to your project directory on the server cd /var/www/codered-astra - - # Export secrets as environment variables for Docker Compose export GEMINI_API_KEY='${{ secrets.GEMINI_API_KEY }}' export MYSQL_DATABASE='${{ secrets.MYSQL_DATABASE }}' export MYSQL_USER='${{ secrets.MYSQL_USER }}' export MYSQL_PASSWORD='${{ secrets.MYSQL_PASSWORD }}' export MYSQL_ROOT_PASSWORD='${{ secrets.MYSQL_ROOT_PASSWORD }}' - - # Set the image tag to the specific commit SHA for a precise deployment export IMAGE_TAG=${{ github.sha }} - - # Pull the new images you just pushed to the registry docker-compose pull - - # Stop the old containers and start new ones with the updated images docker-compose up -d --force-recreate \ No newline at end of file