Skip to content

This is dynamic news web application built with React.js and Next.js, leveraging the News API to fetch and display up-to-date news articles.

Notifications You must be signed in to change notification settings

sammyifelse/News-Web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📰 News Web Application

This project is a news web application built using React.js, Next.js, and the News API. It allows users to browse news articles from various sources and categories.

✨ Features

  • Real-time News: Fetches and displays the latest news articles using the News API.
  • Category-based Browsing: Allows users to filter news by categories (e.g., business, technology, sports).
  • Source Filtering: Users can filter news by specific news sources.
  • Search Functionality: Enables users to search for news articles based on keywords.
  • Responsive Design: Provides a seamless experience across various devices.
  • Server-Side Rendering (SSR): Implemented with Next.js for improved performance and SEO.
  • Next.js API Routes: Utilizes Next.js API routes for efficient data fetching and handling.

🛠️ Technologies Used

  • React.js: For building the user interface.
  • Next.js: For server-side rendering and API routes.
  • News API: For fetching news data.
  • CSS/Styled-Components/Tailwind CSS: (Specify which you used) For styling.
  • Axios/Fetch: (Specify which you used) For making API requests.
  • dotenv: For managing environment variables.

🏁 Getting Started

  1. Clone the repository:

    git clone [repository-url]
    cd [project-directory]
  2. 📦 Install dependencies:

    npm install
    # or
    yarn install
    # or
    pnpm install
  3. 📂 Set up environment variables:

    • Create a .env.local file in the root directory.

    • Add your News API key:

      NEWS_API_KEY=your_news_api_key
      
  4. 🔗 Run the development server:

    npm run dev
    # or
    yarn dev
    # or
    pnpm dev
  5. Open your browser and navigate to http://localhost:5000.

Building for Production

  1. Build the application:

    npm run build
    # or
    yarn build
    # or
    pnpm build
  2. Start the production server:

    npm run start
    # or
    yarn start
    # or
    pnpm start

API Routes

  • /api/news: Fetches news articles based on query parameters (e.g., category, source, keyword).

Demonstration Video

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue.

License

MIT

Author

[sammyifelse]

About

This is dynamic news web application built with React.js and Next.js, leveraging the News API to fetch and display up-to-date news articles.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published