Initial AlphaPulse implementation: news crawler and Binance klines

- Backend (FastAPI, SQLAlchemy 2, Alembic): single-admin cookie auth,
  news/crawler/market APIs with SSE and WebSocket streaming
- Crawler (Scrapy + Scrapy-Redis): wscn_news, wscn_live, cls_depth,
  cls_telegraph spiders, idempotent upserts with revisions, raw response
  archiving, per-source subprocess supervision, restart and backoff
- Market worker: full-history Binance spot/USD-M kline backfill,
  realtime WS stream, hourly and on-reconnect catch-up
- Frontend (Vue 3, Element Plus, UnoCSS, KLineChart): news feed,
  crawler console with live logs, Binance-style chart page
- Deploy: docker compose, nginx site, migrate and daily backup scripts
This commit is contained in:
eezd committed 2026-10-13 13:32:55 +08:00
commit aabc81ba5b
88 files changed
+12603

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
import { createRouter, createWebHistory } from "vue-router"
import Layout from "@/layouts/index.vue"
import { useUserStore } from "@/pinia/user"
export const menuRoutes = [
{ path: "/news", name: "news", component: () => import("@/pages/news/index.vue"), meta: { title: "新闻流" } },
{ path: "/crawler", name: "crawler", component: () => import("@/pages/crawler/index.vue"), meta: { title: "采集控制台" } },
{ path: "/market", name: "market", component: () => import("@/pages/market/index.vue"), meta: { title: "行情" } }
]
export const router = createRouter({
history: createWebHistory(),
routes: [
{ path: "/login", name: "login", component: () => import("@/pages/login/index.vue") },
{ path: "/", component: Layout, redirect: "/news", children: menuRoutes },
{ path: "/:pathMatch(.*)*", redirect: "/" }
]
})
router.beforeEach(async (to) => {
if (to.name === "login")
return true
const userStore = useUserStore()
if (!userStore.username) {
try {
await userStore.fetchMe()
} catch {
return { name: "login", query: { redirect: to.fullPath } }
}
}
return true
})