{"id":15902905,"url":"https://github.com/erikh/exercise-website","last_synced_at":"2025-04-02T20:14:12.653Z","repository":{"id":198466755,"uuid":"620796299","full_name":"erikh/exercise-website","owner":"erikh","description":"A website to track my exercise regimen; full stack in a single binary. Made in rust+react.","archived":false,"fork":false,"pushed_at":"2023-11-07T12:55:16.000Z","size":499,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-08T10:42:39.937Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erikh.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-03-29T11:47:12.000Z","updated_at":"2023-11-09T16:30:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"cc716a7d-337d-43cf-b2aa-3fc4d7bc071d","html_url":"https://github.com/erikh/exercise-website","commit_stats":{"total_commits":54,"total_committers":1,"mean_commits":54.0,"dds":0.0,"last_synced_commit":"1ee774b9fa4c1f33a1d9ffdfa6efa54f85f054d6"},"previous_names":["erikh/exercise-website"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikh%2Fexercise-website","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikh%2Fexercise-website/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikh%2Fexercise-website/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikh%2Fexercise-website/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erikh","download_url":"https://codeload.github.com/erikh/exercise-website/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246884767,"owners_count":20849554,"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":[],"created_at":"2024-10-06T12:00:33.788Z","updated_at":"2025-04-02T20:14:12.636Z","avatar_url":"https://github.com/erikh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Exercise Website\n\nI needed an app to track my daily exercise and keep me honest.\n\nThis uses [davisjr](https://github.com/erikh/davisjr) to serve a\nbinary-embedded react application which posts to a database. It could serve as\nan example application for that toolkit.\n\nThe resulting binary is approximately 7MB with the current release build\nsettings and only links against libc. It requires no other infrastructure to\nfunction as a web application.\n\n### Development\n\nFirst off, make sure your node environment is in order. `cd react_app \u0026\u0026 npm i`\nis probably a good first step, and if things still break a `npm i --global\nreact-scripts` will probably get you the last mile.\n\nType `make`. A `cargo install --path .` will bundle the whole website into the\nbinary, so it can be served by e.g. a container with ease, but it does not\ncompile the react payload without typing `make`. Eventually I will write a\nproper `build.rs` for it. The resulting binary does not need `nginx` or any\nother supporting infrastructure unless you want to manipulate the transport\nsomehow. It just listens on port 3000.\n\nThe application provides no authentication or authorization control.\n\nThe handlers this program implements mimic the `try_files` directive of `nginx`\nso that it is compatible with `react-router`'s behavior. What this means is\nthat in all cases where a filename does not match, it is forwarded to\n`/index.html` with the target path appended to it. This way, `react-router` can\nroute the path with javascript.\n\n### Deployment\n\n`make docker` will build the react application and then build a local docker\nimage called `exercise-website`. It uses the rust image as a build stage and\nthen copies the assets into a thinner image.\n\n### Author\n\nErik Hollensbe \u003cerik+github@hollensbe.org\u003e\n\n### License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikh%2Fexercise-website","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferikh%2Fexercise-website","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikh%2Fexercise-website/lists"}