Run the frontend locally
Adding a development user in DynamoDB
To log into Luna in a local/lower environment you need an ANDi record in both the <environment>-andis-table for whichever lower environment you're testing against (e.g. polaris-andis-table) and the staging-andis-table — not the development-andis-table.
If you're new to AND (you joined after the latest datacopyback), the simplest way to get one is to run a luna datacopyback of just the andis table, which pulls your production record down into the lower environment.
Environment variables
Each frontend client runs from its own .env.local — the host (luna-front-end) and every microfrontend (the -mfa clients). Each folder ships a .env.local.sample; copy it to .env.local in that same folder as a starting point.
In luna-front-end, the sample has the lower-environment variable commented out, so uncomment the one relevant to your workstream — VITE_APP_API_DOMAIN, VITE_APP_API_DOMAIN_V2 and VITE_APP_API_DOMAIN_V3 all interpolate from it, e.g:
# PLEASE UNCOMMENT ONE OF THE FOLLOWING FOR YOUR STREAM
# VITE_APP_LOWER_ENV='polaris'
# VITE_APP_LOWER_ENV='pulsar'
# VITE_APP_LOWER_ENV='sol'
VITE_APP_API_DOMAIN=v1.${VITE_APP_LOWER_ENV}.dev.luna.and.sh
VITE_APP_API_DOMAIN_V2=v2.${VITE_APP_LOWER_ENV}.dev.luna.and.sh
VITE_APP_API_DOMAIN_V3=api.v3.${VITE_APP_LOWER_ENV}.dev.luna.and.shVITE_APP_API_DOMAIN_V3 is required for services that have been migrated to the shared API gateway (see Refactoring a service to use the main API gateway).
Running the front end
The preferred workflow runs the host and every microfrontend together, with hot reloading across all of them, using the luna CLI:
luna mfa install # installs deps for the host + every -mfa client
luna mfa dev # runs them all togetherThen go to localhost:3000 and click 'Login with Okta'. If you haven't set the CLI up yet, see Getting started with the CLI.
Running just the host (no microfrontends)
If you only need luna-front-end and don't want the MFEs running, start it on its own:
cdintoclients/luna-front-endyarn install— for the first install useyarn install --network-timeout 500000to avoid network timeoutsyarn start- Go to
localhost:3000and click 'Login with Okta'
