Skip to content

NewsWeb - A website built using React & Vite to retrieve news through NewsAPI.

Notifications You must be signed in to change notification settings

Abhilash2909/NewsWeb

Repository files navigation

NewsWeb

NewsWeb is a React-based web application that provides the latest news across various categories such as Trending, Technology, Business, Health, Science, Sports, and Entertainment. It utilizes the NewsAPI (https://newsapi.org/) to fetch real-time news data, allowing users to stay updated on current events.

In addition to news browsing, NewsWeb also features dark mode, bookmarking, sharing, and other functionalities to enhance the user experience.

Features

  • Dark Mode: Toggle between light and dark themes.
  • Category Navigation: Easily switch between news categories using a dropdown menu.
  • Bookmarks: Bookmark your favorite articles.
  • Share: Share articles on social media.
  • Responsive Design: Works on all devices with a responsive design.
  • Trending Section: A separate section for trending news.
  • Performance Optimization: Cached articles for faster load times.

Installation

  1. Clone the repository:
    git clone https://github.com/Abhilash2909/newsweb.git
  2. Navigate to the project directory:
    cd newsweb
  3. Install dependencies:
    npm install

Environment Variables

Create a .env file in the root directory and add your NewsAPI key:

NEWS_API_KEY=your_newsapi_key_here

Running the Application

To start the development server, run the following command: npm run dev

The application will be available at http:https://localhost:5173

File Structure

    NewsWeb
    ├── public
    │   └── index.html
    ├── src
    │   ├── assets
    │   │   └── image.jpg
    │   ├── components
    │   │   ├── Navbar.jsx
    │   │   ├── NewsBoard.jsx
    │   │   ├── NewsItem.jsx
    │   ├── App.jsx
    │   ├── index.css
    │   ├── main.jsx
    │   └── App.css
    ├── .gitignore
    ├── package.json
    ├── vite.config.js
    └── README.md

About

NewsWeb - A website built using React & Vite to retrieve news through NewsAPI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published