{"id":18355153,"url":"https://github.com/flowup/entry-task","last_synced_at":"2025-10-09T02:23:27.047Z","repository":{"id":90369122,"uuid":"159528300","full_name":"flowup/entry-task","owner":"flowup","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-20T15:02:10.000Z","size":776,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-15T16:51:51.999Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/flowup.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":"2018-11-28T16:02:40.000Z","updated_at":"2022-06-20T15:02:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ff411d5-d90d-47d9-b04f-0f182cb1b7f7","html_url":"https://github.com/flowup/entry-task","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/flowup%2Fentry-task","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowup%2Fentry-task/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowup%2Fentry-task/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowup%2Fentry-task/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flowup","download_url":"https://codeload.github.com/flowup/entry-task/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248141243,"owners_count":21054417,"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-11-05T22:06:08.845Z","updated_at":"2025-10-09T02:23:22.026Z","avatar_url":"https://github.com/flowup.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Entry Task (Example Solution)\n\n## Directory Structure\n\nThe `app` directory contains the following directories:\n\n- `actions`\n- `components`\n- `directives`\n- `effects`\n- `guards`\n- `interceptors`\n- `models`\n- `pipes`\n- `reducers`\n- `selectors`\n- `views`\n\n## Routing\n\n`@ngrx/router-store` is not used for maximum flexibility. Instead the following routing-related entities occupy the app:\n\n- `RouteModel`\n- `NavigateAction`\n- `StoreRouteAction`\n- `routeReducer`\n- `RouteEffects`\n- `whenNavigated()`\n- `NavigateDirective`\n\n### Example Use-case\n\n1. A link with the `[appNavigate]=\"{view: RoutePath.Recipes, id: recipe.id}\"` directive is clicked. The directive dispatches a `NavigateAction` with the inputted `RouteModel` as its payload.\n2. Each instance of the `whenNavigated()` operator (hooked onto the `actions$: Actions` observable) catches the `NavigateAction` and passes the `RouteModel` in its payload to the passed-in mapper function.\n    1. Based on the specified predicate, the mapper function defined in the `RecipeDetailEffects.requireRecipeById$` effect returns a new `GetRecipeRequestAction`, which is therefore dispatched.\n    2. The `RecipeDetailEffects.getRecipeById$` catches the `GetRecipeRequestAction` and triggers the resource's retrieval.\n3. The `RouteEffects.navigate$` effect also catches the `NavigateAction`, serializes the `RouteModel` in the action's payload to a URL and passes it to the `Router.navigateByUrl()` method.\n4. The router's navigation cycle begins. The `RecipeDetailGuard.canActivate()` method is invoked (due to routes config in the `AppRoutingModule`) and allows the routing to continue only when the necessary resource (recipe detail) has been loaded.\n5. The router's navigation cycle ends with the `NavigationEnd` event, which gets caught by the `RouteEffects.storeRoute$` effect. The URL carried by the event is parsed into a `RouteModel`, which becomes the payload of a newly dispatched `StoreRouteAction`.\n6. The `routeReducer` catches the  `StoreRouteAction` and stores the `RouteModel` in its payload in the `route` slice of the app state.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowup%2Fentry-task","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflowup%2Fentry-task","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowup%2Fentry-task/lists"}