{"id":17156320,"url":"https://github.com/jtroo/resource-aggregator","last_synced_at":"2026-04-20T05:31:48.670Z","repository":{"id":111804056,"uuid":"376489258","full_name":"jtroo/resource-aggregator","owner":"jtroo","description":"Resource aggregator and reservation","archived":false,"fork":false,"pushed_at":"2021-08-08T06:00:41.000Z","size":445,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T13:46:11.294Z","etag":null,"topics":["angular","rocket","rust"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jtroo.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":"2021-06-13T08:55:06.000Z","updated_at":"2021-08-08T06:00:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"dd4bc3d3-26d8-4147-ae0a-fed9af65318f","html_url":"https://github.com/jtroo/resource-aggregator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jtroo/resource-aggregator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtroo%2Fresource-aggregator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtroo%2Fresource-aggregator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtroo%2Fresource-aggregator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtroo%2Fresource-aggregator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jtroo","download_url":"https://codeload.github.com/jtroo/resource-aggregator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtroo%2Fresource-aggregator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32034589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"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":["angular","rocket","rust"],"created_at":"2024-10-14T22:06:09.255Z","updated_at":"2026-04-20T05:31:48.652Z","avatar_url":"https://github.com/jtroo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rocket Resource Aggregator\n\nThis project is a basic data aggregator for resources on a LAN.\n\nThe LAN wording is important because there are no security considerations done\nfor the code.\n\nThe HTTP server runs on Rocket 0.5 and uses sqlx+postgresql as the database.\n\nThe client side is Angular 12.\n\nFor the most part, this is a learning project for Rocket and Angular, though it\nalso fulfills a personal need.\n\n# Demo video\n\n[Click here](https://user-images.githubusercontent.com/6634136/128622429-82043e9c-3241-48f7-aa94-9f98bc6ec10a.mp4)\n\n# Server quick start\n\nThese instructions don't serve the client-side files — only the server APIs\nwhich will allow CORS requests from the default Angular `ng serve` address.\n\nTo serve client-side files, see the [front-end](#Frontend-quick-start) and\n[build](#Build) sections.\n\n## Dependencies\n\n- Docker\n- docker-compose\n- rustc `\u003e= 1.52.1`\n- [sqlx CLI](https://github.com/launchbadge/sqlx/blob/master/sqlx-cli/README.md)\n\n## Set up a database\n\nThere is a [docker-compose.yml](./docker-compose.yml) file that can be used to\nquickly set up a postgres docker container. Run the command below from the root\nfolder of the git repository:\n\n```\ndocker-compose up -d\n```\n\n## Start the server\n\nUse the commands below to start the Rocket HTTP server:\n\n```\nexport DATABASE_URL=postgres://default@localhost:6000\nexport PGPASSWORD=default\nexport SQLX_OFFLINE=true\ncargo run --features dev_cors\n```\n\n# Frontend quick start\n\n## Dependencies\n\n- node (latest or an active LTS version)\n- Angular CLI (Angular 12)\n\n## Serve the files\n\n```\ncd public\nng serve\n```\n\n# Example APIs\n\n## Get all resources\n\n```sh\ncurl http://localhost:8000/resource\n```\n\n## Create a new resource\n\n``` sh\n# The fields `name` and `description` are required\ncurl http://localhost:8000/resource/new \\\n  -X POST \\\n  -H 'Content-Type: application/json' \\\n  --data '{\"name\":\"hello\",\"description\":\"hello world\"}'\n```\n\n## Update an existing resource\n\n``` sh\n# all fields except `name` are optional\n\ncurl http://localhost:8000/resource \\\n  -X POST \\\n  -H 'Content-Type: application/json' \\\n  --data '{\"name\":\"hello\",\"description\":\"this is a useful description\"}'\n\ncurl http://localhost:8000/resource \\\n  -X POST \\\n  -H 'Content-Type: application/json' \\\n  --data '{\"name\":\"hello\",\"status\":\"unused\"}'\n\ncurl http://localhost:8000/resource \\\n  -X POST \\\n  -H 'Content-Type: application/json' \\\n  --data '{\"name\":\"hello\",\"other_fields\":{\"hi\":\"hello\"}}'\n```\n\n## Delete a resource\n\n```sh\ncurl http://localhost:8000/resource \\\n  -X DELETE \\\n  -H 'Content-Type: application/json' \\\n  --data '{\"name\":\"hello\"}'\n```\n\n# Build\n\nThese are the instructions to generate a `.tar.gz` file containing all that is\nneeded to run the application on another device. The other device needs to have\ndocker and docker-compose installed.\n\n## Dependencies\n\nBuilding depends on both the [server](#Dependencies) and [front-end](#Dependencies-1) dependencies.\n\n## Commands\n\n```sh\n# create the archive\nbash build.sh\n\n# move the bundle\nrsync -avz resource-aggregator.tar.gz my_ssh_alias:~\n\n# ssh into the other device.\nssh my_ssh_alias\n\ntar xf resource-aggregator.tar.gz\ncd resource-aggregator\ndocker-compose up -d\n\n# usually need sudo to serve on port 80\nsudo bash -c '\nexport DATABASE_URL=postgres://default@localhost:6000\nexport PGPASSWORD=default\nexport ROCKET_ADDRESS=0.0.0.0\nexport ROCKET_PORT=80\n./server'\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjtroo%2Fresource-aggregator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjtroo%2Fresource-aggregator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjtroo%2Fresource-aggregator/lists"}