{"id":13635585,"url":"https://github.com/Menithal/hifi-ipfs","last_synced_at":"2025-04-19T04:31:17.154Z","repository":{"id":93655623,"uuid":"140316703","full_name":"Menithal/hifi-ipfs","owner":"Menithal","description":"Docker Service Bundle which creates a file upload interface for the Blender High Fidelity Plugin that allows one to upload files into ipfs network. Uses py-flask, python, postgres, ipfs and hifi metaverse api","archived":true,"fork":false,"pushed_at":"2018-08-06T17:18:34.000Z","size":85,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-09T05:34:34.784Z","etag":null,"topics":["docker","flask-application","flask-sqlalchemy","ipfs","python","service","upload"],"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/Menithal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2018-07-09T16:58:38.000Z","updated_at":"2023-12-04T22:57:37.000Z","dependencies_parsed_at":"2023-03-24T11:33:45.175Z","dependency_job_id":null,"html_url":"https://github.com/Menithal/hifi-ipfs","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/Menithal%2Fhifi-ipfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Menithal%2Fhifi-ipfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Menithal%2Fhifi-ipfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Menithal%2Fhifi-ipfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Menithal","download_url":"https://codeload.github.com/Menithal/hifi-ipfs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249606322,"owners_count":21298851,"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":["docker","flask-application","flask-sqlalchemy","ipfs","python","service","upload"],"created_at":"2024-08-02T00:00:47.736Z","updated_at":"2025-04-19T04:31:16.876Z","avatar_url":"https://github.com/Menithal.png","language":"Python","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Hifi-IFPS \"Heimdall\"\n## Web Node Proof of Concept\n\nThis is a proof of concept repository for rapidly setting up a service that allows one to upload Assets for High Fidelity via the IPFS and keep track of what has been uploaded to it.\n\nOthers may use this as a template to improve upon to make their own host nodes for ipfs with their own services.\n\n# Caution\n\n- IPFS is still in early development. See ipfs.io for more details\n- IPFS Can be quite a bandwidth and cpu hog. Suggest using it in a Droplet instead of EC2.\n- Use at your own risk if you have opened ports to the service.\n\n# Requirements\n\n- Docker\n- Docker Compose\n\n# Structure\n\n- `app` folder contains the source of the Basic Python Flask web service that is used to interface with ipfs\n- `Dockerfile` contains the Docker build file to build the python Flask webservice.\n- `docker-compose.yml` contains the docker compose file to run the entire service stack. This includes:\n   - gatekeeper - Built in this repository. Filters content that goes to the ipfs and gives a barebones ui to track what has been sent to it.\n   - ipfs - Interplanetary File System Node https://github.com/ipfs/go-ipfs\n   - db - Simple Credentials access control and Keeping track of file hashes, as a PSQL db example\n\nThe repository of it self contains both the python files for the prototype web service, and the docker compose file to start the entire service.\n\n### To run\n\nTo run the service\nYou first need to create an ```.env``` file with a secret key like\n\n```\nSECRET_KEY=\"This is a secret that should be unique replaced. Do not use this, make your own\"\n```\n\nAfter you can use docker compose\n\n```\ndocker-compose build;\ndocker-compose pull;\ndocker-compose up -d;\n```\nThis builds the current state of the service, and starts the entire stack using docker compose.\n\nOnce built, you no longer need build the service again.\nSimply running `docker-compose up -d` will get the entire service up and running.\n\nIf developing and you wish to rebuild the gatekeeper, use the  \n```\nsource rebuild.sh\n```\nShortcut to build the python service.\n\n### Basics Docker-Compose\n- `docker-compose build` - build anything that needs building.\n- `docker-compose pull` - grabs all the latest versions of the files\n- `docker-compose up -d` - puts all the services online, detachhed\n- `docker-compose down` - shut down all the services\n\n# Dev Requirements\n\nTo continue developing the project on your own or in your own fork, make sure to install the pip packages\n\nThe Current dev setup uses\n```\npip install Flask==1.0.2 ipfsapi==0.4.3 flask_sqlalchemy==2.3.2 flask-marshmallow==0.9.0 Flask-Migrate==2.2.1 psycopg2-binary==2.7.5 python-dotenv==0.8.2\n``` \nFeel free to update versions as they get update, and if you do, submit a pull request.\n\n\n### Gatekeeper Routes\n- `/plugin_routes` - Gives an overview of available routes for any plugin to use. This should always be available, as plugins will use this as references\n- `/new` \n    - *GET* - Interface for generating pseudoanonymous tokens that behave as username - token pairs\n    - *POST* - Generates a unique token for username, returns it in JSON\n- `/uploads` - Login to check all the IPFS files uploaded on this username - token combo.\n    - *GET* - Interface for generating\n    - *POST* - Lists all IPFS links uploaded with username - token pair, returned as JSON\n- `/upload` \n    - *GET* - Interface to push zip / fbx files with. Needs username and token.\n    - *POST* - multipart/form-data, where \"file\" should be a zip file, and username token should be defined\n\n### Plugins and /plugin_routes \n\n`/plugin_routes` This allows the service to be developed in other languages as well, if one so wishes, using their own route conventions. The routes is the first thing loaded by a Modelling package plugin (MPP), such as the Blender Plugin. This should return a json map with the following keys: \n\n- `new_user` - should point to an interface where the user can generate a new identity. The MMP should simply open the browser for the end user and point it to this url. \n- `asset_upload` - Should point to a POST interface which allows MMPs to POST a multipart/form-data file, with a username and token\n- `uploads` - Should point to an interface where the user can check all the links generated under their account that point to the ipfs and manage it there.\n\n\n### Enable HTTPS / TSL with the Docker Container\n\nIf you want to make a public gateway, you are doing it at your own risk, but it would always be good to have some transport security.\n\nYou can use certbot + lets encrypt to create a certificate for your dns domain. Once it is generated on the same server, it can be found under `/etc/letsencrypt/live/\u003cdomain\u003e`.\n\nThen you can modify the volume to be referred to in the `docker-compose.yml` file, and modify the `nginx/conf.d/nginx.conf` file to suit your needs.\n\n# License \n\nSee LICENSE.md","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMenithal%2Fhifi-ipfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMenithal%2Fhifi-ipfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMenithal%2Fhifi-ipfs/lists"}