PulseHub is a modern React-based social media hot topics aggregation platform that collects and displays trending topics from multiple Chinese platforms in real-time. Built with TypeScript and Vite, it provides a clean, responsive interface for monitoring hot topics across Weibo, Douyin, Bilibili, Zhihu, Baidu, and Toutiao.
- π₯ Real-time Hot Topics Aggregation - Collect trending topics from 6 major Chinese platforms
- π¨ Modern UI Design - Features glassmorphism effects with gradient backgrounds and smooth animations
- π±οΈ Drag & Drop Sorting - Reorder platform cards with intuitive drag and drop functionality
- π Independent Refresh - Each platform card can refresh data independently
- π± Fully Responsive - Optimized for desktop, tablet, and mobile devices
- π Pure Frontend Application - No backend required, direct API calls from user's browser
- β‘ Fast Performance - Built with Vite for optimal build speed and development experience
- π Smart URL Generation - Automatic link generation to search pages for each platform
- π Aggregated View - Cross-platform hot topics detection and display
- React 18 - Modern UI framework
- TypeScript - Type safety
- Vite - Fast build tool
- Tailwind CSS - Atomic CSS framework
- 60s API - Real-time hot topics aggregation service (https://60s.viki.moe)
- Direct API Calls - No proxy required, using user's IP for requests
- CORS-enabled - Cross-origin requests handled properly
- Node.js 18+
- npm or yarn
- Clone the project
git clone https://github.com/fullstackjam/pulsehub.git
cd pulsehub
- Install dependencies
npm install
- Start development server
npm run dev
- Access the application
- Application: http://localhost:3000
- The development server will automatically reload when you make changes
- Build Docker image
npm run docker:build
- Run Docker container
# Run in foreground
npm run docker:run
# Run in background
docker run -d -p 80:80 --name pulsehub pulsehub
- Access the application
- Application URL: http://localhost
- Build for production
npm run build
- Deploy to any static hosting service
- Vercel:
vercel --prod
- Netlify: Drag and drop the
dist
folder - GitHub Pages: Push the built files to gh-pages branch
- Any web server: Serve the
dist
folder
- Deploy using Helm
# Create namespace
kubectl create namespace pulsehub
# Deploy application
helm install pulsehub ./helm/pulsehub -n pulsehub
# Check deployment status
kubectl get pods -n pulsehub
- Access the application
- Application URL: https://pulsehub.fullstackjam.com
PulseHub/
βββ src/ # Source code
β βββ components/ # React components
β β βββ Dashboard.tsx # Main dashboard component with drag & drop
β β βββ PlatformCard.tsx # Individual platform card component
β βββ services/ # API services
β β βββ api.ts # 60s API integration and data transformation
β βββ types/ # TypeScript type definitions
β β βββ index.ts # Type definitions for platforms and topics
β βββ App.tsx # Main application component and platform config
β βββ main.tsx # React application entry point
β βββ index.css # Global styles with custom animations
βββ dist/ # Built files for production (generated)
βββ helm/ # Kubernetes Helm Charts
β βββ pulsehub/
β βββ templates/ # Kubernetes deployment templates
β β βββ deployment.yaml
β β βββ service.yaml
β β βββ ingress.yaml
β βββ Chart.yaml # Helm chart metadata
β βββ values.yaml # Default configuration values
β βββ README.md # Helm deployment documentation
βββ package.json # Dependencies and npm scripts
βββ vite.config.ts # Vite build configuration
βββ tailwind.config.js # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ Dockerfile # Multi-stage Docker build file
βββ README.md # This documentation
Main configuration in vite.config.ts
:
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
server: {
port: 3000,
host: true
}
})
Main configuration in tailwind.config.js
:
export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {
// Custom theme extensions
},
},
plugins: [],
}
- Weibo Hot Search - Real-time trending topics from China's largest microblogging platform
- Douyin Hot List - Short video platform hotspots and viral content
- Bilibili Hot List - Video platform popular content and trending topics
- Zhihu Hot List - Knowledge Q&A platform trending discussions
- Baidu Hot Search - Search engine trending queries and topics
- Toutiao Hot List - News and information platform trending articles
- Aggregated Hot Topics - Cross-platform trending topics that appear on multiple platforms
- Update API Service
// src/services/api.ts
static async fetchPlatformData(platform: string): Promise<PlatformResponse> {
const endpointMap: Record<string, string> = {
// ... existing endpoints
newplatform: '/v2/newplatform', // Add new endpoint
};
const endpoint = endpointMap[platform];
if (!endpoint) {
throw new Error(`Platform ${platform} is not supported by the API`);
}
const data = await this.fetchFrom60sAPI(endpoint);
return this.transformData(platform, data);
}
- Update Platform Configuration
// src/App.tsx
const PLATFORM_CONFIG = [
// ... existing configuration
{
platform: 'newplatform',
displayName: 'New Platform Hot List',
icon: 'N',
color: '#ff6b35'
}
];
- Update URL Template
// src/services/api.ts
const urlTemplates: Record<string, string> = {
// ... existing templates
newplatform: 'https://newplatform.com/search?q={query}',
};
The project uses Tailwind CSS, you can customize styles by modifying src/index.css
:
/* Custom card styles */
.custom-card {
@apply rounded-2xl shadow-xl border border-white/20;
@apply hover:shadow-2xl hover:scale-105 transition-all duration-500;
}
PulseHub includes a complete Helm chart for Kubernetes deployment with the following features:
- Kubernetes cluster (1.19+)
- Helm 3.x
- Nginx Ingress Controller
- cert-manager (for TLS certificates)
- external-dns (for DNS management)
- ArgoCD (for GitOps deployment)
The Helm chart includes comprehensive annotations for external access:
annotations:
# Nginx Ingress Controller
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
nginx.ingress.kubernetes.io/proxy-body-size: "1m"
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/cors-allow-origin: "*"
# External DNS for Cloudflare Tunnel
external-dns.alpha.kubernetes.io/target: "homelab-tunnel.fullstackjam.com"
external-dns.alpha.kubernetes.io/cloudflare-proxied: "true"
# Certificate management
cert-manager.io/cluster-issuer: "letsencrypt-prod"
# ArgoCD sync
argocd.argoproj.io/sync-wave: "1"
# Install with Helm
helm install pulsehub ./helm/pulsehub --namespace pulsehub --create-namespace
# Upgrade deployment
helm upgrade pulsehub ./helm/pulsehub --namespace pulsehub
# Uninstall
helm uninstall pulsehub --namespace pulsehub
- Vercel - One-click deployment from GitHub
- Netlify - Drag and drop deployment or Git integration
- GitHub Pages - Free hosting for public repositories
- Cloudflare Pages - Fast global CDN
- Firebase Hosting - Google's hosting platform
- π Pure Frontend Architecture - No backend dependency, direct API calls
- β‘ 60s API Integration - Real-time data from https://60s.viki.moe
- π― Simplified Deployment - Deploy to any static hosting service
- π§ Improved Performance - Optimized build with Vite and code splitting
- π οΈ TypeScript Migration - Full type safety and better development experience
- π¨ Enhanced UI - Glassmorphism design with smooth animations
- π Cross-platform Analysis - Aggregated hot topics across multiple platforms
- π±οΈ Drag & Drop Interface - Intuitive platform card reordering
- π Independent Refresh - Per-platform data refresh functionality
- React 18 with TypeScript
- Vite build system for fast development and optimized production builds
- Tailwind CSS for responsive design
- Docker containerization with multi-stage builds
- Kubernetes Helm chart for production deployment
- CORS-enabled API integration
- Smart URL generation for each platform
- Responsive design for all device sizes
- Fork the project
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details
- fullstackjam - Initial development - GitHub
- Thanks to all contributors of open source projects
- Thanks to all platforms for providing public APIs
- Thanks to the community for support and feedback
PulseHub - Making hot topics accessible π₯