Skip to content

LoickBde/homelab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏠πŸ§ͺ Homelab

A centralized project to manage the services and tools of my homelab.

πŸ“‹ Architecture

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

πŸš€ Quick Start

Prerequisites

  • Node.js 24+
  • pnpm 10.28+
  • Docker

Local Installation

# Install dependencies
make install

# Run backend in watch mode (development)
make dev

The server starts by default on http://localhost:3000.

With Docker

# 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-down

πŸ“„ Configuration

Environment 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.

πŸ› οΈ Available Commands

View all shortcuts:

make help

πŸ“¦ Tech Stack

Backend

  • 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

πŸ“ Development

Build and Test Locally

# 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

Adding a New Service

  1. Create a folder at the root (e.g., frontend/, database/)
  2. Add the necessary scripts in its package.json
  3. Create a Dockerfile (if needed)
  4. Add a service in docker-compose.yml

🐳 Docker

Multi-stage Build

The Dockerfile uses a multi-stage build to optimize image size:

  1. Builder : compiles TS, installs all dependencies
  2. Runner : lightweight final image with only compiled JS

About

A centralized project to manage the services and tools of my homelab. 🏠πŸ§ͺ

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors