Newsly is a sophisticated and fully responsive news aggregator application developed utilizing React and Vite. The platform is engineered to deliver a fluid and compelling user experience for accessing contemporary headlines, conducting targeted topic searches, and exploring a diverse range of news categories. The application's design prioritizes a clean user interface, elegant animations, and a strong emphasis on performance and readability.
- Dynamic News Aggregation: The system fetches and renders the latest news articles by interfacing with the NewsAPI.
- Advanced Search Capabilities: An animated search interface enables users to execute keyword-based searches, with results presented on a dedicated and paginated page.
- Interactive Category Navigation: A hover-activated "mega menu" facilitates category exploration, featuring icons and descriptive text that link to corresponding search result pages.
- Dedicated Article Viewing: Each news card links to a detailed article page, which is designed for optimal readability and clean presentation.
- Comprehensive Responsive Design: All components, from the header and footer to individual news cards, are architected to ensure a consistent and optimal viewing experience across all device types, including desktops, tablets, and mobile phones.
- Seamless Navigation and Scrolling: The application leverages
react-router-domfor efficient page transitions andreact-scrollfor smooth intra-page navigation on the homepage. - Modern User Interface and Experience:
- Subtle animations and transitions are integrated into interactive elements to enhance usability.
- A "Scroll to Top" button is provided for improved site navigation.
- A dark mode feature is available to ensure comfortable reading in various lighting conditions.
- All components adhere to a professional and uncluttered layout.
- Client-Side Caching Mechanism: The application utilizes
sessionStorageto cache search results, which provides an instantaneous experience when returning to a previously viewed search page.
- Frontend Framework: React
- Build Tool: Vite
- Styling Solution: Tailwind CSS
- Routing Library: React Router DOM
- On-Page Scrolling: React Scroll
- UI Components and Accessibility: Headless UI
- Animation Library: Framer Motion
- Iconography: Lucide React
The project adheres to a standard React application architecture, which modularizes components, pages, and static assets to promote clarity and long-term maintainability.
/src
├── /assets # Contains static assets such as images and SVG files
├── /components # Houses reusable UI components (e.g., Header, Footer, NewsCard)
├── /pages # Contains page-level components (e.g., HomePage, SearchResults)
├── App.jsx # The main application component responsible for routing
├── main.jsx # The primary entry point of the application
└── index.css # Defines global styles and imports for Tailwind CSS
The following instructions provide a comprehensive guide for establishing a local, operational instance of the project.
- Node.js (Version 14 or later)
- npm or yarn package manager
- Clone the Source Repository:
git clone https://github.com/tusharg2210/Newsly cd Newsly - Install Project Dependencies:
npm install
Subsequent to the installation of dependencies and the configuration of environment variables, the development server can be initiated:
npm run devThis command will launch the application, which can then be accessed via a web browser at the address http://localhost:5173 (or an alternative port if 5173 is currently occupied).
Within the project directory, the following commands are available for execution:
npm run dev: Initiates the application in development mode.npm run build: Compiles the application for production deployment into thedistdirectory.npm run lint: Analyzes the project files to identify and report any linting errors.npm run preview: Launches a local server to serve the production build.
Tushar
- LinkedIn: linkedin.com/in/tushargnita/
- GitHub: github.com/tusharg2210
Project Repository: https://github.com/tusharg2210/Newsly