How rachelos/we-mp-rss works
Project Type and Purpose
• Full-stack web application with front-end (Vue 3 + Vite) and back-end (Python + FastAPI), packaged via Docker.
• Purpose: scrape WeChat Official Account content, generate RSS feeds, expose APIs, provide a web UI for managing subscriptions, tasks, exports, and notifications.
File Structure
• Top level:
• Dockerfiles / compose: container definitions and orchestration.
• config.example.yaml / config.yaml: runtime and DB configuration.
• main.py / web.py: entry points for backend service.
• apis/: FastAPI route handlers.
• core/: business logic (scraping, parsing, models, scheduling).
• driver/: pluggable scraping drivers interfacing with WeChat.
• jobs/: scheduled tasks modules.
• static/ + web_ui/: frontend assets and source code.
• Patterns:
• Front-end / back-end separation.
• Core modules separated into models, queue, tasks, notifications, YAML-backed store.
• Driver plugin pattern for different scraping methods.
• Notifications under core/notice and via webhooks.
• Scheduler via core/thread and jobs/*.
Confirm Architecture from README
• “Front-end and back-end separation”
• Backend: FastAPI; Frontend: Vue 3 + Vite.
• Database: SQLite (default) or MySQL.
• Scheduled tasks for scraping and content updates.
• Notification channels (WeChat, DingTalk, Feishu, custom).
• Export features (md/docx/pdf/json).
Main Components & Interactions
a. Components to include:
• Browser / Client Application (Vue UI)
• Front-end Server (static assets served, if separate)
• API Gateway (FastAPI / Uvicorn)
• Business Logic Layer:
• apis/ (route handlers)
• core/ (services: scraping, parsing, RSS generation, export)
• driver/ (WeChat drivers)
• jobs/ (scheduled job definitions)
• Scheduler / Thread Pool (core/thread)
• Database (SQLite/MySQL)
• Cache / File Storage (./data/cache, ./data/db.db)
• External Services:
• WeChat Official Account endpoints
• RSS clients / subscribers
• Notification Webhooks (DingTalk, Feishu, WeChat, custom)
• Docker Host / Orchestration (docker-compose)
b. Relationships:
• UI ↔ API Gateway via HTTP/REST.
• API Gateway invokes Business Logic modules.
• Business Logic reads/writes to Database and Cache.
• Scheduler triggers jobs which call drivers and core services.
• Drivers interact with External WeChat services.
• Generated RSS feeds are stored and served via API endpoints.
• Notification modules push to external webhook URLs.
c. Architectural Patterns:
• Layered architecture: Presentation → API → Service → Data.
• Plugin pattern for scraping drivers and notification channels.
• Asynchronous/ threaded scheduling for periodic jobs.
• Front-end/back-end separation.
• Configuration via YAML / environment variables.
d. Key Technologies:
• Python 3.13 (FastAPI, SQLAlchemy or similar ORM, Pydantic)
• Vue 3 + Vite (TypeScript)
• Docker / docker-compose
• SQLite / MySQL
• Celery-style scheduler implemented in core/thread
Detail
• Core modules: apis/, core/models, core/rss, core/task, core/notice, driver/.
• Config layer feeding into API and Services.
• Docker network or compose services as a boundary.
• Periodic vs. on-demand flows (cron vs. user API calls).