# Product Guidelines - JuiceNavidrome Infrastructure ## Vision To provide a rock-solid, self-healing, and highly available deployment model for Navidrome, treating the infrastructure as a first-class product. ## Operational Principles - **Infrastructure as Code:** All cluster configurations, job definitions, and container builds must be versioned and managed through Git. - **Failover-First Design:** The primary measure of success is the system's ability to automatically recover from node failures without manual intervention. - **Minimal State on Host:** Local host data should be limited to necessary LiteFS state and caches; all critical application data must be replicated or reside on shared storage. ## Automation Standards - **Automated Rebuilds:** Any change to the base configuration or Dockerfile must trigger an automatic build and push to the local registry via Gitea Actions. - **Safe Rollouts:** Use sequential update strategies (max_parallel=1) to ensure the cluster remains healthy during version transitions. ## Reliability & Monitoring - **Health-Aware Orchestration:** Leverage Consul health checks to provide Traefik with accurate routing information, ensuring traffic only hits ready nodes. - **Consistent Initialization:** Use clean bootstrap procedures to avoid common distributed system pitfalls like stale cluster IDs or locking conflicts.