How shanisoni/react-news-app works
Project type and purpose
• This is a full-stack web application (“Latest Tech News App”) that scrapes and aggregates the latest articles from various tech websites, exposes them via an Express API, and renders them in a React/Vite frontend.
File structure
• Top-level
– .gitignore, LICENSE, README.md, Main (unused folder?)
– client/ – the React-based Single Page App (SPA)
– server/ – the Node.js/Express API and scraping logic
• client/
– public/index.html, vite.config.js, tailwind.config.cjs, postcss.config.cjs
– src/
• main.jsx – application entry point
• App.jsx – root component, configures API_BASE_URL
• contexts/NewsContext.jsx – state provider for news data
• components/ – Navbar, News, Loading, Pagination
• assets/, index.css
– package.json, package-lock.json
• server/
– index.js – Express server entry point, defines /api/news endpoints
– generateNews.js – Cheerio-based scraping module
– newsUrls.js – list of target tech news URLs
– package.json, package-lock.json
README for additional insights
• Back-end uses Node.js, Express, Cheerio, Node-Cache, Cors
• Front-end uses React, Vite, Tailwind, Axios, Moment.js
• No external database; caching is in-memory via Node-Cache
• Deployment: separate dev servers for client and server
Essential details without over-fitting
• Do not omit the caching layer—it’s critical for performance
• Scraping flow stage as a separate step