This is the development repository for HumanDBs. The application description will be added later. Currently, this document focuses on development-related information.
As defined in ./package.json, there are two workspaces: apps/frontend and apps/backend.
Using Docker, you can enter the development environment with the following commands:
docker network create humandbs-dev-network
docker compose -f compose.dev.yml up -d --build
docker compose -f compose.dev.yml exec backend bash
docker compose -f compose.dev.yml exec frontend bashSince the host's root directory is mounted directly into the container (refer to docker-compose.dev.yml), any changes made on the host side are immediately reflected inside the container.
Bun is used as the runtime.
There is a package.json at the root level as well as within each workspace.
Common dependencies across workspaces should be listed in the root package.json, while workspace-specific dependencies belong in the respective workspace's package.json.
Note that node_modules is not shared between the container and the host.
Therefore, if your editor (e.g., VSCode) requires node_modules on the host side, you will need to run:
bun install --frozen-lockfileIf you want to install a package, first run the following inside the container:
bun install <some-package>(This will update package.json and bun.lockb.)
Then, on the host side, run:
bun install --frozen-lockfileThis ensures node_modules is updated properly on the host as well.
Shared ESLint configuration is defined in ./packages/eslint-config.
Each workspace (e.g., apps/backend) can create its own eslint.config.js, importing the shared configuration as needed.
-
cdintoapps/frontend -
Copy
.env.exampleto new.envfile:
cp .env.example .env- Fill in your own GitHub credentials (and any other secrets).
- Run
docker compose -f compose.dev.yml up -d --buildThat would build and run docker containers. - Enter the container's sh:
docker exec -it <container_id> sh- In the container's sh, run
bun run front:devfrom the root.
For running the
docker compose, entering thefrontent's container'sshandcd-ing intoapps/frontendfolder, use shourtcut command
bun run front:shThen run the frontend with bun run dev