{"id":24482950,"url":"https://github.com/tylerbloom/avid-rustacean","last_synced_at":"2025-04-13T16:50:33.097Z","repository":{"id":186399883,"uuid":"675066573","full_name":"TylerBloom/avid-rustacean","owner":"TylerBloom","description":"This repo contains the code for my blog, The Avid Rustacean","archived":false,"fork":false,"pushed_at":"2025-03-03T23:18:48.000Z","size":438,"stargazers_count":47,"open_issues_count":20,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T08:11:56.736Z","etag":null,"topics":["fullstack","rust"],"latest_commit_sha":null,"homepage":"https://avid-rustacean.shuttleapp.rs/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TylerBloom.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":"2023-08-05T16:55:40.000Z","updated_at":"2025-03-17T14:52:27.000Z","dependencies_parsed_at":"2024-05-16T04:33:46.625Z","dependency_job_id":"161b287e-f834-4e8a-8764-40b2f2d7e6c8","html_url":"https://github.com/TylerBloom/avid-rustacean","commit_stats":null,"previous_names":["tylerbloom/avid-rustacean"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerBloom%2Favid-rustacean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerBloom%2Favid-rustacean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerBloom%2Favid-rustacean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerBloom%2Favid-rustacean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TylerBloom","download_url":"https://codeload.github.com/TylerBloom/avid-rustacean/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248749897,"owners_count":21155680,"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":["fullstack","rust"],"created_at":"2025-01-21T12:15:58.761Z","updated_at":"2025-04-13T16:50:33.079Z","avatar_url":"https://github.com/TylerBloom.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![GitHub Workflows](https://github.com/TylerBloom/avid-rustacean/actions/workflows/ci.yml/badge.svg)\n![Deployment](https://img.shields.io/endpoint?url=https%3A%2F%2Favid-rustacean.shuttleapp.rs%2Fapi%2Fv1%2Fbadge\u0026label=Deployment)\n![Maintenance](https://img.shields.io/badge/Maintenance-Actively%20Developed-brightgreen.svg)\n\n## The Avid Rustacean\nThis repo contains all of the code for my blog, The Avid Rustacean.\nThe blog is fully Rust (front and back ends) and is split into three crates, `backend`, `model`, and `frontend`.\n\nThe backend uses Axum as its REST framework and MongoDB as its database.\nWhen deployed, the backend's build script compiles the frontend assets (the HTML index, the WASM module, and the JS bridge code) and statically binds them into the server executable.\n\nThe frontend uses a combination of Yew and Ratatui to provide a TUI aesthetic in the browser.\nTo see how this is done, check out [the article](https://avid-rustacean.shuttleapp.rs/blog/About-This-Blog) that I wrote about its creation.\n\nLastly, the model crate contains common code between the front and back ends (and a bit extra).\nFor example, the markdown AST definition is found here as well as the server-side parsing code and syntax highlighting code.\n\n## Contributions\nFeel free to make suggestions, bring up things that would make the site easier to use, or to fork this repo to make your own blog.\nAll that I ask is for derived works to also be AGPL-licensed.\nThe point of this project (both blog code and blog posts) is to share what I've created and thought about.\nI ask that others approach this project with the same desire.\n\n## Development\nIf you'd like to run a local version of this project for development, there are a few requirements.\n\nFirst, let's get the backend compiling.\nThe backend uses [Shuttle](https://www.shuttle.rs/beta) for deployment, which has a local deployment option.\nInstall shuttle via cargo with `cargo install cargo-shuttle`.\nShuttle uses docker, so make sure that it is installed and running.\n\nNext, the frontend.\nYou'll need to make sure you have the `wasm32-unknown-unknown` target installed via `rustup` (or however you manage your Rust toolchains).\nFor local deployments, you will need [Trunk](https://trunkrs.dev/), which you can install via cargo with `cargo install trunk`.\n\nFor running everything, you'll launch the front and back ends separately.\nIn the `backend` directory, simply run `cargo shuttle run`.\nThis will compile and run the backend server, which will listen to requests on port 8000.\nIf you change the backend, you will need to re-run this.\nIn the `frontend` directory, run `trunk serve`.\nTrunk acts like a frontend proxy that serves the frontend assets and proxies any other calls to the backend.\nThe `Trunk.toml` file contains this config.\nBy default, Trunk serves assets on port 8080.\nIf you make code changes to the frontend, Trunk will automatically recompile and re-deploy the frontend without you needing to reload the page.\n\nTo access the app on the machine that's deploying it, simply go to `http://localhost:8080`, and you'll see it.\nIf you'd like to access it from another device (like a phone), make sure both the host and client devices are on the same network.\nWhen you launch Trunk, you'll see a few output like this:\n```\n    🏠 http://127.0.0.1:8080\n    💻 http://192.168.202.218:8080\n    💻 http://172.0.0.1:8080\n```\nThe middle one contains your local IP address.\nOn the client device, go to that address and you'll see your app.\n\n## Future Plans\nCurrently, this project stands is an MVP.\nIt works and is relatively easy to use (on desktop), but there is a lot of room for improvement.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylerbloom%2Favid-rustacean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftylerbloom%2Favid-rustacean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylerbloom%2Favid-rustacean/lists"}