# PaperFormat **Repository Path**: HXHHJM/paper-format ## Basic Information - **Project Name**: PaperFormat - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-08 - **Last Updated**: 2026-04-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PaperFormat Master - 论文格式大师 基于深度技术调研的完整实现方案 ## 项目结构 ``` paper-format/ ├── backend/ # 后端服务 (FastAPI + python-docx) │ ├── app/ │ │ ├── api/ # API路由 │ │ │ ├── endpoints/ │ │ │ └── __init__.py │ │ ├── core/ # 核心配置 │ │ │ ├── config.py │ │ │ ├── celery_app.py │ │ │ └── database.py │ │ ├── models/ # 数据模型 │ │ │ ├── __init__.py │ │ │ ├── task.py │ │ │ └── template.py │ │ ├── schemas/ # Pydantic模型 │ │ │ ├── __init__.py │ │ │ ├── task.py │ │ │ └── template.py │ │ ├── services/ # 业务逻辑 │ │ │ ├── __init__.py │ │ │ ├── formatter.py # 核心格式化引擎 │ │ │ ├── task_manager.py │ │ │ └── ai_parser.py # AI解析 │ │ ├── tasks/ # Celery任务 │ │ │ ├── __init__.py │ │ │ └── document_tasks.py │ │ ├── utils/ # 工具函数 │ │ │ ├── __init__.py │ │ │ └── file_utils.py │ │ ├── main.py # 应用入口 │ │ └── __init__.py │ ├── tests/ # 测试 │ ├── requirements.txt │ ├── .env.example │ └── Dockerfile │ ├── frontend/ # 前端应用 (Vue3 + TS + Element Plus) │ ├── public/ │ ├── src/ │ │ ├── api/ # API接口 │ │ │ ├── index.ts │ │ │ ├── upload.ts │ │ │ ├── task.ts │ │ │ └── template.ts │ │ ├── assets/ # 静态资源 │ │ ├── components/ # 组件 │ │ │ ├── common/ # 通用组件 │ │ │ └── business/ # 业务组件 │ │ ├── composables/ # 组合式函数 │ │ │ ├── useUpload.ts │ │ │ ├── useTaskPolling.ts │ │ │ └── usePreview.ts │ │ ├── router/ # 路由配置 │ │ ├── stores/ # Pinia状态管理 │ │ ├── styles/ # 全局样式 │ │ ├── types/ # TypeScript类型 │ │ ├── views/ # 页面组件 │ │ │ ├── home/ │ │ │ ├── format/ │ │ │ ├── templates/ │ │ │ └── task/ │ │ ├── App.vue │ │ └── main.ts │ ├── index.html │ ├── package.json │ ├── tsconfig.json │ ├── vite.config.ts │ └── Dockerfile │ ├── docker-compose.yml # Docker部署配置 ├── README.md └── docs/ # 文档 ├── architecture.md ├── api.md └── deployment.md ``` ## 快速开始 ### 后端启动 ```bash cd backend pip install -r requirements.txt cp .env.example .env # 编辑 .env 文件配置数据库和Redis uvicorn app.main:app --reload ``` ### 前端启动 ```bash cd frontend npm install npm run dev ``` ### Docker部署 ```bash docker-compose up -d ``` ## 技术栈 - 后端: FastAPI + Python 3.12 + python-docx + Celery + Redis - 前端: Vue 3 + TypeScript + Element Plus + Vite - 数据库: PostgreSQL (元数据) + Redis (缓存/队列) - 存储: 本地存储/MinIO ## 功能特性 - [x] docx文件上传和解析 - [x] 结构化格式规则配置 - [x] 核心格式化引擎(字体、段落、标题) - [x] 目录自动生成 - [x] 图表自动编号 - [x] 异步任务处理 - [x] 任务状态轮询 - [ ] AI格式说明文档解析 - [ ] 模板市场 - [ ] 批量处理 - [ ] 在线预览 ## 开发计划 ### Phase 1: MVP (当前) - 文件上传 (.docx) - 基础格式化引擎 - 简单前端界面 ### Phase 2: 生产版本 - 异步任务队列 (Celery) - 完整格式配置 - 用户系统 ### Phase 3: 智能化 - AI解析格式说明 - 模板市场 - 批量处理 ## 参考资料 - 技术调研报告: `research_report_paperformat.md` - python-docx官方文档: https://python-docx.readthedocs.io/ - FastAPI官方文档: https://fastapi.tiangolo.com/