{"id":30904527,"url":"https://github.com/ore-codes/news-hub-be","last_synced_at":"2025-09-09T09:34:18.171Z","repository":{"id":302880800,"uuid":"1013624727","full_name":"ore-codes/news-hub-be","owner":"ore-codes","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-04T14:12:53.000Z","size":101,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-04T15:51:20.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/ore-codes.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,"zenodo":null}},"created_at":"2025-07-04T07:47:39.000Z","updated_at":"2025-07-04T14:12:57.000Z","dependencies_parsed_at":"2025-07-04T15:51:31.158Z","dependency_job_id":"3587b5c7-cf22-41a6-b100-c55f1c3881ea","html_url":"https://github.com/ore-codes/news-hub-be","commit_stats":null,"previous_names":["ore-codes/news-hub-be"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ore-codes/news-hub-be","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ore-codes%2Fnews-hub-be","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ore-codes%2Fnews-hub-be/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ore-codes%2Fnews-hub-be/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ore-codes%2Fnews-hub-be/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ore-codes","download_url":"https://codeload.github.com/ore-codes/news-hub-be/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ore-codes%2Fnews-hub-be/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274275207,"owners_count":25254902,"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","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-09-09T09:34:14.383Z","updated_at":"2025-09-09T09:34:18.151Z","avatar_url":"https://github.com/ore-codes.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# News Hub Backend\n\nThis is a Laravel backend for the News Hub project. It is fully containerized using Docker Compose for easy local development and deployment.\n\n## Prerequisites\n\n- [Docker](https://www.docker.com/get-started) and [Docker Compose](https://docs.docker.com/compose/) installed\n- [Git](https://git-scm.com/) for cloning the repository\n\n## Quick Start\n\n1. **Clone the repository:**\n   ```sh\n   git clone https://github.com/ore-codes/news-hub-be.git\n   cd news-hub-be\n   ```\n\n2. **Copy the example environment file and edit as needed:**\n   ```sh\n   cp .env.example .env\n   # Edit .env to set your database, Meilisearch, and API keys\n   ```\n\n3. **Build and start all services:**\n   ```sh\n   docker-compose up --build -d\n   ```\n   This will build the PHP, Nginx, MySQL, and Meilisearch containers and start them in the background.\n\n4. **(First time only) Generate the application key:**\n   ```sh\n   docker-compose exec app php artisan key:generate\n   ```\n\n5. **Access the application:**\n   - API: [http://localhost:8000](http://localhost:8000)\n   - Meilisearch: [http://localhost:7700](http://localhost:7700)\n\n6. **API Documentation:**\n   - Swagger docs are generated at `/api/documentation`\n\n## Notes\n- The Laravel scheduler runs in a dedicated container (`scheduler`) and will execute scheduled tasks as defined in `routes/console.php`.\n- Database data is persisted in a Docker volume (`dbdata`).\n- Meilisearch data is persisted in a Docker volume (`meilisearch_data`).\n- If you change your `.env` file, restart the containers:\n  ```sh\n  docker-compose restart\n  ```\n\n## API Keys Setup\n\nThis project requires API keys for four news platforms. You must obtain these keys and add them to your `.env` file:\n\n- `NEWSAPI_KEY`\n- `GUARDIAN_KEY`\n- `NYTIMES_KEY`\n- `EVENTREGISTRY_KEY`\n\nOr use mine for testing (it is icnluded in `.env.example`)\n```\nNEWSAPI_KEY=879dadcd93fc46aa80d3170fbe4c68ab\nGUARDIAN_KEY=29a3b530-5a47-4795-9bbc-28099ab922c5\nNYTIMES_KEY=1mvFxDm1RS09VlKo2rnxukHw8lupK7hK\nEVENTREGISTRY_KEY=805a1134-ee5f-47e4-bc9c-f98dd9f96df4\n```\n\n### How to Obtain API Keys\n\n**1. NewsAPI**\n- Go to [https://newsapi.org/register](https://newsapi.org/register)\n- Sign up for a free account\n- After verifying your email, you will find your API key in the dashboard\n- Add it to your `.env` as `NEWSAPI_KEY=your_key_here`\n\n**2. The Guardian**\n- Go to [https://open-platform.theguardian.com/access/](https://open-platform.theguardian.com/access/)\n- Register for an API key\n- After approval, you will receive your key by email or in your account dashboard\n- Add it to your `.env` as `GUARDIAN_KEY=your_key_here`\n\n**3. NYTimes**\n- Go to [https://developer.nytimes.com/accounts/create](https://developer.nytimes.com/accounts/create)\n- Create an account and log in\n- Go to \"Apps\" and create a new app to get your API key\n- Add it to your `.env` as `NYTIMES_KEY=your_key_here`\n\n**4. EventRegistry(NewsAPI.AI)**\n- Go to [https://www.newsapi.ai/register](https://www.newsapi.ai/register)\n- Register for a free account\n- After logging in, go to your profile to find your API key\n- Add it to your `.env` as `EVENTREGISTRY_KEY=your_key_here`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fore-codes%2Fnews-hub-be","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fore-codes%2Fnews-hub-be","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fore-codes%2Fnews-hub-be/lists"}