Перейти к содержимому

Architecture

Understand how the AI Workflow Framework is structured and how components interact.

Architecture Overview

The framework follows a layered architecture with clear separation of concerns:

Text
┌─────────────────────────────────────────────────────────────┐
│                      PRESENTATION LAYER                      │
│  Portal Wizards │ Backend Views │ API Endpoints │ Docs      │
├─────────────────────────────────────────────────────────────┤
│                      WORKFLOW LAYER                          │
│  Website │ Ebook │ Course │ Survey │ Video │ Custom...      │
├─────────────────────────────────────────────────────────────┤
│                      CORE ENGINE                             │
│  Templates │ Stages │ Tasks │ Queue │ Approvals │ Contracts │
├─────────────────────────────────────────────────────────────┤
│                      AI PROVIDER LAYER                       │
│  OpenAI │ Anthropic │ Custom Providers │ Rate Limiting      │
├─────────────────────────────────────────────────────────────┤
│                      ODOO PLATFORM                           │
│  ORM │ Security │ Website │ Project │ Queue Job             │
└─────────────────────────────────────────────────────────────┘

Module Layers

Layer 1: Core Framework

Module Purpose
ai_project_workflow Core workflow engine, templates, stages, task processing
ai_project_workflow_portal Portal interface, wizards, documentation
ai_project_workflow_api REST API endpoints for external integrations

Layer 2: Workflow Implementations

Module Purpose
ai_workflow_website Website creation workflow
ai_workflow_ebook_creator Ebook creation workflow
ai_workflow_course Course creation workflow
ai_workflow_survey Survey creation workflow
ai_workflow_video_creator Video creation workflow

Core Models

Text
ai.project.template          # Defines workflow structure
    └── ai.project.stage     # Individual stages in workflow
        └── ai.template      # AI prompt templates

ai.provider                  # AI provider configuration (OpenAI, etc.)

project.project              # Extended with AI workflow fields
    └── project.task         # Extended with AI processing states

See the API Reference for complete model documentation.

Execution Flow

Text
1. User creates project (Portal/Backend)
         ↓
2. System loads template & stages
         ↓
3. First stage executes (Discovery)
         ↓
4. AI Provider called via queue job
         ↓
5. Result stored, stage advances
         ↓
6. If approval required → Wait for user
         ↓
7. User approves → Next stage
         ↓
8. Repeat until complete