Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
23 changes: 23 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
cooldown:
default-days: 7
groups:
actions:
patterns: ["*"]
update-types: [minor, patch]

- package-ecosystem: npm
directory: /
schedule:
interval: weekly
cooldown:
default-days: 7
groups:
npm-dependencies:
patterns: ["*"]
update-types: [minor, patch]
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: ci

on:
push:
branches: [main]
pull_request:

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: kleinbem/actions/nix-setup@f1b4f5fc52ea31b1f9e53ca29170570fe4651c7d # v1.7.1
- name: Flake check
run: nix flake check
- name: Svelte check
run: |
nix develop --command npm ci
nix develop --command npm run check
- name: Build web
run: nix build .#default
21 changes: 21 additions & 0 deletions .github/workflows/fleet-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: fleet-lint

on:
push:
branches: [main]
pull_request:

permissions: {}

jobs:
fleet-lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # gitleaks scans every commit of the PR
persist-credentials: false
- uses: kleinbem/actions/nix-setup@f1b4f5fc52ea31b1f9e53ca29170570fe4651c7d # v1.7.1
- uses: kleinbem/actions/lint@f1b4f5fc52ea31b1f9e53ca29170570fe4651c7d # v1.7.1
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
node_modules/
.svelte-kit/
build/
dist/
.env
.env.*
!.env.example
.direnv/
result
result-*
*.log
.DS_Store
1 change: 1 addition & 0 deletions .goosehints
26 changes: 26 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# AGENTS.md

Guidance for AI assistants working on Foyer.

## What Foyer is

Foyer is the lightweight, next-generation homelab portal and service launchpad for the kleinbem fleet (`home.kleinbem.dev`).
It replaces legacy heavy dashboards (like Homepage) with a fast, modern static SvelteKit application styled with `@kleinbem/web-config` and Tailwind CSS 4.

## Key Capabilities

- **Fleet Design System**: Uses `@kleinbem/web-config` themes (dark/light, system preference, zero-FOUC).
- **Fleet Inventory Integration**: Reads services dynamically from `inventory.nix` data.
- **Network Reachability Indicators**: Highlights Public (Cloudflare Tunnel), Mesh-Only (NetBird), and LAN endpoints.
- **Gatus Live Health**: Queries live service statuses from `status.kleinbem.dev`.
- **Command Palette (`⌘K`)**: Instant fuzzy search across services, hosts, and tools.
- **Zero Runtime Overhead**: Packaged via Nix (`buildNpmPackage`) as a pure static SPA served directly by Caddy.

## Development

```bash
just dev # Run Vite dev server
just check # Run svelte-check and TypeScript checks
just build # Build static production assets
just preview # Preview production build
```
1 change: 1 addition & 0 deletions CLAUDE.md
1 change: 1 addition & 0 deletions GEMINI.md
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Foyer 🏠

> *The elegant, lightweight homelab portal and service launchpad for the kleinbem fleet.*

Foyer serves as the front door to [`home.kleinbem.dev`](https://home.kleinbem.dev). Built with modern SvelteKit and Tailwind CSS 4 using the shared [`@kleinbem/web-config`](https://github.com/kleinbem/web-config) design system, Foyer delivers instantaneous page loads with zero runtime overhead on host infrastructure.

## ✨ Features

- **Fleet Design System**: Fully synchronized theme tokens, typography, and dark/light modes powered by `@kleinbem/web-config`.
- **Zero Runtime Overhead**: Packaged via Nix as a pure static SPA served directly by Caddy; no persistent Node.js or container runtime required on `core-pi`.
- **Network Reachability Awareness**: Clear visual badges for **Public** (Cloudflare Tunnel), **Mesh-Only** (NetBird), and **LAN-Only** services.
- **Real-Time Health & Uptime**: Direct live status integration with the fleet's [Gatus](https://status.kleinbem.dev) instance.
- **Command Palette (`⌘K` / `/`)**: Fast keyboard-driven fuzzy search across all services, host nodes, and quick links.
- **Host Node Filtering**: Filter services dynamically by node (`core-pi`, `nixos-nvme`, `mac-mini`, `nasbook`, `bpi-r4`).
Comment thread
kleinbem marked this conversation as resolved.
Resolved
- **Live Weather & Telemetry**: Built-in weather widget (Open-Meteo) and system clocks.

## 🛠️ Development

```bash
just dev # Start local development server
just check # Run Svelte and TypeScript checks
just build # Build static assets (to build/)
just preview # Preview production build
```

## 📦 Deployment & Nix

Packaged using `pkgs.buildNpmPackage` with reproducible npm locks:

```bash
nix build .#default
```
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
description = "Lightweight homelab portal and service launchpad for the kleinbem fleet";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs =
{
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
formatter = pkgs.nixfmt;

packages.default = pkgs.buildNpmPackage {
pname = "foyer";
version = "0.1.0";
src = ./.;
npmDeps = pkgs.importNpmLock { npmRoot = ./.; };
npmConfigHook = pkgs.importNpmLock.npmConfigHook;
installPhase = ''
mkdir -p $out
cp -r build/* $out/
'';
meta = with pkgs.lib; {
description = "Lightweight homelab portal and service launchpad";
homepage = "https://github.com/kleinbem-dev/foyer";
license = licenses.mit;
};
};

devShells.default = pkgs.mkShell {
packages = with pkgs; [
nodejs_22
just
];
};
}
);
}
18 changes: 18 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
default:
@just --list

# Start development server
dev:
npm run dev

# Build production assets
build:
npm run build

# Run type and svelte checks
check:
npm run check

# Preview production build locally
preview:
npm run preview
7 changes: 7 additions & 0 deletions osv-scanner.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# deepmerge has no fixed release yet (TehShrike/deepmerge#285); it comes in
# only through @sveltejs/vite-plugin-svelte (dev) and merges the local Vite
# config at build time, never request data.
[[IgnoredVulns]]
id = "GHSA-gcqx-w48m-w2h4"
ignoreUntil = 2027-02-03
reason = "No fixed deepmerge release (TehShrike/deepmerge#285); dev-only via @sveltejs/vite-plugin-svelte, merges trusted build config"
Loading