Your premier destination for quality journalism, breaking news, and in-depth stories β powered by real-time APIs.
- Overview
- Screenshots
- Tech Stack
- API Integrations
- Project Structure
- Core Features
- Getting Started
- Privacy & Data
- Roadmap
- Developer
Headline is a modern, API-driven news aggregation platform that combines journalistic excellence with cutting-edge web technology. All articles are dynamically fetched from trusted third-party APIs, ensuring content is always fresh, diverse, and accurate.
Key highlights:
- π Global coverage β news from thousands of sources via NewsData.io
- π Market data β real-time financial news powered by Finnhub
- π€ AI-enhanced reading β clean article extraction via Jina AI Reader
- π¨ Premium UX β dark/light themes, customizable reading settings, skeleton loaders
- π Privacy-first β fully client-side, no user data collected or stored
Disclaimer: Headline operates as a demonstration news platform. All articles and content are fetched from third-party APIs to illustrate the platform's capabilities. We do not claim ownership or editorial control over the displayed content.
| Category | Tools & Libraries |
|---|---|
| Core Framework | React 19.2.0, TypeScript 5.9.3, Vite 7.3.1 |
| Styling | Tailwind CSS 4.1.18, shadcn/ui, Radix UI Primitives |
| Data Fetching | TanStack React Query 5.90 |
| Routing | React Router 7.13 |
| Animations | Motion 12.34 |
| Content Parsing | @mozilla/readability, DOMPurify, react-markdown |
| HTTP Client | Axios 1.13 |
| UI & Components | Lucide React Icons, Embla Carousel, Sonner Toasts |
| Theming | next-themes |
| Dev Tooling | ESLint 9, TypeScript ESLint, Vite HMR |
| API | Usage | Docs |
|---|---|---|
| NewsData.io | Global news from thousands of sources, with multi-key rotation support | newsdata.io/documentation |
| Finnhub | Real-time financial market data and business news | finnhub.io/docs |
| Jina AI Reader | AI-powered content extraction for clean, readable article text | jina.ai/reader |
src/
β
βββ api/ # External API clients
β βββ market/
β β βββ finnhubApi.ts # Finnhub market data fetcher
β β βββ index.ts
β βββ news/
β β βββ apiKeyManager.ts # Rotating API key manager (multi-key support)
β β βββ newsApi.ts # NewsData.io fetcher
β β βββ index.ts
β βββ index.ts
β
βββ components/
β βββ shared/ # Reusable UI components
β β βββ ArticleCard.tsx # News card component
β β βββ CategoriesBar.tsx # Top categories navigation bar
β β βββ EmptyState.tsx # Empty / no-results state
β β βββ Footer.tsx
β β βββ ImageWithFallback.tsx # Image with error fallback
β β βββ Loader.tsx # Spinner loader
β β βββ LoadingState.tsx # Skeleton loading layout
β β βββ LogoIcon.tsx
β β βββ ModernBreakingNews.tsx # Animated breaking news ticker
β β βββ ModernHeader.tsx # Top navigation header
β β βββ NavigationDrawer.tsx # Mobile sidebar drawer
β β βββ NewsList.tsx # Article list renderer
β β βββ ScrollToTop.tsx # Floating scroll-to-top button
β β βββ SmartSearch.tsx # Live search with suggestions
β β βββ TrendingList.tsx # Trending articles list
β βββ ui/ # shadcn/ui primitives
β βββ button.tsx
β
βββ features/
β βββ article/ # Article page features
β β βββ ColorPicker.tsx # Reading background color selector
β β βββ ReadingProgressBar.tsx # Scroll progress indicator
β β βββ ReadingSettingsPanel.tsx # Font, size & layout settings
β β βββ ShareButtons.tsx # Social share + copy link buttons
β βββ home/ # Home page sections
β βββ CategoryShowcase.tsx
β βββ CompactMarketWatch.tsx # Mini market ticker strip
β βββ EliteCategorySection.tsx
β βββ FeaturedCarousel.tsx # Hero news carousel
β βββ LatestNewsSection.tsx
β
βββ hooks/ # Custom React hooks
β βββ useCategoryArticleCounts.ts
β βββ useJinaContent.ts # Fetch & parse article via Jina
β βββ usePageLoading.ts
β βββ useReadingSettings.ts # Persist reading preferences
β βββ useUserCity.ts # Detect user location
β βββ index.ts
β
βββ layouts/
β βββ RootLayout.tsx # App shell with header & footer
β
βββ lib/
β βββ query/ # TanStack Query configuration
β β βββ market/ # Market query hooks & constants
β β βββ news/ # News query hooks, keys, filters
β β βββ queryClient.ts
β β βββ QueryProvider.tsx
β βββ theme/ # Theme context & provider
β βββ categories-data.ts # Static category definitions
β βββ dateUtils.ts
β βββ localCache.ts # localStorage caching helpers
β βββ mock-data.ts
β βββ reading-settings.ts
β βββ reading-settings-context.tsx
β βββ utils.ts
β
βββ pages/ # Route-level page components
β βββ AboutPage.tsx
β βββ ArticlePage.tsx
β βββ CategoriesPage.tsx
β βββ CategoryPage.tsx
β βββ HomePage.tsx
β βββ NotFoundPage.tsx # 404 page
β βββ PrivacyPage.tsx
β βββ SearchPage.tsx
β βββ TrendingPage.tsx
β βββ index.ts
β
βββ routes/
β βββ index.ts # Centralized route definitions
β
βββ services/
β βββ articleExtractor.ts # Jina Reader extraction service
β
βββ styles/
β βββ fonts.css
β βββ globals.css
β
βββ types/ # Shared TypeScript types
β βββ article.ts
β βββ market.ts
β βββ news.ts
β βββ index.ts
β
βββ utils/
β βββ variants.ts # CVA class variant utilities
β
βββ App.tsx # Root component & router setup
βββ main.tsx # App entry point
βββ vite-env.d.ts
- Real-time articles fetched from multiple news APIs
- Breaking news ticker with smooth animated scroll
- Featured hero carousel showcasing top stories
- Category filtering β browse articles by topic
- Trending stories β discover what's popular right now
- Smart search with live suggestions
- AI-powered content extraction via Jina Reader for clean, distraction-free reading
- Reading progress bar that tracks your scroll position through the article
- Customizable reading panel β adjust font size, background color, and layout; all preferences are saved to
localStorage - Share buttons β Facebook, Twitter, LinkedIn, and Copy Link
- Graceful error fallback when an article cannot be extracted
- Compact market ticker on the home page with live stock and financial data powered by Finnhub
- Dark / Light mode with persistent user preference
- Skeleton loading states for smooth perceived performance
- Fully responsive β optimized for mobile, tablet, and desktop
- Mobile navigation drawer for smaller screens
- Scroll-to-top floating button
- Custom 404 page
- Built-in rotating API key manager β cycles through up to 3 NewsData.io keys automatically to prevent rate limiting
# Clone the repository
git clone https://github.com/your-username/Headline-News.git
cd Headline-News
# Install dependencies
npm installCreate a .env.local file in the root directory and fill in your API keys:
# βββ Finnhub ββββββββββββββββββββββββββββββββββββββββββββββββ
# Get your free key at: https://finnhub.io
VITE_FINNHUB_API_KEY=""
# βββ NewsData.io βββββββββββββββββββββββββββββββββββββββββββββ
# Get your free key at: https://newsdata.io
# Add 1 up to 5 keys β the app rotates between them automatically to avoid hitting rate limits
VITE_NEWSDATA_API_KEY_1="pub_"
VITE_NEWSDATA_API_KEY_2="pub_"
VITE_NEWSDATA_API_KEY_3="pub_"
# βββ Jina AI Reader ββββββββββββββββββββββββββββββββββββββββββ
# Get your free key at: https://jina.ai/reader
VITE_JINA_READER_API_KEY="jina_"# Start development server
npm run dev
# Type-check and build for production
npm run build
# Preview production build
npm run preview
# Lint the codebase
npm run lintHeadline is a client-side only application. It does not:
- Collect personal information
- Use tracking cookies or analytics
- Store any data on external servers
The only data stored locally is your theme preference and reading settings, saved in your browser's localStorage. This data never leaves your device.
All news content is fetched in real time from third-party APIs and is displayed "as is." Headline does not independently verify, endorse, or take responsibility for the accuracy of any displayed content.
| Status | Feature |
|---|---|
| β Done | Core news aggregation platform |
| β Done | Dark/Light theme |
| β Done | Customizable reading experience |
| β Done | Market watch ticker |
| β Done | AI-powered article extraction |
| π Planned | Dedicated stocks/market page |
| π Planned | Backend server for saving & bookmarking articles |
| π Planned | Functional article view count & engagement metrics |
| π Planned | Working social media share links per article |
| π Planned | Additional UI & performance improvements |
Maher Elmair
- π« maher.elmair.dev@gmail.com
- π LinkedIn
- βοΈ X (Twitter)
- β€οΈ Made with passion by Maher Elmair
π Try it now on Vercel:
- π View Live Project
If you found this project useful or inspiring, please consider giving it a βοΈ
Pull requests, issues, and suggestions are always welcome π











