Skip to content

Vikashdev1/Multi-language-News-App-using-NewsData-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌍 Multi-Language News App

A modern, fully responsive React news application powered by NewsData.io, supporting 20 languages, 13+ categories, and 15 countries with a sleek dark/light theme toggle.

Nexus News Preview


✨ Features

  • 🌐 20 Languages — English, Hindi, Arabic, French, German, Spanish, Chinese, Japanese, Korean, Russian, and more
  • 🔁 RTL Support — Layout automatically flips to right-to-left for Arabic, Urdu, and other RTL languages
  • 📂 13+ Categories — Top Stories, Business, Technology, Science, Health, Sports, Entertainment, Politics, Environment, Food, Travel, World
  • 🌎 Country Filter — Filter news by 15 countries including US, UK, India, Germany, Japan, China, Brazil, and more
  • Breaking News Toggle — Switch between the archive (/news) and latest breaking (/latest) endpoints
  • 🔖 Saved Articles — Bookmark stories to a personal reading list, persisted in localStorage
  • 🧠 Sentiment & AI Tags — Sentiment chips and AI tag / keyword chips powered by NewsData.io's enrichment fields (paid plans)
  • 🔍 Live Search — Debounced full-text search across all articles
  • ♾️ Infinite Pagination — Load more stories using NewsData.io's pagination tokens
  • 🌙 Dark / Light Theme — Persisted via localStorage
  • 📱 Fully Responsive — Mobile, tablet, and desktop layouts
  • Skeleton Loading — Smooth skeleton placeholders while fetching
  • 🛡️ Error Handling — Graceful error states with retry options

🚀 Getting Started

1. Clone the Repository

cd multilang-news-app

2. Install Dependencies

npm install

3. Configure Your API Key

Get your free API key from newsdata.io/register, then:

cp .env.example .env

Edit .env:

REACT_APP_NEWSDATA_API_KEY=your_actual_api_key_here

⚠️ Never commit your .env file. It's already in .gitignore.

4. Start the Development Server

npm start

Open http://localhost:3000 to view the app.


🔧 API Reference

This app uses the NewsData.io REST API.

Parameter Description
language ISO 639-1 language code (e.g. en, hi)
category News category (e.g. technology, sports)
country ISO 3166-1 alpha-2 country code (e.g. us)
q Full-text search query
page Pagination token from previous response

Free Plan Limits

  • ✅ 200 requests/day
  • ✅ Up to 10 articles per request
  • ✅ Access to latest news endpoint

📦 Build for Production

npm run build

The optimized build will be in the build/ directory, ready to deploy on Vercel, Netlify, or any static host.


🌐 Deploy to Vercel

npm install -g vercel
vercel

Set the environment variable REACT_APP_NEWSDATA_API_KEY in your Vercel project settings.


🎨 Design System

All colors, spacing, typography, and animations are driven by CSS custom properties defined in src/index.css:

:root {
  --bg-primary: #080b14;
  --accent-primary: #3b82f6;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  /* ... */
}

Switching data-theme="light" on <html> automatically remaps all variables.


🛠️ Tech Stack

Technology Usage
React 18 UI framework
React Router v6 Client-side routing
Axios HTTP requests
date-fns Human-readable timestamps
NewsData.io API News data source
CSS Custom Props Design system / theming
Google Fonts Syne + DM Sans typography

📄 License

MIT — feel free to use, fork, and build on this project.


🙏 Credits

About

Multi-language News App using NewsData.io API to fetch real-time news in multiple languages. Filter by country, category, and keywords with fast, scalable integration. Ideal for building global news apps, dashboards, and analytics tools with multilingual support and easy API usage.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors