This is the monorepo for ai.gov. It uses Turborepo and pnpm for repo and dependency management respectively.
Additional documentation:
This project uses the version of Node.js defined in .nvmrc. To ensure you're using the correct node version, you may use the Node Version Manager (NVM):
nvm install
It may be helpful to add the following to your bash config so nvm is automatically detected:
_nvmrc_hook() {
if [[ $PWD == $PREV_PWD ]]; then
return
fi
PREV_PWD=$PWD
[[ -f ".nvmrc" ]] && nvm use
}
if ! [[ "${PROMPT_COMMAND:-}" =~ _nvmrc_hook ]]; then
PROMPT_COMMAND="_nvmrc_hook${PROMPT_COMMAND:+;$PROMPT_COMMAND}"
fi
This project uses pnpm workspaces. To work with this project, install pnpm and then the project dependencies:
pnpm install
This project uses playwright tests. Run this command to install.
pnpm exec playwright install
To run tests.
pnpm test
If you start having unexplained build errors, the following commands are useful to clean up and start fresh.
pnpm clean:dist # removes previously built files recursively
pnpm clean:modules # removes node_module directories recursively
# ... run more commands like pnpm install and pnpm build after you have run these
To start developing with hot reloading, use:
pnpm build
then run:
pnpm dev
To start developing each app individually, use:
pnpm build:site
pnpm build:console
then run:
pnpm dev:site
pnpm dev:console
These local servers will be started:
- Public website (./apps/site) - http://localhost:4321/
- Private console dashboard (./apps/console) - http://localhost:4322/
To lint the source code:
pnpm lint
To check types the source code:
pnpm check-types