{"id":24141562,"url":"https://github.com/sarapmagcode/news-react","last_synced_at":"2026-04-09T21:02:48.182Z","repository":{"id":272002000,"uuid":"915237392","full_name":"sarapmagcode/news-react","owner":"sarapmagcode","description":"A modern news aggregation web app built with React and Vite, powered by NewsDataHub API. Features real-time news feed, search functionality, and a responsive UI.","archived":false,"fork":false,"pushed_at":"2025-01-11T10:27:34.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-11T11:34:57.301Z","etag":null,"topics":["css-modules","cursor-pagination","javascript","news-aggregator","news-api","newsdatahub","newsreader","react","react-router","real-time","vite","web-application"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sarapmagcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-11T10:24:43.000Z","updated_at":"2025-01-11T10:30:27.000Z","dependencies_parsed_at":"2025-01-11T11:35:10.721Z","dependency_job_id":"6fc55370-26e5-4470-bd37-8de6632f754d","html_url":"https://github.com/sarapmagcode/news-react","commit_stats":null,"previous_names":["sarapmagcode/news-react"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarapmagcode%2Fnews-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarapmagcode%2Fnews-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarapmagcode%2Fnews-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarapmagcode%2Fnews-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sarapmagcode","download_url":"https://codeload.github.com/sarapmagcode/news-react/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241367911,"owners_count":19951445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css-modules","cursor-pagination","javascript","news-aggregator","news-api","newsdatahub","newsreader","react","react-router","real-time","vite","web-application"],"created_at":"2025-01-12T04:41:40.461Z","updated_at":"2026-04-09T21:02:48.130Z","avatar_url":"https://github.com/sarapmagcode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NewsReact\n\nA modern news aggregation web application built with React, Vite, and NewsDataHub API. This application allows users to browse and search through news articles from various sources with a clean and responsive interface.\n\n## Features\n\n- **Real-time News Feed**: Display latest news articles from multiple sources\n- **Search Functionality**: Search for specific news articles with instant results\n- **Responsive Design**: Clean and modern UI that works across different screen sizes\n- **Article Preview**: Each article shows title, source, publication date, and description\n- **Pagination**: Load more articles with cursor-based pagination\n- **Loading States**: Skeleton loading screens for better user experience\n\n## Tech Stack\n\n- React.js\n- Vite\n- React Router DOM\n- CSS Modules\n- NewsDataHub API\n\n## Prerequisites\n\nBefore running this project, make sure you have:\n\n- Node.js (v14 or higher)\n- NPM or Yarn package manager\n- NewsDataHub API key (Get one at https://newsdatahub.com)\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/yourusername/news-react.git\ncd news-react\n```\n\n2. Install dependencies:\n```bash\nnpm install\n```\n\n3. Create a `.env` file in the root directory and add your NewsDataHub API key:\n```env\nVITE_NEWS_API_KEY=your_api_key_here\n```\n\n4. Start the development server:\n```bash\nnpm run dev\n```\n\n## Project Structure\n\n```\nsrc/\n├── components/\n│   ├── Header/\n│   │   ├── Header.jsx\n│   │   └── Header.module.css\n│   └── News/\n│       ├── News.jsx\n│       └── News.module.css\n├── utils/\n│   └── helpers.js\n└── App.jsx\n```\n\n## Component Overview\n\n### App.jsx\nThe main application component that handles routing and layout structure.\n\n### Header\nA simple navigation header component displaying the application name with routing capabilities.\n\n### News\nThe main component that handles:\n- Fetching news articles from the API\n- Search functionality\n- Displaying news items\n- Pagination\n- Loading states\n\n## Styling\n\nThe application uses CSS Modules for component-specific styling, providing:\n- Scoped styling\n- Maintainable CSS structure\n- No style conflicts\n- Responsive design\n\n## API Integration\n\nThe application uses the NewsDataHub API with the following features:\n- Language filtering (English)\n- Search functionality\n- Cursor-based pagination\n- Error handling\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## Acknowledgments\n\n- NewsDataHub for providing the API\n- React team for the amazing framework\n- Vite team for the build tool","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarapmagcode%2Fnews-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsarapmagcode%2Fnews-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarapmagcode%2Fnews-react/lists"}