Skip to content

一个简约无广,专注新闻的聚合体,完美适配Web端,手机端,《今日时事》为您实时聚合各大平台最新资讯,按时间序列 展示热点新闻动态,包含头条、百度、知乎、哔哩哔哩、豆瓣、微博、贴吧、汽车之家、虎扑、Github、抖音、懂车帝等各种消息,给您提供极致的专注阅读的信息流体验!

License

Notifications You must be signed in to change notification settings

tlwzzy/what-happen

 
 

Repository files navigation

What Happen

A Modern And Minimalist News Aggregation Platform

Stay informed with real-time news from multiple sources

简体中文 | English

License: MIT Vue 3 Nuxt4 TypeScript Vite


Screenshots

浅色模式 深色模式 hot finance tech favorites

Overview

《What Happen》 is a comprehensive news aggregation platform that brings together information from multiple popular sources including social media, tech news, financial markets, and entertainment. Built with modern web technologies, it provides a clean, intuitive interface for staying updated with what's happening around the world.

Key Features

  • Multi-Platform Aggregation: Integrates news from 30+ platforms including Weibo, GitHub, Douban, Bilibili, and more
  • Smart Categorization: Organized content across Technology, Finance, Social Media, Entertainment, and Sports
  • Real-time Updates: Live data synchronization with automatic refresh capabilities
  • Responsive Design: Optimized for desktop and mobile viewing experiences
  • Dark/Light Theme: Seamless theme switching for comfortable reading
  • Favorites System: Save and organize your preferred news sources and articles
  • Interactive Components: Rich interactive elements including hover cards and detailed views
  • Drag & Drop: Customizable layout with draggable news cards
  • Search & Filter: Advanced filtering options for personalized content discovery

Supported Platforms

Social Media & Hot Topics

  • Weibo Hot Search
  • Baidu Hot Search
  • Douyin Trending
  • Zhihu Hot
  • Kuaishou Hot

Technology & Development

  • GitHub Trending
  • V2EX Latest
  • IT Home News
  • Solidot Updates
  • 36Kr Tech News
  • Juejin Articles

Finance & Markets

  • Wall Street CN
  • Hot Stock Updates
  • JinShi Live
  • Market Analysis

Entertainment & Media

  • Douban Movies/TV
  • Bilibili Hot Videos
  • Music Charts (KuGou, QQ Music)
  • Gaming (LOL Esports)

News & Information

  • The Paper News
  • Reference News
  • People's Daily
  • Sputnik News CN

Tech Stack

  • Frontend Framework: Nuxt 4 + TypeScript
  • Build Tool: Vite 6.x
  • Styling: TailwindCSS 4.x
  • UI Components: Reka UI (shadcn/ui for Vue)
  • State Management: Vue Composition API + Pinia-like composables
  • Animations: GSAP + TailwindCSS animations
  • Icons: Lucide Vue Next
  • Date Handling: Day.js
  • Drag & Drop: Vue Draggable Plus
  • Notifications: Vue Sonner

Quick Start

Prerequisites

  • Node.js 18+
  • Yarn 1.22+ (recommended) or npm

Installation

  1. Clone the repository

    git clone https://github.com/LYX9527/what-happen.git
    cd what-happen
  2. Install dependencies

    yarn install
    # or
    npm install
  3. Environment setup

    # Copy environment template
    cp .env.example .env
    
    # Configure API endpoint (default: http://localhost:10010)
    VITE_API_BASE_URL=http://localhost:10010
  4. Start development server

    yarn dev
    # or
    npm run dev
  5. Open your browser Navigate to http://localhost:5173

Run with Docker

If you prefer running with Docker:

git clone https://github.com/LYX9527/what-happen
cd what-happen/docker
# If you have docker-compose installed or the docker compose plugin installed
docker-compose up -d # or docker compose up -d
# If neither is installed
docker run -d --name what-happen-app --restart always -p 3001:3000 yltfspace/what-happen
# Access the app at http://localhost:3001

Building for Production

# Build for production
yarn build

# Preview production build
yarn preview

API Requirements

This frontend application requires a backend API service running on port 10010 (configurable). The API should provide:

  • GET /platforms - Available news platforms configuration
  • GET /news - News data with platform filtering support

Expected API Response Format

interface NewsItem {
  id: string
  title: string
  url: string
  extra?: {
    info?: string
    time?: string
    rank?: number
    thumbnail?: { url: string }
    // ... additional metadata
  }
}

interface ApiResponse<T> {
  code: number
  msg: string
  data: T
}

Configuration

Environment Variables

# API Configuration
VITE_API_BASE_URL=http://localhost:10010  # Backend API URL

Customizing News Sources

Edit app/pages/dashboard/index.vue to modify platform configurations:

const platformIcons = {
  weibo: WeiBo,
  github: Github,
  // Add your custom platforms
}

Development

Project Structure

app/
├── api/           # API interfaces and configuration
├── components/    # Reusable Vue components
│   ├── ui/        # Base UI components
│   ├── NewsItems/ # News item components
│   └── icon/      # Platform icon components
├── composables/   # Vue composition functions
├── pages/         # Application pages
├── router/        # Vue Router configuration
└── lib/           # Utility functions

Adding New News Sources

  1. Create platform icon component in app/components/icon/
  2. Add platform configuration in dashboard
  3. Create custom news item component if needed in app/components/NewsItems/
  4. Update API integration in app/api/news.ts

Component Guidelines

  • Use TypeScript for type safety
  • Follow Vue 3 Composition API patterns
  • Implement responsive design with TailwindCSS
  • Maintain consistent styling with existing components

Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Acknowledgments

  • Thanks to all the news platforms for providing public APIs
  • Built with love using Vue 3 and modern web technologies
  • Inspired by the need for a unified news reading experience

Changelog

Version 1.0.0(Current)

  • Support for 30+ news platforms
  • Responsive design and dark mode
  • Favorites and filtering system
  • Real-time updates

For detailed changelog, see CHANGELOG.md


Made with ❤️ by the What Happen Team

Stay informed, stay connected

About

一个简约无广,专注新闻的聚合体,完美适配Web端,手机端,《今日时事》为您实时聚合各大平台最新资讯,按时间序列 展示热点新闻动态,包含头条、百度、知乎、哔哩哔哩、豆瓣、微博、贴吧、汽车之家、虎扑、Github、抖音、懂车帝等各种消息,给您提供极致的专注阅读的信息流体验!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vue 89.8%
  • TypeScript 9.3%
  • Other 0.9%