{"id":17030359,"url":"https://github.com/vsoch/resource-explorer","last_synced_at":"2025-04-12T12:11:58.390Z","repository":{"id":141667966,"uuid":"207887867","full_name":"vsoch/resource-explorer","owner":"vsoch","description":"Select a resource or service based on filtering down criteria","archived":false,"fork":false,"pushed_at":"2019-09-12T19:02:19.000Z","size":200,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T06:51:12.600Z","etag":null,"topics":["resource-explorer","srcc"],"latest_commit_sha":null,"homepage":"https://vsoch.github.io/resource-explorer/","language":"CSS","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/vsoch.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}},"created_at":"2019-09-11T19:12:37.000Z","updated_at":"2023-08-21T11:26:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"cf404317-1055-45de-99ce-f137d70008be","html_url":"https://github.com/vsoch/resource-explorer","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":0.07692307692307687,"last_synced_commit":"54e2035cfb0f6f6613488d9c90d74e7e483b7c52"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fresource-explorer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fresource-explorer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fresource-explorer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fresource-explorer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vsoch","download_url":"https://codeload.github.com/vsoch/resource-explorer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565077,"owners_count":21125417,"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":["resource-explorer","srcc"],"created_at":"2024-10-14T08:06:30.244Z","updated_at":"2025-04-12T12:11:58.385Z","avatar_url":"https://github.com/vsoch.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Resource Explorer\n\n![img/resource-explorer.png](img/resource-explorer.png)\n\nThis is a resource explorer for interactive selection of a storage, compute, service,\nor other resource provided by Research Computing. The idea comes by way\nof the griznoggiest wisdom of @griznog.\n\n## Resources and Questions\n\nThe [resource-explorer.js](resource-explorer.js) starts with variables for questions\nand resources that drive the logic of the interface. The user will be presented\nwith a series of easy to answer questions, and the selection of resources\nwill be narrowed down based on the answers. Specifically:\n\n### Questions\n\nInclude multiple-choice, single-choice, boolean, and enumerate-choice.\n\n - **multiple-choice** means that the user can select zero through N choices. For example, I might want to select that a resource is for staff, faculty, and students.\n - **single-choice**: is a choice question where the user is only allowed to select one answer. If you need to implement a boolean, use a single-choice with two options.\n - **minimum-choice**: indicates a single choice field where the choices have integer values, and the user is selecting a minimum. For example, if the user selects a minimum storage or memory size, all choices above that will remain.\n - **maximum-choice**: is equivalent to minimum-choice, but opposite in direction. We select a maximum.\n\nIn the above, an enumerate choice implies there is an ordering to the logic. The user might want a minimum or maximum\namount of memory, for example. Each question should be under the questions variable (a list), and have a title, description, required (true or false) and then options. For example:\n\n```json\n      {\n         \"title\": \"Who is the resource for?\",\n         \"id\": \"q-who\",\n         \"description\": \"Select one or more groups that the resource is needed for.\",\n         \"required\": false,\n         \"type\": \"multiple-choice\",\n         \"options\": [\n            {\n               \"name\": \"faculty\",\n               \"id\": \"who-faculty\"\n            },\n            {\n               \"name\": \"staff\",\n               \"id\": \"who-staff\"\n            },\n            {\n               \"name\": \"student\",\n               \"id\": \"who-student\"\n            }\n         ]\n      }\n```\n\nFor a minimum-* or maximum-* choice, the ids must end in an integer value:\n\n```json\n      {\n         \"title\": \"What size of storage are you looking for?\",\n         \"id\": \"q-size\",\n         \"description\": \"If applicable, give an approximate unit of storage.\",\n         \"required\": false,\n         \"type\": \"minimum-choice\",\n         \"options\": [\n            {\n               \"name\": \"gigabytes\",\n               \"id\": \"size-gigabytes-1\"\n            },\n            {\n               \"name\": \"terabytes\",\n               \"id\": \"size-terabytes-2\"\n            },\n            {\n               \"name\": \"petabytes\",\n               \"id\": \"size-petabytes-3\"\n            }\n         ]\n      },\n```\n\nWe do this so we can parse the ids and then rank order them. For a boolean choice, you can just use a single-choice\nwith two choices:\n\n```json\n      {\n         \"title\": \"Do you require backup?\",\n         \"id\": \"q-backups\",\n         \"description\": \"Some or all of your files will be copied on a regular basis in case you need restore.\",\n         \"required\": false,\n         \"type\": \"single-choice\",\n         \"options\": [\n            {\n               \"name\": \"backups\",\n               \"id\": \"backups-true\"\n            },\n            {\n               \"name\": \"no backups\",\n               \"id\": \"backups-false\"\n            }\n         ]\n      },\n```\n\nNotice that each choice has a unique id associated with it. These will be used as tags associated with each\nresource to help with the filtering.\n\n### Resources\n\nA typical resource looks like this:\n\n```json\n      {\n         \"title\": \"Nero\",\n         \"id\": \"nero\",\n         \"url\": \"https://nero-docs.stanford.edu\",\n         \"attributes\": {\n           \"q-kind\": [\"kind-compute\", \"kind-cloud\"],\n           \"q-service\": [],\n           \"q-who\": [\"who-faculty\"], // only faculty allowed\n                                     // domain is left out, implying all domains\n                                     // size is left out, implying all sizes\n           \"q-framework\": [\"framework-kubernetes\", \"framework-containers\"],\n           \"q-backups\": [\"backups-true\"]\n         }\n      },\n```\n\nNote that we require a title (a user friendly print-able value), an id (for the object in the DOM), a url to\nlink to, and then a list of attributes. For each attribute, the key corresponds to an id for a question,\nand then the list of values is a list of responses that, if chosen by the user, would make \nit a valid choice. Specifically:\n  \n - if a question key is defined but empty, a selection of any field for the key invalidates the resource.\n - if a question key is not defined, making a choice for any field for doesn't impact the resource (it stays or remains hidden).\n - if a question key includes a subset of choices, then the resource is kept only if the user chooses a selection in the list.\n\nFor the above, this would mean that:\n\n - if the user selected any kind of `q-service`, the Nero option would be hidden.\n - if the user selected kind-compute and/or kind-cloud, Nero would remain.\n - if the user selected any other kind of audience other than faculty (who-faculty) Nero would be hidden.\n - Selecting framework as kubernetnes or containers will keep Nero. Selecting slurm (not in the list) will hide it.\n - Selecting backups-false will hide Nero.\n\nThis repository serves only as an example, and doesn't reflect the actual state of Stanford resources (but we will make one!)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsoch%2Fresource-explorer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvsoch%2Fresource-explorer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsoch%2Fresource-explorer/lists"}