{"id":23016390,"url":"https://github.com/davidmaceachern/rust-web-template","last_synced_at":"2026-04-30T15:33:15.157Z","repository":{"id":56574699,"uuid":"272810829","full_name":"davidmaceachern/rust-web-template","owner":"davidmaceachern","description":"⛈️🦀 Examples of web/distributed application concepts to get started with, written in Rust.","archived":false,"fork":false,"pushed_at":"2020-12-11T09:47:00.000Z","size":96,"stargazers_count":0,"open_issues_count":15,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T18:13:39.916Z","etag":null,"topics":["collector","distributed-systems","example","kubernetes","minio","rusoto","rust","s3"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidmaceachern.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}},"created_at":"2020-06-16T20:58:15.000Z","updated_at":"2020-12-11T09:49:49.000Z","dependencies_parsed_at":"2022-08-15T21:10:49.246Z","dependency_job_id":null,"html_url":"https://github.com/davidmaceachern/rust-web-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davidmaceachern/rust-web-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmaceachern%2Frust-web-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmaceachern%2Frust-web-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmaceachern%2Frust-web-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmaceachern%2Frust-web-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidmaceachern","download_url":"https://codeload.github.com/davidmaceachern/rust-web-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmaceachern%2Frust-web-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32469344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["collector","distributed-systems","example","kubernetes","minio","rusoto","rust","s3"],"created_at":"2024-12-15T11:15:07.115Z","updated_at":"2026-04-30T15:33:15.140Z","avatar_url":"https://github.com/davidmaceachern.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n   ⛈️🦀\n\u003c/div\u003e\n\n\u003ch1 align=\"center\"\u003e\n  Rust Web Template\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n   Examples of \u003ca href=\"https://aws.amazon.com/builders-library/challenges-with-distributed-systems/\"\u003edistributed\u003c/a\u003e application concepts to get started with, written in \u003ca href=\"https://www.rust-lang.org/\"\u003eRustlang\u003c/a\u003e \n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca alt=\"GitHub Workflow Status\" href=\"https://github.com/davidmaceachern/rust-web-template/actions\"\u003e\n    \u003cimg  src=\"https://img.shields.io/github/workflow/status/davidmaceachern/rust-web-template/Rust\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\n## Features\n\n- `Collector` fetches data from the [Phemex Exchange](https://phemex.com/) and saves it to\n  a [Minio](https://min.io/) [S3](https://aws.amazon.com/s3/) bucket.\n- `Price-checker` lists and prints count of objects in the bucket.\n\n## Goals\n\n- Build a batch process, which is considered to be a \"offline distributed system\" as opposed to a real time analytics pipeline.\n- Attempt to map existing knowledge into a Rust application, consolidate skills and test Rust's readiness for this level of the stack.\n- Avoid being too opinionated about where it will be deployed.\n- Evolve to a state which it can be used to build out other ideas that I have.\n\n## Structure\n\n```\n|-- Cargo.toml            \u003c--- Where we can define our workspace configuration.\n|-- client                \u003c--- Logic for the app and tests to interface with infrastructure.\n|   |-- Cargo.toml        \u003c--- Where we can define client dependencies.\n|   `-- src\n|       `-- main.rs       \u003c--- Binary containing the client logic.\n|-- collector             \u003c--- Logic for collecting data from an external source.\n|   |-- Cargo.toml        \u003c--- Where we can define collector dependencies.\n|   `-- src\n|       `-- main.rs       \u003c--- Binary containing the collector logic.\n|       `-- phemex.rs     \u003c--- Module containing the domain types.\n|       `-- repository.rs \u003c--- Module containing the Minio (s3) logic.\n|-- infrastructure/       \u003c--- Example of how to deploy to Kubernetes\n|-- price-checker         \u003c--- Checks the previous prices for any patterns \n|   |-- Cargo.toml\n|   `-- src\n|      `-- main.rs\n|      `-- repository.rs\n|-- README.md             \u003c--- This file that you are reading.\n|-- run-dynamodb.sh       \u003c--- Bash script to run a local Dynamodb container.\n|-- run-s3.sh             \u003c--- Bash script to run a local Minio (S3) container.\n|-- run-e2e.sh            \u003c--- Bash script to run the collector and then the price checker.\n```\n\n## Development\n\nIn separate processes/terminal window run the services that we will be developing against.\n\nTo run the s3bucket server.\n\n`$ bash run-s3.sh`\n\nTo run the Rust application.\n\n`$ bash run-e2e.sh`\n\n`$ bash run-dynamodb.sh` \u003c----------------- todo\n\nRun syntax checking on client code as we develop by using `cd collector \u0026\u0026 cargo watch -s 'cargo build'`\n\nRun the client.\n\n`$ cargo run --bin client`\n\nRun the collector.\n`$ cargo run --bin collector`\n\nInstall new packages using `cargo add`.\n\nFormat code using `cargo fmt`.\n\n## Continuous Integration\n\n### Github Actions\n\nTwo actions are included:\n\n- `docker-publish` which currently publishes the collector container to the Github Container Registry whenever commits are pushed to the repository, read more [here](https://dev.to/davidmaceachern/how-to-fix-github-docker-containers-built-with-actions-162k).\n- `general` which runs `rust fmt` to keep the Rust code to commonly accepted standard upon pushing commits, fix issues with this build by running cargo fmt before commiting code.\n\n## Deployment\n\nKubernetes enables deployment to any provider that has Kubernetes installed. The following steps assume that a cluster has been installed.\n\n1. Check that a node is running on the cluster `$ kubectl get node`.\n2. Claim some data from the host system for Minio `$ kubectl create -f ./infrastructure/persistent-volume-claim.yaml`.\n3. Create the deployment `kubectl create -f ./infrastructure/deployment.yaml`.\n4. Create the Minio service `kubectl create -f ./infrastructure/service.yaml`.\n5. List to see what exists `kubectl get all`, or view the Minio access panel in the browser `http://127.0.0.1:9000/minio/login`.\n6. Delete `kubectl delete all -l example=rust-web-template`\n\n## License\n\nLicensed under either of Apache License, Version 2.0 or MIT license at your option.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidmaceachern%2Frust-web-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidmaceachern%2Frust-web-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidmaceachern%2Frust-web-template/lists"}