@@ -15,17 +15,28 @@ This sets up a Python virtual environment, installs dependencies with Tsinghua m
1515cd backend/src && python main.py
1616```
1717
18+ ** Frontend Development:**
19+ ``` bash
20+ cd webui && pnpm install && pnpm run dev # Development server
21+ cd webui && pnpm run build # Production build
22+ ./build-frontend.sh # Build and move to backend/src/dist
23+ ```
24+
1825** Linting and Formatting:**
1926``` bash
2027cd backend && ./venv/bin/ruff check .
2128cd backend && ./venv/bin/ruff format .
2229cd backend && ./venv/bin/black .
30+ cd webui && pnpm run lint # Frontend linting
31+ cd webui && pnpm run format # Frontend formatting
2332```
2433
2534** Testing:**
2635``` bash
2736cd backend && ./venv/bin/pytest
2837cd backend && ./venv/bin/pytest test/test_specific_module.py # Run specific test
38+ cd webui && pnpm run test # Frontend tests
39+ cd webui && pnpm run test:build # TypeScript type checking
2940```
3041
3142## Architecture
@@ -36,9 +47,9 @@ Auto_Bangumi is an RSS-based automatic anime downloading and organization tool w
3647- ` main.py ` : FastAPI application entry point with poster serving and static file mounting
3748- ` module/core/ ` : Core async application framework
3849 - ` aiocore.py ` : AsyncApplicationCore manages service lifecycle and task scheduling
39- - ` services.py ` : BaseService abstract class and service implementations (RSS, Download, Renamer)
50+ - ` services/ ` : Service implementations extending BaseService (RSS, Download, Renamer)
51+ - ` monitors/ ` : Background monitors for downloads, notifications, and renaming
4052 - ` task_manager.py ` : TaskManager handles async task scheduling and execution
41- - ` events.py ` : Event system for inter-service communication
4253- ` module/api/ ` : REST API endpoints organized by feature (auth, bangumi, config, etc.)
4354- ` module/parser/ ` : Content parsing system for RSS feeds, torrents, and metadata
4455- ` module/downloader/ ` : Download client abstractions (qBittorrent, Aria2, Transmission)
@@ -48,9 +59,12 @@ Auto_Bangumi is an RSS-based automatic anime downloading and organization tool w
4859- ` module/network/ ` : HTTP client abstractions with proxy and caching support
4960
5061** Frontend Structure (Vue.js + TypeScript):**
51- - Located in ` webui/ ` with standard Vue project structure
62+ - Located in ` webui/ ` with Vite build system
63+ - Uses UnoCSS for styling, Naive UI for components
64+ - Auto-import configuration for Vue Composition API
5265- API client in ` src/api/ ` matching backend endpoints
53- - Component-based UI with reusable elements in ` src/components/ `
66+ - Pinia for state management
67+ - Vue Router with file-based routing
5468
5569** Key Data Flow:**
56701 . RSS feeds are parsed and analyzed for anime information
@@ -65,8 +79,22 @@ The application uses an async service-based architecture where:
6579- AsyncApplicationCore manages service lifecycle
6680- TaskManager schedules periodic service execution
6781- Services communicate via events system
82+ - Monitors handle background tasks like download tracking
6883
6984** Configuration:**
7085- Main config in ` config/config.json `
7186- Search providers in ` config/search_provider.json `
72- - Environment variables for runtime settings
87+ - Environment variables for runtime settings
88+
89+ ## Development Guidelines
90+
91+ ** Branch Strategy:**
92+ - ` main ` : Stable releases only
93+ - ` <version>-dev ` : Development branches for each minor version (e.g., ` 3.1-dev ` )
94+ - Bug fixes go to current version dev branch
95+ - New features go to next version dev branch
96+
97+ ** Code Style:**
98+ - Backend: Ruff + Black formatting, Python 3.10+ target
99+ - Frontend: ESLint + Prettier, TypeScript strict mode
100+ - Pre-commit hooks enforce formatting
0 commit comments