Skip to content

frntn/weavyai-models

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weavy.ai Models

Static page for publishing the Weavy.ai model catalog on GitHub Pages.

Structure

  • data/models.json – single source of truth for the data, editable through Pull Requests.
  • wasm/table_utils – Rust utilities compiled to WebAssembly (prefix matching and credit parsing).
  • src/ – HTML/CSS/JS template for the interface.
  • scripts/build.js – Node script that injects the data and copies assets into docs/.
  • docs/ – build output produced locally or by CI; ignored from version control.

Updating the data

  1. Edit or add entries in data/models.json following the structure { "id", "type", "name", "credits", "comment" }.
  2. Keep credit values as strings (numeric conversion happens via WASM).
  3. Open a Pull Request.

Building the page locally

# Compile the WebAssembly module (requires the wasm32-unknown-unknown target)
cargo build --release --target wasm32-unknown-unknown --manifest-path wasm/table_utils/Cargo.toml

# Generate the static output in docs/
npm run build

The build step injects data into docs/index.html, copies the JS/CSS bundle and .wasm output, and publishes a copy of models.json under docs/data/.

Automated deployment

  • Workflow: .github/workflows/deploy.yml.
  • Triggers: push on main or manual workflow_dispatch.
  • Steps: checkout → install Rust (with wasm32-unknown-unknown) → install Node → build the WASM crate from wasm/table_utilsnpm run build → upload docs/ as the Pages artifact → deploy via actions/deploy-pages.
  • GitHub Pages must be configured to use the GitHub Actions source (Settings → Pages → Build and deployment).

Once configured, each push to main rebuilds the site and publishes it automatically without committing generated files.

UI features

  • Sorting by clicking each column header.
  • Inline prefix filters per column, powered by WebAssembly for case-insensitive matching.
  • Light / dark theme toggle persisted locally.
  • Language toggle (FR / EN) with live translations.
  • Responsive layout showing the total number of entries and the build timestamp.