[]() The codebase is being roughed out, but finer details are likely to change.
Workspace or Package | Description | README |
---|---|---|
apps/api | Backend NestJS API server | |
apps/web | Frontend NextJS React app | |
packages/common | Shared library | |
packages/accessibility | Accessibility Test |
The Make
command run-local
to build and launch containers is defined in Makefile.
create containers
$ make run-local
destroy containers
$ make docker-down
Containers:
Containers are configured by Dockerfile and docker-compose.yml
Database Hostname Resolution
POSTGRES_HOST
env is defined asdb
, which is used as a service name in docker-compose.yml. Asapi
uses it to connect to the database and a service name is resolved as an address only in Docker environment, you need to redefine it to resolve it on your local machine. You can set it tolocalhost
if you persistently run the app in this way. Otherwise, add127.0.0.1 db
to/etc/hosts
.API Calls
NEXT_PUBLIC_API_URL=http://localhost:4000/api/v1
To make successful requests from
web
toapi
, you need to setNEXT_PUBLIC_API_URL
environment variable. It is set by default when using Docker or run bymake
command, but if you run the application bynext start
command inapps/web
folder, you should supply this value by creating a file named.env.local
placed inapps/web
.In order to make breakpoints work in
watch
mode, setsourceMap
totrue
in tsconfig.json and restart the apps.