{"id":25772040,"url":"https://github.com/matinhosseinianfard/newsapi","last_synced_at":"2025-02-27T03:32:43.620Z","repository":{"id":249886686,"uuid":"831859168","full_name":"MatinHosseinianFard/NewsAPI","owner":"MatinHosseinianFard","description":"Intership project","archived":false,"fork":false,"pushed_at":"2024-07-29T12:15:36.000Z","size":4947,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-07-30T00:20:18.986Z","etag":null,"topics":["celery","celery-flower","docker","drf","nginx","python","rabbitmq","scrapy","splash"],"latest_commit_sha":null,"homepage":"http://194.33.105.207/api/news","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MatinHosseinianFard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-07-21T20:20:55.000Z","updated_at":"2024-07-29T12:15:39.000Z","dependencies_parsed_at":"2024-07-24T00:46:13.082Z","dependency_job_id":"b5c4f87b-b752-4452-8b3b-7334340866ee","html_url":"https://github.com/MatinHosseinianFard/NewsAPI","commit_stats":null,"previous_names":["matinhosseinianfard/newsapi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatinHosseinianFard%2FNewsAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatinHosseinianFard%2FNewsAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatinHosseinianFard%2FNewsAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatinHosseinianFard%2FNewsAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MatinHosseinianFard","download_url":"https://codeload.github.com/MatinHosseinianFard/NewsAPI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240972925,"owners_count":19887058,"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":["celery","celery-flower","docker","drf","nginx","python","rabbitmq","scrapy","splash"],"created_at":"2025-02-27T03:32:43.022Z","updated_at":"2025-02-27T03:32:43.611Z","avatar_url":"https://github.com/MatinHosseinianFard.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NewsAPI\n\n## Overview\n\nThis project is a web application developed using Django and Django REST Framework. It includes a web scraper built with Scrapy to crawl and store news articles from Zoomit.\n\n## Technologies Used\n\nThis project utilizes the following technologies:\n\n- **Django**: A high-level Python web framework that encourages rapid development and clean, pragmatic design.\n- **Django REST Framework**: A powerful and flexible toolkit for building Web APIs in Django.\n- **PostgreSQL**: A powerful, open-source relational database system.\n- **Scrapy**: An open-source and collaborative web crawling framework for Python.\n- **RabbitMQ**: A message broker that your applications can use to send and receive messages.\n- **Celery**: An asynchronous task queue/job queue based on distributed message passing, used with RabbitMQ.\n- **Nginx**: A high-performance web server and reverse proxy.\n- **Docker**: A platform for developing, shipping, and running applications in isolated containers.\n\n## Getting Started\n\n\n### Prerequisites\n\nBefore you begin, ensure you have met the following requirements:\n- [Docker](https://www.docker.com/get-started) installed on your machine.\n- [Docker Compose](https://docs.docker.com/compose/install/) installed on your machine.\n- Basic knowledge of Docker and Docker Compose.\n\n\n### 1. Clone the Repository\n\nFirst, clone the repository to your local machine:\n\n```bash\ngit clone https://github.com/MatinHosseinianFard/NewsAPI.git\ncd NewsAPI/\n```\n\n### 2. Build and Start the Containers\nBuild the Docker images and start the containers with Docker Compose:\n\n```bash\ndocker-compose up -d --build\n```\n\nThis command will:\n\nBuild the Docker images as specified in the `Dockerfile`.\n\nStart the containers as defined in the `docker-compose.yml` file.\n\n\n#### Create a superuser (optional, for accessing Django admin):\n```bash\ndocker-compose exec -it app\n```\nThen:\n```bash\npython manage.py createsuperuser\n```\n\n### 3. Access the Application\nThe application will be available at http://localhost:8000.\n\nThe Django admin interface can be accessed at http://localhost:8000/admin.\n\n### Urls\n\nhttp://localhost/\n\nhttp://localhost/admin\n\nhttp://localhost/api/news\n\nhttp://localhost/api/news?tags__name=\n\nhttp://localhost:5556\n\n\n\n### Celery Flower\nCelery Flower, a real-time monitoring tool for Celery, is available at:\n```bash\nhttp://localhost:5556\n```\n\n### Project Structure\nBelow is a visual representation of the project structure:\n[![Structure](https://github.com/MatinHosseinianFard/NewsAPI/blob/main/structure.png)](https://coggle.it/)\n\n### 4. Stop the Containers\nTo stop and remove the containers, run:\n\n```bash\ndocker-compose down\n```\n\n### Troubleshooting\n**Port Conflicts**: Ensure that the ports specified in docker-compose.yml are not already in use by other applications.\n\n**Logs**: To view logs for debugging, use:\n\n```bash\ndocker-compose logs [service-name]\n```\n\n**Environment Issues**: Make sure all required environment variables are correctly set in the .env file.\n\n### License\nThis project is licensed under the [MIT License](https://github.com/MatinHosseinianFard/NewsAPI/blob/main/LICENSE).\n\n### Contact\nFor any questions or support, please reach out to matinhosseini795@gmail.com.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatinhosseinianfard%2Fnewsapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatinhosseinianfard%2Fnewsapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatinhosseinianfard%2Fnewsapi/lists"}