{"id":23643497,"url":"https://github.com/zavvdev/fe-infra","last_synced_at":"2025-11-10T19:30:17.942Z","repository":{"id":269732823,"uuid":"908275407","full_name":"zavvdev/fe-infra","owner":"zavvdev","description":"Infrastructure layer boilerplate for Front-End applications","archived":false,"fork":false,"pushed_at":"2024-12-25T17:33:08.000Z","size":633,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-25T18:22:53.872Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zavvdev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-25T16:48:02.000Z","updated_at":"2024-12-25T17:33:11.000Z","dependencies_parsed_at":"2024-12-25T18:23:33.089Z","dependency_job_id":"b3ff0755-e2f6-4712-9e55-cea3751dea33","html_url":"https://github.com/zavvdev/fe-infra","commit_stats":null,"previous_names":["zavvdev/fe-infra"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zavvdev%2Ffe-infra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zavvdev%2Ffe-infra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zavvdev%2Ffe-infra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zavvdev%2Ffe-infra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zavvdev","download_url":"https://codeload.github.com/zavvdev/fe-infra/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239581755,"owners_count":19662960,"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-12-28T11:19:28.600Z","updated_at":"2025-11-10T19:30:17.909Z","avatar_url":"https://github.com/zavvdev.png","language":"TypeScript","readme":"# Infrastructure Layer Setup\n\nInfrastructure layer boilerplate for Front-End applications\n\n## What's included\n\n### cache-service\n\nFor caching sync/async function calls.\n\n### error-reporter-service\n\nAbstraction around anything that you want to use in your app for error reporting. For example, you can configure Sentry.\n\n### persisted-storage-service\n\nAbstraction around browsers localStorage api, but can be any storage you want.\n\n### http\n\nBasic Http service setup for handing application api requests/responses. With access/refresh token pair authorization flow. Access token saved on client-side, refresh token transfered via cookies.\n\n**Refresh token flow**:\n\n1. Setup api call retries. Three retries each 1.5s.\n\n2. For each api call (including post, put, delete, patch) that has failed with `invalid_token` - allow retry.\n\n3. Otherwise - deny retry flow for post, put, delete, patch calls.\n\n4. For first failed request with `invalid_token` try to refresh token. If for some reason token has not been refreshed withing retry period from point 1 - terminate session. If refreshed - all previously failed routes will be automatically retried.\n\n5. If refresh token failed - terminate session immediately.\n\n6. Refresh token call won't be triggered again, even if multiple requests have failed one by one, if refresh is already in progress or next refresh request has been triggered in \u003c 5 seconds interval. \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzavvdev%2Ffe-infra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzavvdev%2Ffe-infra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzavvdev%2Ffe-infra/lists"}