How chenphxx/phxxblog works
phxxblog is a personal blog with a Vue reader/admin interface and a FastAPI backend. Visitors browse published posts, archives, search, comments, and diary entries; signed-in users and administrators manage content and site features. The backend assembles module routes, applies authentication and permissions, and persists domain data in MySQL. The README documents the frontend-to-backend development proxy; some feature-specific wiring is not shown in the sampled excerpts, so those connections are omitted or marked unverified.
Main entry points: database.py MySQL persistence · router.py Post management · main.py FastAPI entry · App.vue Blog interface
Components 24
Web interface
- Blog interface
frontend/src/App.vue - Page routing
frontend/src/router/index.ts - API client
frontend/src/api/index.ts
API runtime
- FastAPI entry
backend/app/main.py - Module routing
backend/app/modules/router.py - Feature registry
backend/app/modules/registry.py - Identity and access
backend/app/core/deps.py - MySQL persistence
backend/app/core/database.py
Content features
- Post management
backend/app/modules/posts/router.py - Post queries
backend/app/services/post_query.py - Diary management
backend/app/modules/diary/router.py - Archive import
backend/app/services/import_pipeline.py - Comments
backend/app/modules/comments/router.py - Categories and tags
backend/app/modules/taxonomy - Search
backend/app/modules/search - Media uploads
backend/app/modules/media
Administration
- Analytics and stats
backend/app/modules/stats/router.py - Admin dashboard
backend/app/modules/dashboard/router.py - Site settings
backend/app/modules/settings/router.py - Feature controls
backend/app/modules/modules/router.py - RSS and SEO
backend/app/modules/rss - Operation logs
backend/app/services/log.py
Other components
- Visitor
- Administrator
Connections 25
- Visitor → Blog interface: browses
README.md - Administrator → Blog interface: manages site
README.md - Blog interface → Page routing: loads routes
frontend/src/main.ts - Blog interface → API client: requests data
- API client → FastAPI entry: calls API
- FastAPI entry → Module routing: mounts routes
backend/app/main.py - FastAPI entry → Feature registry: builds registry
backend/app/main.py - Module routing → Feature registry: uses registry
backend/app/modules/router.py - FastAPI entry → MySQL persistence: checks schema
backend/app/main.py - Post management → Post queries: queries posts
backend/app/modules/posts/router.py - Post management → MySQL persistence: reads and writes
backend/app/modules/posts/router.py - Post management → Archive import: imports archives
backend/app/modules/posts/router.py - Diary management → Archive import: imports diaries
backend/app/modules/diary/router.py - Archive import → Operation logs: records imports
backend/app/services/import_pipeline.py - Comments → MySQL persistence: reads and writes
backend/app/modules/comments/router.py - Analytics and stats → MySQL persistence: queries metrics
backend/app/modules/stats/router.py - Admin dashboard → Analytics and stats: displays trends
- Feature controls → Feature registry: manages features
backend/app/modules/modules/router.py - Post management → Operation logs: logs actions
backend/app/modules/posts/router.py - Diary management → MySQL persistence: reads and writes
backend/app/modules/diary/router.py - Categories and tags → MySQL persistence: stores taxonomy
- Search → MySQL persistence: searches content
- Media uploads → MySQL persistence: tracks media
- Site settings → MySQL persistence: stores settings
- RSS and SEO → MySQL persistence: publishes content