{"id":16564006,"url":"https://github.com/brndnmtthws/rust-react-typescript-demo","last_synced_at":"2025-04-09T15:04:23.607Z","repository":{"id":34438883,"uuid":"166711123","full_name":"brndnmtthws/rust-react-typescript-demo","owner":"brndnmtthws","description":"Demo for Rust, React, Typescript, Docker, Terraform and Kubernetes","archived":false,"fork":false,"pushed_at":"2024-12-16T06:38:00.000Z","size":2394,"stargazers_count":70,"open_issues_count":2,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-09T15:03:57.137Z","etag":null,"topics":["boilerplate","docker","gcp","gke","kubernetes","learn-to-code","learning","react","rust","terraform","typescript"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brndnmtthws.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":"2019-01-20T21:25:38.000Z","updated_at":"2024-12-10T20:34:02.000Z","dependencies_parsed_at":"2023-10-17T01:19:29.086Z","dependency_job_id":"8a842517-9d32-4fe1-84bd-74f12d333094","html_url":"https://github.com/brndnmtthws/rust-react-typescript-demo","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/brndnmtthws%2Frust-react-typescript-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brndnmtthws%2Frust-react-typescript-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brndnmtthws%2Frust-react-typescript-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brndnmtthws%2Frust-react-typescript-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brndnmtthws","download_url":"https://codeload.github.com/brndnmtthws/rust-react-typescript-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055276,"owners_count":21040156,"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":["boilerplate","docker","gcp","gke","kubernetes","learn-to-code","learning","react","rust","terraform","typescript"],"created_at":"2024-10-11T20:42:59.421Z","updated_at":"2025-04-09T15:04:23.585Z","avatar_url":"https://github.com/brndnmtthws.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Node.js CI](https://github.com/brndnmtthws/rust-react-typescript-demo/workflows/Node.js%20CI/badge.svg?branch=master)](https://github.com/brndnmtthws/rust-react-typescript-demo/actions?query=workflow%3A%22Node.js+CI%22) [![Rust](https://github.com/brndnmtthws/rust-react-typescript-demo/workflows/Rust/badge.svg?branch=master)](https://github.com/brndnmtthws/rust-react-typescript-demo/actions?query=workflow%3ARust)\n\n# rust-react-typescript-demo\n\nThis repository contains demo code for my YouTube programming learning series about [Rust](https://www.rust-lang.org/), [React](https://reactjs.org/), [TypeScript](https://www.typescriptlang.org/), [Docker](https://docs.docker.com/install/), [Terraform](https://www.terraform.io/) and [Kubernetes](https://kubernetes.io/). For this project, we're creating **foodi**, a meal logging tool.\n\nThis project is intended to serve as an example, and can be used as boilerplate\nfor starting your own project. You can also watch the videos to learn more\nabout how it was built (mostly trial and error, like a lot of things in life\n😀).\n\nThis repo has the following features:\n\n- [Rust](https://www.rust-lang.org/), [Rocket](https://rocket.rs/), \u0026 [SQLx](https://github.com/launchbadge/sqlx) based backend\n- [React](https://reactjs.org/), [Mobx](https://mobx.js.org/), and [TypeScript](https://www.typescriptlang.org/) based frontend\n- [Parcel](https://parceljs.org/) for frontend packaging\n- [Docker](https://docs.docker.com/install/) image with frontend \u0026 backend all-in-one\n- [Terraform](https://www.terraform.io/) for managing a [GKE](https://cloud.google.com/kubernetes-engine/) cluster on [GCP](https://cloud.google.com/)\n- [Kubernetes](https://kubernetes.io/) manifest for running on GKE\n\nYou can find the videos on YouTube below:\n\n- [📽 Part 1](https://youtu.be/-DNF8qkJ0ws)\n- [📽 Part 2](https://youtu.be/aRpUbu2wTiA)\n- [📽 Part 3](https://youtu.be/GinLXQVqJM4)\n- [📽 Part 4](https://youtu.be/daHmhL1UCIs)\n- [📽 Part 5](https://youtu.be/xWf3VyThZJY)\n- [📽 Part 6](https://youtu.be/KhuZb5mF7C0)\n- [📽 Part 7](https://youtu.be/AOTswOoetjU)\n\nIn the series, we're building **foodi**, a web-based meal logger/tracking tool.\n\n## Compiling the Rust Backend Server\n\nTo build the Rust backend, you will need to install the Rust nightly build\nwith rustup. First, go to [https://rustup.rs/](https://rustup.rs/) and\ninstall rustup. Then, install Rust nightly:\n\n```ShellSession\n$ rustup default nightly\n...\n```\n\nOnce you have the nightly build installed, you can build the backend.\n\n### Build the Backend\n\n```ShellSession\n$ cd foodi-backend\n$ cargo build\n...\n```\n\n### Run the Database Migration Scripts\n\nTo create the initial database schema, run the migration scripts using\n`sqlx`:\n\n```ShellSession\n$ cargo install sqlx-cli\n...\n$ sqlx migrate run\n...\n```\n\n### Building the Backend Server\n\nLastly, you can now run the backend server:\n\n```ShellSession\n$ cargo run\n```\n\n## Running the Frontend Server\n\nTo build and run the frontend assets and server, you will need a recent\nversion of [Node.js]() and [Yarn](https://yarnpkg.com/en/) installed. Using homebrew on macOS, you can\ninstall it with homebrew:\n\n```ShellSession\n$ brew install yarn\n...\n```\n\n### Install package dependencies\n\nInstall the frontend package dependencies using Yarn:\n\n```ShellSession\n$ cd foodi-frontend\n$ yarn install\n...\n```\n\n### Run the Frontend Server\n\nUse `parcel` to run the frontend development server:\n\n```ShellSession\n$ parcel index.html\n...\n```\n\n## Build and run the Docker image\n\nAssuming you have Docker installed, run the build command from the top level of the repo:\n\n```ShellSession\n$ docker build . -t foodi:latest\n...\n```\n\nOnce the build completes, run the container, and map port 80 from inside the container to outside the container on port 8080 (on your host machine):\n\n```ShellSession\n$ docker run -p 8080:80 foodi:latest\n...\n```\n\n🎉 Now you can open `http://localhost:8080/` in your browser and test the app.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrndnmtthws%2Frust-react-typescript-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrndnmtthws%2Frust-react-typescript-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrndnmtthws%2Frust-react-typescript-demo/lists"}