A centralized project to manage the services and tools of my homelab.
homelab/
βββ backend/ # NestJS API + TypeScript
β βββ src/
β βββ dist/
β βββ test/
β βββ Dockerfile
β βββ nest-cli.json
β βββ tsconfig.json
βββ docker-compose.yml
βββ .env # Environment variables
βββ .env.example # Variables template
βββ Makefile
- Node.js 24+
- pnpm 10.28+
- Docker
# Install dependencies
make install
# Run backend in watch mode (development)
make devThe server starts by default on http://localhost:3000.
# Start all services (backend + database)
make docker-up
# Start only the database (for local backend development)
make docker-db
# View logs
make docker-logs
# Stop services
make docker-downEnvironment files live at the repo root.
Local: NestJS reads .env from the repo root via an absolute path.
Docker: docker-compose injects .env directly into the container β no files are copied into the image.
View all shortcuts:
make help- Runtime : Node.js 24.13 (Alpine in Docker)
- Framework : NestJS 11.x
- Language : TypeScript 5.9+
- Package Manager : pnpm 10.28+
- Build :
nest build(webpack) - Dev Server :
nest start --watch - Tests : Jest + Supertest
# Run unit tests
make test
# Run e2e tests
make test-e2e
# Compile and generate dist/
make build
# Run compiled JavaScript
node backend/dist/main.js- Create a folder at the root (e.g.,
frontend/,database/) - Add the necessary scripts in its
package.json - Create a
Dockerfile(if needed) - Add a service in
docker-compose.yml
The Dockerfile uses a multi-stage build to optimize image size:
- Builder : compiles TS, installs all dependencies
- Runner : lightweight final image with only compiled JS