Files
ss-tools/specs/001-plugin-arch-svelte-ui/tasks.md
busya 2d8cae563f feat: implement plugin architecture and application settings with Svelte UI
- Added plugin base and loader for backend extensibility
- Implemented application settings management with config persistence
- Created Svelte-based frontend with Dashboard and Settings pages
- Added API routes for plugins, tasks, and settings
- Updated documentation and specifications
- Improved project structure and developer tools
2025-12-20 20:48:18 +03:00

4.0 KiB
Executable File

Tasks: Plugin Architecture & Svelte Web UI

Feature: 001-plugin-arch-svelte-ui Status: Planned

Dependencies

  1. Phase 1 (Setup): Must be completed first to establish the environment.
  2. Phase 2 (Foundational): Implements the core Plugin system and Backend infrastructure required by all User Stories.
  3. Phase 3 (US1): Web Interface depends on the Backend API and Plugin system.
  4. Phase 4 (US2): Dynamic Plugin System extends the core infrastructure.

Parallel Execution Opportunities

  • US1 (Frontend): Frontend components (T013-T016) can be developed in parallel with Backend API endpoints (T011-T012) once the API contract is finalized.
  • US2 (Plugins): Plugin development (T019-T020) can proceed independently once the Plugin Interface (T005) is stable.

Phase 1: Setup

Goal: Initialize the project structure and development environment for Backend (Python/FastAPI) and Frontend (Svelte/Vite).

  • T001 Create backend directory structure (src/api, src/core, src/plugins) in backend/
  • T002 Create frontend directory structure using Vite (Svelte template) in frontend/
  • T003 Configure Python environment (requirements.txt with FastAPI, Uvicorn, Pydantic) in backend/requirements.txt
  • T004 Configure Frontend environment (package.json with TailwindCSS) in frontend/package.json

Phase 2: Foundational (Core Infrastructure)

Goal: Implement the core Plugin interface, Task management system, and basic Backend server.

  • T005 [P] Define PluginBase abstract class and Pydantic models in backend/src/core/plugin_base.py
  • T006 [P] Implement PluginLoader to scan and load plugins from directory in backend/src/core/plugin_loader.py
  • T007 Implement TaskManager to handle async task execution and state in backend/src/core/task_manager.py
  • T008 [P] Implement Logger with WebSocket streaming support in backend/src/core/logger.py
  • T009 Create basic FastAPI application entry point with CORS in backend/src/app.py
  • T010 [P] Implement ADFS Authentication middleware in backend/src/api/auth.py

Phase 3: User Story 1 - Web Interface (Priority: P1)

Goal: Enable users to interact with tools via a web dashboard. Independent Test: Launch web server, navigate to dashboard, run a dummy task, view logs.

  • T011 [US1] Implement REST API endpoints for Plugin listing (GET /plugins) in backend/src/api/routes/plugins.py
  • T012 [US1] Implement REST API endpoints for Task management (POST /tasks, GET /tasks/{id}) in backend/src/api/routes/tasks.py
  • T013 [P] [US1] Create Svelte store for Plugin and Task state in frontend/src/lib/stores.js
  • T014 [P] [US1] Create Dashboard page component listing available tools in frontend/src/pages/Dashboard.svelte
  • T015 [P] [US1] Create TaskRunner component with real-time log viewer (WebSocket) in frontend/src/components/TaskRunner.svelte
  • T016 [US1] Integrate Frontend with Backend API using fetch client in frontend/src/lib/api.js

Phase 4: User Story 2 - Dynamic Plugin System (Priority: P2)

Goal: Allow developers to add new functionality by dropping files. Independent Test: Add hello_world.py to plugins dir, verify it appears in UI.

  • T017 [US2] Implement dynamic form generation component based on JSON Schema in frontend/src/components/DynamicForm.svelte
  • T018 [US2] Update PluginLoader to validate plugin schema on load in backend/src/core/plugin_loader.py
  • T019 [P] [US2] Refactor existing backup_script.py into a Plugin (BackupPlugin) in backend/src/plugins/backup.py
  • T020 [P] [US2] Refactor existing migration_script.py into a Plugin (MigrationPlugin) in backend/src/plugins/migration.py

Final Phase: Polish

Goal: Ensure production readiness.

  • T021 Add error handling and user notifications (Toasts) in Frontend
  • T022 Write documentation for Plugin Development in docs/plugin_dev.md
  • T023 Final integration test: Run full Backup and Migration flow via UI