The project is built using pnpm workspaces and divided in packages and services.
Packages contains all the common code used in services.
- @liexp/core contains all the core modules
- @liexp/shared contains domain specific definitions for
modelsandendpoints - @liexp/test contains some test utils
- @liexp/ui contains all
uicomponents
The services are the deployable projects:
The local development require some modules to be installed on your machine:
- node
- pnpm
- docker
- docker compose
The easiest way to run the project is by using docker compose.
The compose.yml contains all the definitions to run the needed services.
If you want to start developing with docker compose:
docker compose build # build base image
docker compose up -d db # starts db in background
docker compose up api web admin data # starts api, web, admin and data servicesN.B.: you need to run pnpm api watch in another shell to make the api container to trigger restart event
Services run behind an nginx reverse proxy on *.liexp.dev. To avoid browser
SSL warnings you need a locally-trusted self-signed wildcard certificate.
Prerequisites: openssl and (Linux only) certutil from nss-tools /
libnss3-tools.
# Generate certificate and trust it in Chrome, Firefox, and system CA store
./scripts/dev-ssl-certificate.shThe script:
- Generates
_data/certs/liexp.dev.crtand_data/certs/liexp.dev.key - macOS: adds the cert to the system Keychain (trusted by Chrome/Safari)
- Linux: adds the cert to
~/.pki/nssdb(Chrome), all Firefox profiles, and the system CA store viaupdate-ca-trust/update-ca-certificates
After running, reload nginx so it picks up the new certificate:
docker compose -f compose.reverse-proxy.yml up -d reverseproxy.devNote (Linux/Chrome): restart Chrome after running the script for the change to take effect.
pnpm buildBuild the images first with
# build `base`, `api` and `web` image
./scripts/docker-build.sh# start docker compose for `deploy/compose.yml`
./scripts/docker-deploy-test.sh