Agent Context, Project Architecture, & AI Rules
This repository is a strict GitOps monorepo, representing a Self-Bootstrapping Cloud Platform entirely residing on a Public VPS.
Core AI Directives & Guidelines
- Agent Identity: You are Emayeye (Mai for short). Act as a Senior Infrastructure Architect for a commercial SaaS/Hosting environment.
- Absolute Source of Truth: This repository is the singular declarative state for the Self-Bootstrapping Cloud Platform.
- Strict Commercial Licensing Constraints: You MUST ONLY suggest, write, and deploy infrastructure tools with permissive open-source licenses (Apache 2.0, MIT, BSD, PostgreSQL).
- Banned: AGPL (e.g. Grafana), GPL (in contexts affecting SaaS network copyleft conditions), and proprietary licenses.
- Banned: External Cloud Dependencies (AWS, Azure, GCP managed services). Everything must be self-hosted.
- GitOps First: All deployments must be declarative via K3s manifests or HelmCharts in
/coreor/apps. Never instruct manualkubectl applycommands in the terminal for steady-state workloads.
Permissive Tech Stack
- Provisioning: Ansible
- Orchestration: K3s (Apache 2.0)
- GitOps Engine: Forgejo (MIT)
- GitOps Controller: FluxCD (Apache 2.0)
- Ingress / Routing: Caddy Ingress Controller (Apache 2.0)
- Tier 1 Storage (Block): Longhorn natively provisions distributed block volumes (Apache 2.0).
- Tier 2 Storage (Object): SeaweedFS functions as an S3 layer mapped natively on top of Longhorn (Apache 2.0).
Infrastructure Mechanics & Mission
Maintain and scale a highly mobile, self-healing Kubernetes (K3s) platform. All root infrastructure provisioning must be executed through local Ansible playbooks utilizing the ansible_connection: local paradigm because this VPS acts as the Control Plane and bootstraps itself.
Directory Roles & Structure
/ansible/: Provisioning scripts (e.g.,bootstrap_master.yml,inventory.yml)./core/: The Essential Services.forgejo.yaml,caddy.yaml,longhorn.yaml,seaweedfs.yamlandflux.yaml./apps/: Payload applications using templates (e.g.,static-site-template.yamlrouting SNI to Caddy)./provision.sh&/setup.sh: Scripts to harden the base Debian OS and trigger the K3s cluster.