{"id":15129950,"url":"https://github.com/rmwiesenberg/template-fastapi-react-k8s","last_synced_at":"2026-01-20T15:01:57.373Z","repository":{"id":254648871,"uuid":"847082124","full_name":"rmwiesenberg/template-fastapi-react-k8s","owner":"rmwiesenberg","description":"Template repo for FastAPI + React with auto-generation of Typescript models from React. Includes actions to lint, test, build, and deploy to k8s and github pages simultaneously.","archived":false,"fork":false,"pushed_at":"2024-09-06T17:00:17.000Z","size":223,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T19:20:49.196Z","etag":null,"topics":["fastapi","k8s","pages","pydantic","react","template","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"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/rmwiesenberg.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":"2024-08-24T19:48:16.000Z","updated_at":"2024-09-06T17:00:21.000Z","dependencies_parsed_at":"2024-08-25T03:43:45.876Z","dependency_job_id":null,"html_url":"https://github.com/rmwiesenberg/template-fastapi-react-k8s","commit_stats":null,"previous_names":["rmwiesenberg/template-fastapi-react-k8s"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/rmwiesenberg/template-fastapi-react-k8s","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmwiesenberg%2Ftemplate-fastapi-react-k8s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmwiesenberg%2Ftemplate-fastapi-react-k8s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmwiesenberg%2Ftemplate-fastapi-react-k8s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmwiesenberg%2Ftemplate-fastapi-react-k8s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rmwiesenberg","download_url":"https://codeload.github.com/rmwiesenberg/template-fastapi-react-k8s/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmwiesenberg%2Ftemplate-fastapi-react-k8s/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28605931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T14:45:23.139Z","status":"ssl_error","status_checked_at":"2026-01-20T14:44:16.929Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["fastapi","k8s","pages","pydantic","react","template","typescript"],"created_at":"2024-09-26T02:25:07.389Z","updated_at":"2026-01-20T15:01:57.357Z","avatar_url":"https://github.com/rmwiesenberg.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# template-fastapi-react-k8s\n\nTemplate repo for FastAPI + React with auto-generation of Typescript models from React. Includes actions to lint, test,\nbuild, and deploy to a locally-managed k8s instance and GitHub Pages simultaneously.\n\nThis template is python-first, meaning most api/control decisions are populated from the backend first, and then\nrecreated on the front-end. Namely by creating the model definition first in [api/model](template/model.py) and then running\nthe model generation scripts to provide the same structure to the front-end.\n\n## Structure and Layout\n\nThe managed python environment starts in the root directory, with the `pyproject.toml` and is backed up by several\nsub-directories and files:\n\n```\n[Development]\n- api/          \u003e fastapi code\n- scripts/      \u003e python scripts external to the api\n- template/     \u003e core logic and model for the api\n- tests/        \u003e tests for the api or scripts \n- web/          \u003e react-based single-page web app\n\n[Deployment]\n- k8s/          \u003e kubernetes deployment scripts (managed by .github/worflows)\n- Dockerfile    \u003e api image deployed to docker.io and pulled by k8s \n- VERSION       \u003e release version echo file (updated by deploy workflow)\n```\n\n### One-time setup\n\nAfter this repo is used as a template, there are several one-time changes that should be made to ensure all scripts are\nready for initial use and deployment.\n\n#### Connect to api\n\nReplace urls (`XXXX.template.com`) in api and web with your url for web and k8s respectively.\n\n#### K8s deployment setup\n\n1. rename all instances of `template` in [k8s](k8s) to your app name\n2. update the email in `encrypt.yml`\n3. update ENV variables in `.github/workflows/deploy.yml`\n4. run `login.sh` wherever your k8s is hosted to login to docker.io\n5. run `create-service-account.sh` to create a service account and get your secret information to use as a GitHub action\n   secret `K8S_SECRET`\n\n## Development\n\n### Installation\n\n- `poetry install`\n- (in `web/`) `yarn install`\n\n### Sharing model data\n\n1. Export model from python: `poetry run gen-model`\n2. Translate schema to TypeScript (in `web/`): `yarn run gen-model`\n\n### Local development\n- run api (in `api/`): `poetry run fastapi dev`\n- run web (in `web/`): `yarn run start`\n  - `REACT_APP_API_URL=http://localhost:8000`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmwiesenberg%2Ftemplate-fastapi-react-k8s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmwiesenberg%2Ftemplate-fastapi-react-k8s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmwiesenberg%2Ftemplate-fastapi-react-k8s/lists"}