Skip to content

add backend skeleton#47

Open
xiaocheny214 wants to merge 1 commit into
1024XEngineer:mainfrom
xiaocheny214:feat/windup-backend
Open

add backend skeleton#47
xiaocheny214 wants to merge 1 commit into
1024XEngineer:mainfrom
xiaocheny214:feat/windup-backend

Conversation

@xiaocheny214

Copy link
Copy Markdown

背景

添加后端骨架

内容

    
backend/                          # uv workspace 根
  pyproject.toml                   # workspace 定义 + 根依赖
  packages/
    common/                        # 独立包 · 共享内核(无内部依赖)
      src/windup_common/
        enums/  exceptions/  constants/  utils/
        models/        # 跨层契约 DTO/VO (pydantic)
        result/        # 统一返回 / 分页包装

    framework/                     # 独立包 · 基础设施  -> 依赖 common
      src/windup_framework/
        config/        # pydantic-settings
        db/            # SQLAlchemy engine/session/Base (postgres)
        mq/            # RocketMQ producer/consumer 封装
        storage/       # 对象存储客户端 (MinIO/OSS/S3)
        httpx_client/  # 外部 HTTP 客户端
        search/        # 外部检索客户端(SERPAPI 等)
        auth/          # JWT / 租户鉴权
        providers/     # AI 模型底层适配器(文本/图像/视频/embedding/抠图) behind interfaces
        logging/

    ai_engine/                     # 独立包 · 资产生产引擎  -> 依赖 common+framework,暴露 ports
      src/windup_ai_engine/
        ports/         # 对外接口 + callback ports(server/framework 实现,注入)
        graph/         # langgraph 图:节点 / 边 / 条件路由 / 反射 / 规划
        strategy/      # DerivationStrategy: SpriteSheetStrategy / VideoFrameStrategy
        postprocess/   # 抠图 / 背景去除 / 调色
        slicing/       # 精灵图集切帧、按动作×方向组织
        prompt/        # prompt 模板结构 + 渲染(运行时变量由入参注入)
        impl/          # CharacterGenerator 实现:装配 graph + ports,跑图

    app/                           # 应用包  -> 依赖 common/framework/ai_engine
      src/windup_app/
        server/        # 业务领域:租户 / 角色 / 生成任务 / 资产 / 样本 / 配额
          tenant/  character/  generation/  asset/  sample/  quota/
        web/           # FastAPI 表现层
          api/         # routers
          schemas/     # 请求/响应 schema(面向前端)
          middleware/  # 鉴权 / 租户上下文 / 异常处理
          sse/         # SSE/WS 进度推送
        worker/        # RocketMQ 消费入口
        bootstrap/     # 装配:create_app、依赖注入、路由挂载、port 实现绑定
  tests/

变更范围

  • 新增后端骨架包含代码部分

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No high-confidence issues found in the current PR diff.

Validation: git diff --check and Python bytecode compilation passed. pytest/uv could not be run because neither tool is installed in the review environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant