Web app built with Next.js and TypeScript to display trending hot news from multiple sources (抖音, B 站, 网易新闻) in a beautiful, responsive card UI.
- Multiple News Sources: Douyin, Bilibili, and 163 News (网易新闻) with easy source switching and prominent, icon-labeled tabs.
- Unified Card Layout: Each news card shows title, rank (with frosted badge), views, likes, comments, cover image, hot value, event date, recommendation reason, and location.
- Backend Normalization: All sources normalized to a unified structure for easy extension.
- Image Proxy: Handles hotlinking issues (esp. Bilibili) for reliable image display.
- Error Handling & Deduplication: Robust fallback logic for missing/invalid data, deduplication, and user-friendly error messages.
- Extensible & Modular: Easily add new sources or card fields.
- Production Ready: Clean, maintainable codebase with CI/CD support.
yarn install
yarn dev
Then open http://localhost:3000 in your browser.
- Push to GitLab: triggers auto-deploy via
.gitlab-ci.yml
- Standard Next.js build:
yarn build && yarn start
- Add new sources in
lib/sources/
and corresponding API routes inpages/api/
. - Update card UI in
components/NewsCard.tsx
. - Utilities for formatting are in
lib/
. - PRs and suggestions welcome!
- nvm setup
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
nvm install v22.16.0