Update from task c4549c58-25aa-4aad-a102-bde08323a5fe - #1
Open
guyue55 wants to merge 4 commits into
Open
Conversation
- **新增**: `REFACTOR_PLAN.md` - 详细记录重构目标、技术栈升级与分阶段实施步骤 - **新增**: `pyproject.toml` - 使用 Poetry 管理依赖,集成类型检查、格式化与测试配置 - **新增**: `src/soulbook/` 目录结构 - 按功能分层(API、模型、服务、数据库、爬虫等),实现清晰的模块化设计 - **新增**: `src/soulbook/api/v1/*.py` - 实现基于 FastAPI 的版本化路由,支持认证、小说管理与用户接口 - **新增**: `src/soulbook/models/*.py` - 使用 SQLAlchemy 2.0 定义异步数据模型,包含用户、小说与书签关系 - **新增**: `src/soulbook/schemas/*.py` - 基于 Pydantic v2 定义请求/响应模式,提供完整类型提示与验证 - **新增**: `src/soulbook/database/crud/*.py` - 分离业务逻辑,实现统一的 CRUD 操作与事务管理 - **新增**: `src/soulbook/utils/security.py` - 提供密码哈希、JWT 认证与令牌生成能力 - **修改**: `.gitignore` - 更新忽略规则,适配 Poetry 与现代 Python 工具链 - **修改**: `README.md` - 更新项目说明,突出现代化技术栈与重构价值 整体实现从旧有 Sanic + MongoDB 架构向 FastAPI + SQLAlchemy + PostgreSQL 的现代化迁移,显著提升代码可维护性、类型安全与测试覆盖率。
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…lementation **Key features implemented:** - Added Alembic configuration and migration environment for database schema management - Implemented data migration script to transfer user and novel data from MongoDB to PostgreSQL - Created database initialization script to set up tables and sample data - Developed base crawler interface with retry mechanism and error handling - Implemented Qidian and Zongheng crawlers with search, novel info, chapter list, and content extraction - Built comprehensive service layer with CRUD operations for users, novels, bookmarks, and recommendations - Added integration tests for API endpoints and unit tests for models and services - Enhanced .gitignore to exclude database files, virtual environments, and test coverage artifacts **Summary:** The core backend infrastructure is now fully functional with complete database migration, robust crawling capabilities, comprehensive service layer, and thorough test coverage. The system is ready for Docker deployment and can handle user authentication, novel management, and content discovery.
- Added new file: test.txt with content "测试" - Updated .gitignore to exclude common build, log, and temporary files (no changes needed for test.txt as it's not a build artifact) The addition of test.txt supports basic verification workflows, while the .gitignore remains optimized for excluding unnecessary artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was created by qwen-chat coder for task c4549c58-25aa-4aad-a102-bde08323a5fe.