maxcloud

module
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2026 License: MIT

README

maxcloud

Deploy apps and functions to my homelab, the way you would to Cloud Run or Firebase. maxcloud is Knative on the homelab cluster, deployed through Flux from maxemiliang/homelab.

This repo holds:

  • mcloud, the command line (Go, cmd/mcloud).
  • @max-cloud/functions, the Node.js/TypeScript SDK for writing HTTP, scheduled and queue functions (packages/functions, see its README).
  • @max-cloud/nuxt, a Nuxt module: runtimeConfig from what the platform gives the app, and the Nuxt server as a maxcloud function (packages/nuxt, see its README).
  • github.com/maxemiliang/maxcloud/functions, the same for Go (functions/, see its README).
  • maxcloud-controller (controller/), which gives apps their S3 buckets and Postgres databases, keeps their secrets safe through a cluster rebuild, and describes the platform to mcloud. See its README.

Getting started

mise use -g github:maxemiliang/maxcloud   # or: go install github.com/maxemiliang/maxcloud/cmd/mcloud@latest
mcloud login                              # once per machine: log in, and set up cluster access
mcloud doctor                             # if anything's off: says what, and how to fix it

mkdir shop && cd shop && git init
mcloud init                               # a starter functions app (--lang go for Go)
npm install
mcloud dev                                # run it here: http://hello.localhost:8080/
git add -A && git commit -m "maxcloud app"
gh repo create --source . --push --private
mcloud deploy                             # register it, push, follow the build and the rollout

Docs

Guides:

Reference, generated from the code:

Writing functions: @max-cloud/functions (Node.js, TypeScript), functions (Go), @max-cloud/nuxt. Running the platform: controller/README.md. Working on maxcloud itself (development, docs, releasing): CONTRIBUTING.md.

Directories

Path Synopsis
cmd
mcloud command
Command mcloud deploys and runs apps on maxcloud, the homelab's run platform.
Command mcloud deploys and runs apps on maxcloud, the homelab's run platform.
functions module
internal
auth
Package auth logs mcloud (and kubectl, through mcloud credential) in to the cluster with the homelab's OpenID Connect provider (Authelia): the cluster's API server trusts its ID tokens (UKS cluster authentication).
Package auth logs mcloud (and kubectl, through mcloud credential) in to the cluster with the homelab's OpenID Connect provider (Authelia): the cluster's API server trusts its ID tokens (UKS cluster authentication).
cli
Package cli is the mcloud command line.
Package cli is the mcloud command line.
functions
Package functions turns an app's function description (what an SDK's runtime prints for MAXCLOUD_DESCRIBE=1 or --describe) into the manifests Flux deploys: a Knative service per HTTP function, a CronJob per schedule, a KEDA-scaled Deployment per queue, and the database queues need.
Package functions turns an app's function description (what an SDK's runtime prints for MAXCLOUD_DESCRIBE=1 or --describe) into the manifests Flux deploys: a Knative service per HTTP function, a CronJob per schedule, a KEDA-scaled Deployment per queue, and the database queues need.
gendocs command
Command gendocs writes the generated reference in docs/reference: the mcloud commands (from their help), maxcloud.yaml (from maxcloud.schema.json) and the controller's custom resources (from the CRDs controller-gen writes).
Command gendocs writes the generated reference in docs/reference: the mcloud commands (from their help), maxcloud.yaml (from maxcloud.schema.json) and the controller's custom resources (from the CRDs controller-gen writes).
github
Package github is the little of GitHub's REST API that mcloud needs: read files, and commit several file changes at once to a branch.
Package github is the little of GitHub's REST API that mcloud needs: read files, and commit several file changes at once to a branch.
kube
Package kube reads an app's state from the cluster: what Flux applied, its services and workloads, and its logs.
Package kube reads an app's state from the cluster: what Flux applied, its services and workloads, and its logs.
kustomize
Package kustomize edits kustomization.yaml files as text, so their comments survive.
Package kustomize edits kustomization.yaml files as text, so their comments survive.
migrate
Package migrate applies an app's SQL migrations: the files in its migrations directory, each once, in name order, recorded in the table maxcloud_migrations.
Package migrate applies an app's SQL migrations: the files in its migrations directory, each once, in name order, recorded in the table maxcloud_migrations.
registry
Package registry reads and writes entries in the maxcloud app registry: one ResourceSetInputProvider per app in the homelab repo's apps/maxcloud/apps/, which the Flux Operator turns into the app's namespace, guardrails and reconciler (see apps/maxcloud/resourceset.yaml there).
Package registry reads and writes entries in the maxcloud app registry: one ResourceSetInputProvider per app in the homelab repo's apps/maxcloud/apps/, which the Flux Operator turns into the app's namespace, guardrails and reconciler (see apps/maxcloud/resourceset.yaml there).
ui
Package ui is how mcloud talks to you: colors, spinners, tables and prompts on a terminal, and plain lines everywhere else (pipes, CI, NO_COLOR, TERM=dumb, --plain), so logs and scripts read as before.
Package ui is how mcloud talks to you: colors, spinners, tables and prompts on a terminal, and plain lines everywhere else (pipes, CI, NO_COLOR, TERM=dumb, --plain), so logs and scripts read as before.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL