This is the frontend application for the News Summarizer project. It is built using React and TypeScript and is hosted on Netlify.
- Responsive UI: Optimized for all screen sizes.
- News Feed: Displays article summaries generated by the backend AI.
- User Authentication: Allows users to log in using Google OAuth.
- Article Management: Users can upload, view, and manage articles.
- Interactive Navigation: Navigate between news feed, profile, and article upload pages.
- Node.js (version 16 or above)
- A
.envfile with the following:REACT_APP_BACKEND_URL=https://your-backend-url.onrender.com
-
Clone the repository:
git clone https://github.com/yourusername/news-summarizer-frontend.git cd news-summarizer-frontend -
Install dependencies:
npm install
-
Run the app locally:
npm start
-
Build the app for production:
npm run build
-
Deploy to Netlify:
- Use the build directory for deployment.
- Configure the
REACT_APP_BACKEND_URLenvironment variable in Netlify.
src/components: Contains React components like Navbar, ArticleCard, etc.src/services: Axios-based services for API interaction.src/pages: Contains pages like Home, Profile, and ArticleUpload.public: Static assets like the favicon.
- Fetches data from the backend via Axios using the
REACT_APP_BACKEND_URLenvironment variable. - Displays articles and summaries from the backend's
/api/articlesendpoint. - Handles user authentication through Google OAuth.
- Ensure the backend is running and accessible via the
REACT_APP_BACKEND_URL. - Check browser console for any CORS-related errors.