Files
ss-tools/specs/001-plugin-arch-svelte-ui/quickstart.md
2025-12-19 22:40:28 +03:00

1019 B

Quickstart: Plugin Architecture & Svelte Web UI

Prerequisites

  • Python 3.9+
  • Node.js 18+
  • npm or pnpm

Setup

  1. Install Backend Dependencies:

    cd backend
    python -m venv venv
    source venv/bin/activate  # or venv\Scripts\activate on Windows
    pip install -r requirements.txt
    
  2. Install Frontend Dependencies:

    cd frontend
    npm install
    

Running the Application

  1. Start Backend Server:

    # From backend/ directory
    uvicorn src.app:app --reload --port 8000
    
  2. Start Frontend Dev Server:

    # From frontend/ directory
    npm run dev
    
  3. Access the UI: Open http://localhost:5173 in your browser.

Adding a Plugin

  1. Create a new Python file in backend/src/plugins/ (e.g., my_plugin.py).
  2. Define your plugin class inheriting from PluginBase.
  3. Implement execute and get_schema methods.
  4. Restart the backend (or rely on auto-reload).
  5. Your plugin should appear in the Web UI.