# frontend-workstation

`frontend-workstation` contains the header, footer and main navigation. Also, it includes a dynamic module loader (DML) that matches any url route against known modules. Given a route like `/analytics/audience`, the DML will dynamically fetch and render the root application component from the `frontend-audience-page` project.
You may think of `frontend-workstation` as the master layout file for our SPA.

Read more about the workstation architecture here:
https://www.notion.so/Workstation-dcc8d925b1d94aad80afcab1e9067c02

## Setup

```bash
# install dependencies
pnpm install

# create environment configuration
cp .env.shadow .env
```

**NOTE:**

-   **Running the project locally requires an active VPN connection.**
-   **Make sure you have configured access to our private NPM packages.**
    https://www.notion.so/Javascript-Package-Management-Setup-9553d5d491c94835aa787fdf0fc4838d
-   Local dev targets QA. The default GraphQL URL points at the
    workstation graphql-gateway, with the
    `frontend_workstation_graphql_router` FF rewriting it to graphql-router
    at runtime (the FF is on in QA). There is no production-backed
    local-dev path. See
    [Local development and impersonation](docs/local-development.md) for
    how to sign in and impersonate a label.

## Main concepts

-   [How does it all work](docs/overview.md)
-   [Module structure](docs/module.md)
-   [Sitemap and routing](docs/sitemap.md)
-   [Using environment variables](docs/configuration.md)
-   [Local development and impersonation](docs/local-development.md)
-   [Identity context and authorization](docs/identity.md)
-   [Localization](docs/localization.md)

## Guides

-   [Debugging frontend-workstation from a module](docs/guides/debugging.md)

## API Reference

-   [frontend-localization](docs/api/frontend-localization.md)
-   [frontend-cli](https://github.com/theorchard/frontend-cli)

## Advanced

-   [Overriding webpack configuration](docs/advanced/webpack.md)

## Help

-   [Troubleshooting](docs/help/troubleshooting.md)
