π° New York Pines β A New York Times Clone
New York Pines is a React-based web application that replicates the core functionality and layout of the New York Times homepage. It leverages the official New York Times API to fetch high-quality news content and display it with a modern, responsive, and accessible interface.
This project was developed as part of the Start2Impact Front-End Development path.
- β Homepage Clone: A structured, responsive homepage inspired by the layout and flow of nytimes.com.
- β News Sections: Browse articles from multiple NYT sections like World, Technology, Health, Sports, and more.
- β Trending Slider: A hero slider at the top highlights the 3 most popular articles.
- β Search: Keyword-based article search with debounced input.
- β Load More: Paginated loading with animated entry of news cards.
- β Responsive Layout: Fully optimized for mobile, tablet, and desktop.
- β
SEO Optimization: Dynamic page titles via
react-helmet. - β Scroll-to-Top button.
- β Share Button: Easily share articles with the Web Share API or copy links.
- β 404 Page: Friendly "Page Not Found" fallback with return navigation.
- β Framer Motion for animations (card entry, transitions, button effects).
- β Social Footer with GitHub and LinkedIn.
- β Hamburger Menu for mobile navigation.
- β Smooth UX with hover previews, loading skeletons, tooltips, etc.
- β Lazy Loading of images for performance.
| Tool | Role |
|---|---|
| React + TypeScript | Frontend UI development |
| Vite | Blazing-fast build tool |
| TailwindCSS (v4) | Utility-first styling |
| Redux Toolkit | Global state management |
| Axios | Fetching NYT API data |
| React Router | Client-side routing |
| Framer Motion | Animations & transitions |
| react-helmet | SEO & meta tag management |
nyt-clone/
βββ public/ # Static files
βββ src/
β βββ components/ # Reusable components (Navbar, Footer, HeroSlider, etc.)
β βββ constants/ # Static data (sections, etc.)
β βββ pages/ # Home, Search, 404
β βββ store/ # Redux store & slices
β βββ types/ # TypeScript types
β βββ App.tsx # App entry
β βββ main.tsx # Root render
β βββ index.css # Global styles
βββ .env # API keys (NYT) *not in repository
βββ tailwind.config.js # Tailwind setup
βββ vite.config.ts # Vite config
βββ package.json # Dependencies & scripts
-
Clone the Repository:
git clone https://github.com/andreaferrari95/nyt-clone.git
-
Install Dependencies:
npm install
-
Setup Environment Variables:
Create a
.envfile and add your NYT API key:VITE_NYT_API_KEY=your_api_key_here -
Run the Dev Server:
npm run dev
Access the app at
http://localhost:5173.
npm run devβ Start local dev servernpm run buildβ Production buildnpm run previewβ Preview built appnpm run lintβ Run ESLint checks
Using these endpoints:
- πΈ Top Stories API β by section (e.g., world, technology, etc.)
- πΈ Most Popular API β top trending articles
More info: NYT Developer Docs.
Developed by Andrea Ferrari as part of the Start2Impact curriculum.
Special thanks to:
- π° New York Times API
- π» Open source libraries and tools
MIT β free to use, fork, and build upon.