Commit Graph

9 Commits

Author SHA1 Message Date
Mavis
3ebf280278 fix: pipeline INSERT 去掉不存在的 translate_to 字段 2026-06-07 23:32:13 +08:00
Mavis
30acd6af54 fix: create_user 默认 role=owner(而非 member) 2026-06-07 23:27:52 +08:00
Mavis
ce903ac58e fix: 修剩余的 (await ...)).scalar_one_or_none() 链式 + bookmark 2026-06-07 23:25:53 +08:00
Mavis
5109d6f824 fix: API 全部改用显式两步走 await session.execute + result.scalars()
之前 (await ...).scalars() 链式在 SQLAlchemy 2.0 async 下报
'coroutine' has no attribute 'scalars' 错误。改为先 await 拿 result
再 .scalars(),这是 SQLAlchemy 2.0 推荐的 async 写法。
2026-06-07 23:22:56 +08:00
Mavis
2e75985a3c fix: healthz 路径改成 /api/v1/healthz(归到 API 前缀下) 2026-06-07 23:15:33 +08:00
Mavis
eaa4aa6604 fix: Caddy 用 handle_path 自动 strip /api 前缀
之前的 reverse_proxy /api/* 直接转发保留路径,导致 api 收到 /api/v1/articles
而实际路由是 /v1/articles(API_PREFIX)。改用 handle_path。
2026-06-07 23:13:51 +08:00
Mavis
6635b8fea8 fix: enum 写入 PG 用 value 而非 name
Source/SourceKind、UserRole、SubscriptionMatch 三个 enum 改用 values_callable
保证 PG 看到 'rss' / 'owner' / 'any' 等小写 value,而非 'RSS' 大写 name。
seed_sources 同步改为显式字符串。
2026-06-07 23:11:32 +08:00
Mavis
427e1f5cf2 fix: 前端类型修复(@types/node + vite-env.d.ts + ufw SSHD_PORT)
- frontend: 加 @types/node / vite/client 类型声明
- frontend: tsconfig 加 types: [node, vite/client]
- scripts: deploy_remote.sh 用 sg docker + dc() 函数避免引号问题
- scripts: deploy_remote.sh ufw 改用 \ 变量
2026-06-07 23:04:06 +08:00
Mavis
60b062daf2 feat: initial MVP - FastAPI backend + Vue3 frontend + docker-compose
- backend: FastAPI + SQLAlchemy 2.0(async) + asyncpg + Alembic
- 7 API routes: auth/me/articles/sources/bookmarks/subscriptions/admin
- models: User/Source/Article/Bookmark/Subscription/ApiToken
- services: RSS fetcher (feedparser) + Tencent TMT translator with quota + cache + local NLLB fallback
- workers: APScheduler + asyncio pipeline (fetch -> dedupe -> insert -> translate)
- seed scripts: create_user, seed_sources (5 RSS: Reuters/BBC/Al Jazeera/NHK/DW)
- frontend: Vue 3 + Vite + Naive UI + Pinia + vue-router
- pages: Login, Feed (24h), ArticleDetail, Sources, Bookmarks, AdminSources
- deploy: docker-compose (postgres/redis/api/worker/frontend/caddy)
- docs: README, DEPLOY, architecture, acceptance
2026-06-07 21:51:01 +08:00