MCPcopy Index your code
hub / github.com/HelTi/daily-hot-api

github.com/HelTi/daily-hot-api @v2.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.0 ↗ · + Follow
498 symbols 950 edges 109 files 35 documented · 7%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Docker 快速启动

一键启动

# 启动所有服务(应用 + MongoDB + Redis)
./start-with-mongodb.sh

# 或者直接使用 docker-compose
docker-compose up -d

服务说明

  • 应用: http://localhost:6689
  • MongoDB: localhost:27017 (无密码)
  • Redis: localhost:6380

常用命令

# 查看服务状态
docker-compose ps

# 查看日志
docker-compose logs -f

# 停止服务
docker-compose down

# 重启服务
docker-compose restart

环境变量

Docker Compose 会自动配置以下环境变量:

  • MONGODB_URI=mongodb://mongodb:27017/daily-hot-api
  • REDIS_HOST=redis
  • REDIS_PORT=6379
  • SCHEDULER_AUTO_START=true
  • SCHEDULER_CRON_EXPRESSION=0 */12 * * *

数据持久化

  • MongoDB 数据保存在 mongodb_data 卷中
  • Redis 数据保存在 redis_data 卷中

连接数据库

# 连接 MongoDB
docker-compose exec mongodb mongosh daily-hot-api

# 查看数据
show collections
db.hot_items.find().limit(5)

Extension points exported contracts — how you extend this code

HotListSource (Interface)
(no doc) [112 implementers]
src/host-lists/interfaces/hot-list-source.interface.ts
FetchResult (Interface)
(no doc)
src/scheduler/tasks/fetch-hot-data.task.ts
CurrentDateTime (Interface)
(no doc)
src/utils/getTime.ts
BaseHttpRequestOptions (Interface)
(no doc)
src/http/http.service.ts
SearchHistoryOptions (Interface)
(no doc)
src/database/repositories/hot-item.repository.ts
EncodedKeys (Interface)
(no doc)
src/token/token.service.ts
SmzdmApiResponse (Interface)
(no doc)
src/host-lists/sources/smzdm.source.ts
HttpGetOptions (Interface)
(no doc)
src/http/http.service.ts

Core symbols most depended-on inside this repo

HotSource
called by 56
src/host-lists/decorators/hot-source.decorator.ts
getTime
called by 36
src/utils/getTime.ts
set
called by 24
src/cache/cache.service.ts
get
called by 15
src/cache/cache.service.ts
get
called by 7
src/http/http.service.ts
del
called by 6
src/cache/cache.service.ts
pad
called by 5
src/utils/getTime.ts
execute
called by 4
src/scheduler/tasks/fetch-hot-data.task.ts

Shape

Method 241
Class 184
Interface 52
Function 21

Languages

TypeScript100%

Modules by API surface

src/http/http.service.ts19 symbols
src/scheduler/scheduler.service.ts18 symbols
src/token/token.service.ts13 symbols
src/database/repositories/hot-item.repository.ts13 symbols
src/cache/cache.service.ts12 symbols
src/scheduler/tasks/fetch-hot-data.task.ts11 symbols
src/scheduler/scheduler.controller.ts11 symbols
src/database/repositories/source-config.repository.ts11 symbols
src/host-lists/sources/weibo.source.ts9 symbols
src/history/history.service.ts9 symbols
src/history/history.controller.ts9 symbols
src/host-lists/sources/zhihu.source.ts8 symbols

Datastores touched

(mongodb)Database · 1 repos
daily-hot-apiDatabase · 1 repos

For agents

$ claude mcp add daily-hot-api \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page