Go to file
公司git ecccdbc84d fix(config): 修正支付宝回调地址去除端口号
- 删除支付宝回调地址中的端口号2010
- 修正支付成功跳转地址ALIPAY_RETURN_URL
- 修正支付异步通知地址ALIPAY_NOTIFY_URL
2026-01-23 15:06:23 +08:00
.agent/workflows feat: Initialize UI/UX Pro Max agent with core data, stack definitions, and utility scripts. 2026-01-18 20:35:35 +08:00
.shared/ui-ux-pro-max feat: Initialize UI/UX Pro Max agent with core data, stack definitions, and utility scripts. 2026-01-18 20:35:35 +08:00
blueprints fix(payment): 同步回调中处理订单状态,防止异步延迟 2026-01-23 15:00:34 +08:00
middlewares feat: Implement core application structure with new services, blueprints, templates, and database migrations. 2026-01-17 23:15:58 +08:00
migrations feat: Implement core application structure with new services, blueprints, templates, and database migrations. 2026-01-17 23:15:58 +08:00
services Merge branch 'main' of http://331002.xyz:8418/240241002/ai_v 2026-01-21 19:32:09 +08:00
static feat: Implement a new API blueprint for core application functionalities including generation, history, notifications, user stats, and saved prompts, along with a new SavedPrompt model and supporting frontend. 2026-01-21 20:43:46 +08:00
templates feat: Implement a new API blueprint for core application functionalities including generation, history, notifications, user stats, and saved prompts, along with a new SavedPrompt model and supporting frontend. 2026-01-21 20:43:46 +08:00
.gitignore feat: Implement a comprehensive user authentication system, add video generation capabilities, and set up database migrations and API blueprints. 2026-01-16 22:24:14 +08:00
app.py feat: Implement user history retrieval and MinIO file proxy with updated public URL configuration. 2026-01-21 19:32:02 +08:00
config.py fix(config): 修正支付宝回调地址去除端口号 2026-01-23 15:06:23 +08:00
db_manager.py feat: Implement core application structure with new services, blueprints, templates, and database migrations. 2026-01-17 23:15:58 +08:00
extensions.py feat: Implement a comprehensive user authentication system, add video generation capabilities, and set up database migrations and API blueprints. 2026-01-16 22:24:14 +08:00
models.py feat: Implement a new API blueprint for core application functionalities including generation, history, notifications, user stats, and saved prompts, along with a new SavedPrompt model and supporting frontend. 2026-01-21 20:43:46 +08:00
README.md feat: implement core API and generation services for AI image, video, and chat functionalities, user history, and point management. 2026-01-20 09:29:01 +08:00
requirements.txt feat: Implement a comprehensive user authentication system, add video generation capabilities, and set up database migrations and API blueprints. 2026-01-16 22:24:14 +08:00

AI 视界 (AI Vision) 项目指南

🚀 快速开始

1. 环境准备

确保已安装 Python 3.8+ 和 PostgreSQL / Redis。

创建虚拟环境

# 如果 python 命令不可用,请尝试使用 py
python -m venv .venv
# 或者
py -m venv .venv

激活虚拟环境 (推荐)

# Windows (PowerShell)
.\.venv\Scripts\Activate.ps1

# Linux / Mac
source .venv/bin/activate

安装依赖

pip install -r requirements.txt

2. 启动服务

python app.py

服务默认运行在 http://127.0.0.1:5000


🛠️ 常用维护命令

数据库管理 (推荐)

本项目内置了自动化数据库管理工具 db_manager.py,用于处理模型变更和迁移。

一键自动同步 (最常用) 当您修改了 models.py 中的表结构后,运行此命令自动完成迁移:

python db_manager.py sync

分步操作 如果您需要更精细的控制:

  • 初始化环境 (仅首次): python db_manager.py init
  • 生成迁移脚本: python db_manager.py make "修改说明"
  • 执行数据库变更: python db_manager.py up

系统配置更新

AI 模型、提示词模板等配置已移至数据库的 system_dicts 表中。

  • 请登录 Web 后台管理界面 (/rbac) 进行可视化的添加和修改。
  • 或直接操作数据库更新 system_dicts 表。

📂 目录结构说明

  • app.py: 应用入口
  • config.py: 配置文件
  • models.py: 数据库模型定义
  • blueprints/: 路由蓝图 (API 接口)
    • api.py: 核心业务接口 (Controller)
    • admin.py: 后台管理接口
    • auth.py: 认证接口
  • services/: 业务逻辑层 (Service)
    • task_service.py: 异步任务处理 (生图/视频)
    • generation_service.py: 生成请求验证与计费
    • system_service.py: 系统配置与通知
    • history_service.py: 历史记录查询
  • templates/: 前端 HTML 模板
  • static/: 静态资源 (JS/CSS)