Repository Patterns¶
The cmoreira-dev GitHub org is split into categories — each top-level
folder in the development workspace groups related repositories, but each
repository is independent, with its own history, CI, and release cycle.
| Category | Contents |
|---|---|
infra-as-code/ |
Terraform/Terragrunt — provisioned infrastructure |
platform-engineering/ |
Cluster addons (gitops.*) and internal portal (Backstage) |
teupadel.com/ |
Padel movement analysis application |
sara/ |
Chords/lyrics practice application |
documentation/ |
This site |
Prefix convention¶
The repository name's prefix indicates what it is and how it's operated:
| Prefix | Meaning | How it's applied in the environment |
|---|---|---|
gitops.* |
ArgoCD-managed workload | Auto-discovered by ApplicationSet/gitops-repos, continuously synced |
iac.* |
Live infrastructure state (Terragrunt) | Manual terragrunt apply, under confirmation |
api.* |
Backend service | Docker image built via CI, deployed via a matching gitops.* |
ui.* |
Frontend application | Same — built via CI, deployed via gitops.* |
docs.* |
Documentation site | Built locally with MkDocs |
backstage.* |
Internal portal (Backstage) | Deployed via gitops.* like any other app |
Expected internal structure of a gitops.<app> repo¶
gitops.<app>/
├── argocd/
│ └── <app>.yaml ← Application(s) — ArgoCD points here
├── helm/
│ ├── Chart.yaml ← depends on gitops.generic-app-chart
│ └── values.yaml
├── catalog-info.yaml ← Backstage registration
└── renovate.json ← automatic chart version bumps
Two variations of this pattern coexist:
- Own app (
gitops.template,gitops.teupadel.com,gitops.local-sara) — depends on the generic chart,argocd/is normally empty (theApplicationSetgenerates the Application on its own) — it's only populated manually when the repo delivers more than one component (e.g. api + ui in the same repo), as is the case forgitops.teupadel.comandgitops.local-sara. - Third-party addon (
gitops.core-addons,gitops.ai-core-addons,gitops.cnpg,gitops.crossplane,gitops.monitoring,gitops.headlamp) —helm/<addon>/Chart.yamldepends directly on the upstream chart of the project (cert-manager, Crossplane, CNPG, etc.), bypassing the generic chart.
Application repos (api.* / ui.*)¶
Convention shared by both:
api.<app>/ or ui.<app>/
├── Dockerfile
├── CLAUDE.md ← architecture/decision context for that component
├── README.md
└── (source code)
api.*: Python 3.11 + FastAPI + Uvicorn is the current standard across all backend services.ui.*: Next.js (App Router) is the current standard; always built via Docker multi-stage (never a locally publishednpm install) — theDockerfilesets production values viaARG, since the reusable CI workflow doesn't pass--build-arg.
Workflow for a change¶
- Scope the change to the right category — confirm which folder owns the file before touching it.
- Apply the change within its repo — each subfolder is an independent Git repository.
- Update the documentation — this site (
docs.cmoreira-dev), if the change affects anything described here. - Check cross-repo impact — some important couplings:
iac.homelab-live-infraconsumesiac-proxmox-lxcandiac-aws-ecr-pipelinevia a Gitref— a module change may need a version bump in the consumer.api.*/ui.*components of the same app share an API contract and, sometimes, the samegitops.*repo — a route/env var change on one side may require a matching change on the other.gitops.core-addonsis a dependency of practically every othergitops.*repo (Gateway API, cert-manager, External Secrets) — changes there have cluster-wide blast radius.
General rules¶
- Never commit directly to
mainwithout flagging it — prefer branch + PR. terraform apply/terragrunt applyalways under explicit confirmation.- Direct
kubectl applyisn't used in GitOps repos — ArgoCD is what applies.