This React.js project fetches project details from the GitHub repository "https://github.com/Vidhinpatel08/BharatBulletin" and utilizes the NewsCatcher API to retrieve news articles. It leverages the GitHub API to obtain information about the repository, such as its name, description, owner, language, stars, and forks. The NewsCatcher API allows you to search for news articles based on various criteria, such as keywords, language, and sources.
https://bharatbulletin.netlify.app/
-
Prerequisites:
- Node.js and npm (or yarn) installed on your system. You can download them from https://nodejs.org/
-
Clone the repository:
git clone https://github.com/Vidhinpatel08/BharatBulletin.git
-
Navigate to the project directory:
cd BharatBulletin
-
Install dependencies:
npm install
or
yarn install
-
Create a
.env.local
file:- In the project root directory, create a file named
.env.local
. - Inside this file, add the following line, replacing
YOUR_NEWSCATCHER_API_KEY
with your actual NewsCatcher API key obtained from https://app.newscatcherapi.com/auth/login:REACT_APP_NEWS_API_KEY=YOUR_NEWSCATCHER_API_KEY
- For register here : https://app.newscatcherapi.com/auth/register_nc
- In the project root directory, create a file named
- Start the development server:
or
npm start
This will typically start the server on port 3000 (http://localhost:3000) by default. You can view the project in your browser.yarn start
(Provide a detailed explanation of your project's directory structure, outlining the purpose of each folder and file. This helps others understand how the project is organized)
- React.js: A JavaScript library for building user interfaces (https://react.dev/)
- GitHub API: Provides programmatic access to GitHub data (https://docs.github.com/rest)
- NewsCatcher API: Allows you to search for news articles (https://newscatcherapi.com/)
We welcome contributions to this project! Here are some guidelines to help you get started:
Setting up your development environment:
- Clone the repository:
git clone https://github.com/Vidhinpatel08/BharatBulletin.git
- Install dependencies:
or
npm install
yarn install
- Create a
.env.local
file:- Follow the instructions in the Installation section to create a
.env.local
file and add your NewsCatcher API key.
- Follow the instructions in the Installation section to create a
Running tests:
- We encourage you to write unit tests for your code. You can use a testing framework like Jest.
- To run the tests, type the following command in your terminal:
or
npm test
yarn test
Submitting pull requests:
- Fork the repository.
- Make your changes and commit them to your fork.
- Push your changes to your fork.
- Open a pull request from your fork to the upstream repository.
- We will review your pull request and provide feedback.
Additional tips:
- Please follow the code style guidelines of the project.
- Write clear and concise code comments.
- Make sure your changes are well-tested.
MIT License
Copyright (c) 2024 Vidhin Patel
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Limitations:
- This project is currently in its early stages of development.
- The scope of the project may be limited to fetching and displaying basic information about the BharatBulletin repository and news articles from the NewsCatcher API.
Known Issues:
- There may be bugs or errors in the current code.
- The project may not be fully functional at this stage.
Future Plans:
- We plan to add more features to the project, such as the ability to search for specific news articles.
- We may improve the user interface and user experience.
We appreciate your interest in contributing to this project! If you have any questions or suggestions, please feel free to open an issue or contact us directly.
- API Rate Limits: Be mindful of API rate limits for both the GitHub API and the NewsCatcher API. Implement caching or pagination mechanisms to avoid exceeding these limits.
- Error Handling: Implement proper error handling to gracefully handle situations where API requests fail or the fetched data is not in the expected format.
- Security: Remember that the
.env.local
file is not included in version control (e.g., Git) to prevent exposing your API key.