NewsApp is a modern and responsive web application that displays the latest news from various categories using a sleek and minimalist interface. It leverages the power of React, Vite, and News API to fetch and display real-time news articles.
- 📰 Browse the latest headlines
- 🔍 Search for news by keywords
- 🌐 Filter news by categories (e.g., sports, tech, entertainment)
- 📱 Fully responsive design
- ⚡ Lightning-fast performance with Vite
- Frontend: React, JavaScript, HTML5, CSS
- Build Tool: Vite
- Deployment: Vercel
- API: NewsAPI.org
- Node.js (v14 or later)
- NPM or Yarn
# Clone the repository
git clone https://github.com/njange/NewsApp.git
# Navigate to the project directory
cd NewsApp
# Install dependencies
npm install# Start the development server
npm run devVisit http://localhost:5173 to view it in the browser.
NewsApp/
│
├── public/ # Static assets
├── src/ # Source code
│ ├── components/ # Reusable components
│ ├── pages/ # Page components
│ └── App.jsx # Main app component
│
├── .env # API keys and environment variables
├── package.json # Project metadata and scripts
├── vite.config.js # Vite configuration
└── README.md # Project documentation
Create a .env file in the root directory and add your API key:
VITE_NEWS_API_KEY=your_news_api_key_hereYou can get a free API key from https://newsapi.org/.
This app is deployed on Vercel. To deploy your own version:
- Push the code to GitHub.
- Import the repository into Vercel.
- Set the environment variable for
VITE_NEWS_API_KEY. - Click Deploy.
Contributions are welcome! Please fork the repo and submit a pull request.
This project is licensed under the MIT License.
Developer: James Njange
📧 Email: njangejames@gmail.com 🔗 LinkedIn: linkedin.com/in/njange

