{"id":24990332,"url":"https://github.com/fan9704/petmonitoringsystem-backend","last_synced_at":"2025-04-12T01:52:08.382Z","repository":{"id":65833618,"uuid":"590560020","full_name":"fan9704/PetMonitoringSystem-Backend","owner":"fan9704","description":"Use Django Develop Elastic Stack Pet Monitoring System","archived":false,"fork":false,"pushed_at":"2023-11-01T08:23:32.000Z","size":4575,"stargazers_count":6,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T01:52:03.501Z","etag":null,"topics":["django","django-rest-framework","elasticsearch","elasticstack","kibana","pika","postgresql","rabbitmq"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fan9704.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":"CONTRIBUTING.MD","funding":".github/FUNDING.yml","license":"LICENSE.md","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-01-18T17:35:40.000Z","updated_at":"2024-09-25T23:40:43.000Z","dependencies_parsed_at":"2023-10-27T01:30:59.783Z","dependency_job_id":"6f061fd2-5727-4911-a9c8-4a6da327a894","html_url":"https://github.com/fan9704/PetMonitoringSystem-Backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fan9704%2FPetMonitoringSystem-Backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fan9704%2FPetMonitoringSystem-Backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fan9704%2FPetMonitoringSystem-Backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fan9704%2FPetMonitoringSystem-Backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fan9704","download_url":"https://codeload.github.com/fan9704/PetMonitoringSystem-Backend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248505873,"owners_count":21115354,"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":["django","django-rest-framework","elasticsearch","elasticstack","kibana","pika","postgresql","rabbitmq"],"created_at":"2025-02-04T13:35:34.614Z","updated_at":"2025-04-12T01:52:08.361Z","avatar_url":"https://github.com/fan9704.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pet Monitoring Backend\n\n![](https://img.shields.io/github/languages/top/fan9704/PetMonitoringSystem-Backend?logo=python\u0026logoColor=%23FFFFFF\u0026style=for-the-badge)\n![](https://img.shields.io/github/languages/count/fan9704/PetMonitoringSystem-Backend?color=%23005A2B\u0026style=for-the-badge)\n\n## System Structure\n\n![](./doc/SystemStructure.png)\n\n## Software Development Lifecycle\n\n![](./doc/scrum.png)\n\n---\n\n[Swagger Route](http://127.0.0.1:8000/swagger/)\n\n[Django System Check](http://127.0.0.1:8000/health/)\n\n[Rabbit Console](http://127.0.0.1:15672/)\n\n[SonarQube Console](http://127.0.0.1:9000/)\n\n[Forest Admin](https://app.forestadmin.com/)\n\n## Setup Project\n\n### Step.1 Install Dependencies with pipenv\n\n```shell\npipenv install\n```\n\n### Step.2 Construct Environments with Docker-compose\n\n```shell\ndocker-compose up\n```\n\n### Step.3 Environment Variables .env Setup\n\n.env file\nPlease refer .env.example \n```dotenv\n#Django\nDJANGO_SECRET_KEY =\nDEBUG =\n#Elasticsearch\nELASTICSEARCH_ENDPOINT = \n#PostgreSQL\nPOSTGRES_DB =\nPOSTGRES_USER =\nPOSTGRES_PASSWORD =\nPOSTGRES_DB_URL =\n#ChatGPT\nCHATGPT_APIKEY = \n#RabbitMQ\nRABBITMQ_ENABLE = \nRABBITMQ_USERNAME = \nRABBITMQ_PASSWORD = \nRABBITMQ_SERVER_IP = \nRABBITMQ_PORT = \nRABBITMQ_VIRTUAL_HOST = \n#Celery\nBROKER_URL =\n#Redis\nREDIS_URL=\n...\n```\n\n### Step.4 Migrate Schema to PostgreSQL\n\n```shell\npipenv run python manage.py migrate\n```\n\n### Step.5 Migrate Index to Elasticsearch(django-elasticsearch-dsl)\n\n```shell\npipenv run python manage.py search_index --create\npipenv run python manage.py search_index --populate --refresh\n```\n\n### Step.6 Runserver\n\n```shell\npipenv run python manage.py runserver 0.0.0.0:8000\n```\n\n### Step.7 Run Commands\n\n```shell\npipenv run python manage.py MQTTListener\n```\n\n----\n\n## Other\n\n### Install Dependencies with venv\n\n#### Create venv\n\n```shell\npython -m venv .\n```\n\n#### Activate venv\n\n```shell\nScripts/activate\n```\n\n#### Deactivate venv\n\n```shell\nScripts/deactivate\n```\n\n#### Install from requirements.txt\n\n```shell\npip install -r requirements.txt\n```\n\n#### Freeze dependencies\n\n```shell\npip freeze \u003e requirements.txt\n```\n\n### Run Integration Test\n\n```shell\npython manage.py test PetMonitoringSystemBackend.test [--verbosity 2]# Unit Test --verbosity 2 is output detail\npython manage.py test api.tests.unit [--verbosity 2]# Unit Test --verbosity 2 is output detail\npython manage.py test api.tests.integration #Intergration Test\npython manage.py test  #All Test\n```\n\n### Run with ASGI\n\n```shell\ndaphne -b 0.0.0.0 -p 8000 PetMonitoringSystemBackend.asgi:application\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffan9704%2Fpetmonitoringsystem-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffan9704%2Fpetmonitoringsystem-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffan9704%2Fpetmonitoringsystem-backend/lists"}