Turborepo + pnpm monorepo for k3s homelab cluster on Intel NUCs. - Apps: Next.js web frontend, Express API (TypeScript, Dockerfiles, k8s manifests) - Packages: shared UI, ESLint config, TypeScript config, Drizzle DB schemas - Infra/Ansible: bare-metal provisioning with roles for common, k3s-server, k3s-agent, hardening - Infra/Kubernetes: ArgoCD GitOps (app-of-apps + ApplicationSets), platform components (cert-manager, Traefik, CloudNativePG, Valkey, Longhorn, Sealed Secrets), namespaces - Observability: kube-prometheus-stack, Loki, Promtail as ArgoCD Applications - CI/CD: GitHub Actions for PR builds, preview deploys, production deploys - DX: Taskfile, utility scripts, copier templates, Ubiquiti network docs
1.9 KiB
1.9 KiB
Homelab
Monorepo for self-hosted applications running on a k3s cluster across Intel NUC machines.
What's Inside
- Apps: Next.js frontend, Express API (TypeScript)
- Infrastructure: Ansible provisioning, ArgoCD GitOps, full Kubernetes platform
- Observability: Prometheus, Grafana, Loki
Prerequisites
Quick Start
# Install dependencies
pnpm install
# Start development
task dev
# Build all apps
task build
Bootstrap Cluster (Day 1)
- Flash Ubuntu Server 24.04 on NUCs, configure SSH access
- Configure Ubiquiti Cloud Gateway (see
infra/ubiquiti/) - Provision nodes and install k3s:
task cluster:bootstrap task cluster:kubeconfig - Install platform components:
task platform:install - Seal initial secrets:
task secrets:seal - Push an app — ArgoCD handles the rest
Branch Deploys
Push a branch or open a PR → GitHub Actions builds changed apps → ArgoCD creates a preview namespace → merge to main deploys to production.
Project Structure
homelab/
├── apps/ # Deployable applications
├── packages/ # Shared libraries
├── infra/
│ ├── ansible/ # Bare-metal provisioning
│ ├── kubernetes/ # K8s manifests (ArgoCD, platform, observability)
│ └── ubiquiti/ # Network documentation
├── scripts/ # Utility scripts
├── templates/ # App scaffolding templates
└── Taskfile.yaml # Task runner
License
Private — All rights reserved.