Phase 1: Add ESLint/Prettier config + baseline auto-fixes

This commit is contained in:
Krystie
2026-03-22 11:00:25 +01:00
parent 41a0cdee7e
commit e2c67a8fe8
90 changed files with 4008 additions and 3066 deletions

View File

@@ -4,336 +4,336 @@
const RECIPE_TEMPLATES = {
// === MEDIA & ENTERTAINMENT ===
"htpc-suite": {
name: "HTPC Suite",
description: "Complete media automation: find, download, organize, and stream",
icon: "\uD83C\uDFAC",
category: "Media",
type: "recipe",
difficulty: "Intermediate",
'htpc-suite': {
name: 'HTPC Suite',
description: 'Complete media automation: find, download, organize, and stream',
icon: '\uD83C\uDFAC',
category: 'Media',
type: 'recipe',
difficulty: 'Intermediate',
popularity: 98,
components: [
{
id: "prowlarr",
role: "Indexer Manager",
templateRef: "prowlarr",
id: 'prowlarr',
role: 'Indexer Manager',
templateRef: 'prowlarr',
required: true,
order: 1
order: 1,
},
{
id: "qbittorrent",
role: "Download Client",
templateRef: "qbittorrent",
id: 'qbittorrent',
role: 'Download Client',
templateRef: 'qbittorrent',
required: true,
order: 2
order: 2,
},
{
id: "sonarr",
role: "TV Show Manager",
templateRef: "sonarr",
id: 'sonarr',
role: 'TV Show Manager',
templateRef: 'sonarr',
required: true,
order: 3
order: 3,
},
{
id: "radarr",
role: "Movie Manager",
templateRef: "radarr",
id: 'radarr',
role: 'Movie Manager',
templateRef: 'radarr',
required: true,
order: 4
order: 4,
},
{
id: "lidarr",
role: "Music Manager",
templateRef: "lidarr",
id: 'lidarr',
role: 'Music Manager',
templateRef: 'lidarr',
required: false,
order: 5
order: 5,
},
{
id: "overseerr",
role: "Request Manager",
templateRef: "seerr",
id: 'overseerr',
role: 'Request Manager',
templateRef: 'seerr',
required: false,
order: 6
}
order: 6,
},
],
sharedVolumes: {
media: {
label: "Media Library",
description: "Root folder for all media (movies, TV, music)",
defaultPath: "/media",
usedBy: ["sonarr", "radarr", "lidarr", "qbittorrent"]
label: 'Media Library',
description: 'Root folder for all media (movies, TV, music)',
defaultPath: '/media',
usedBy: ['sonarr', 'radarr', 'lidarr', 'qbittorrent'],
},
downloads: {
label: "Downloads",
description: "Shared downloads folder for all download clients",
defaultPath: "/downloads",
usedBy: ["sonarr", "radarr", "lidarr", "qbittorrent"]
}
label: 'Downloads',
description: 'Shared downloads folder for all download clients',
defaultPath: '/downloads',
usedBy: ['sonarr', 'radarr', 'lidarr', 'qbittorrent'],
},
},
autoConnect: {
enabled: true,
description: "Automatically connects Sonarr/Radarr to Prowlarr and qBittorrent",
description: 'Automatically connects Sonarr/Radarr to Prowlarr and qBittorrent',
steps: [
{ action: "configureProwlarrApps", targets: ["sonarr", "radarr", "lidarr"] },
{ action: "configureDownloadClient", client: "qbittorrent", targets: ["sonarr", "radarr", "lidarr"] }
]
{ action: 'configureProwlarrApps', targets: ['sonarr', 'radarr', 'lidarr'] },
{ action: 'configureDownloadClient', client: 'qbittorrent', targets: ['sonarr', 'radarr', 'lidarr'] },
],
},
setupInstructions: [
"All services share the same media and downloads folders",
"Prowlarr is pre-connected to Sonarr, Radarr, and Lidarr",
"Add indexers in Prowlarr \u2014 they sync automatically to all *arr apps",
"Add your media library root folders in Sonarr and Radarr",
"qBittorrent is pre-configured as the download client"
]
'All services share the same media and downloads folders',
'Prowlarr is pre-connected to Sonarr, Radarr, and Lidarr',
'Add indexers in Prowlarr \u2014 they sync automatically to all *arr apps',
'Add your media library root folders in Sonarr and Radarr',
'qBittorrent is pre-configured as the download client',
],
},
// === PRODUCTIVITY ===
"nextcloud-complete": {
name: "Nextcloud Complete",
description: "Full productivity suite: cloud storage, office editing, and collaboration",
icon: "\u2601\uFE0F",
category: "Productivity",
type: "recipe",
difficulty: "Intermediate",
'nextcloud-complete': {
name: 'Nextcloud Complete',
description: 'Full productivity suite: cloud storage, office editing, and collaboration',
icon: '\u2601\uFE0F',
category: 'Productivity',
type: 'recipe',
difficulty: 'Intermediate',
popularity: 90,
components: [
{
id: "nextcloud-db",
role: "Database",
id: 'nextcloud-db',
role: 'Database',
required: true,
order: 0,
docker: {
image: "mariadb:11",
image: 'mariadb:11',
ports: [],
volumes: ["/opt/nextcloud-db/data:/var/lib/mysql"],
volumes: ['/opt/nextcloud-db/data:/var/lib/mysql'],
environment: {
"MYSQL_ROOT_PASSWORD": "{{GENERATED_PASSWORD}}",
"MYSQL_DATABASE": "nextcloud",
"MYSQL_USER": "nextcloud",
"MYSQL_PASSWORD": "{{GENERATED_PASSWORD}}"
}
'MYSQL_ROOT_PASSWORD': '{{GENERATED_PASSWORD}}',
'MYSQL_DATABASE': 'nextcloud',
'MYSQL_USER': 'nextcloud',
'MYSQL_PASSWORD': '{{GENERATED_PASSWORD}}',
},
},
internal: true
internal: true,
},
{
id: "nextcloud-redis",
role: "Cache",
id: 'nextcloud-redis',
role: 'Cache',
required: true,
order: 0,
docker: {
image: "redis:7-alpine",
image: 'redis:7-alpine',
ports: [],
volumes: ["/opt/nextcloud-redis/data:/data"],
environment: {}
volumes: ['/opt/nextcloud-redis/data:/data'],
environment: {},
},
internal: true
internal: true,
},
{
id: "nextcloud",
role: "Cloud Platform",
templateRef: "nextcloud",
id: 'nextcloud',
role: 'Cloud Platform',
templateRef: 'nextcloud',
required: true,
order: 1,
envOverrides: {
"MYSQL_HOST": "dashcaddy-nextcloud-db",
"MYSQL_DATABASE": "nextcloud",
"MYSQL_USER": "nextcloud",
"MYSQL_PASSWORD": "{{GENERATED_PASSWORD}}",
"REDIS_HOST": "dashcaddy-nextcloud-redis"
}
'MYSQL_HOST': 'dashcaddy-nextcloud-db',
'MYSQL_DATABASE': 'nextcloud',
'MYSQL_USER': 'nextcloud',
'MYSQL_PASSWORD': '{{GENERATED_PASSWORD}}',
'REDIS_HOST': 'dashcaddy-nextcloud-redis',
},
},
{
id: "collabora",
role: "Office Suite",
id: 'collabora',
role: 'Office Suite',
required: false,
order: 2,
docker: {
image: "collabora/code:latest",
ports: ["{{PORT}}:9980"],
image: 'collabora/code:latest',
ports: ['{{PORT}}:9980'],
volumes: [],
environment: {
"aliasgroup1": "https://{{NEXTCLOUD_DOMAIN}}",
"extra_params": "--o:ssl.enable=false --o:ssl.termination=true"
}
'aliasgroup1': 'https://{{NEXTCLOUD_DOMAIN}}',
'extra_params': '--o:ssl.enable=false --o:ssl.termination=true',
},
},
subdomain: "office",
subdomain: 'office',
defaultPort: 9980,
healthCheck: "/"
}
healthCheck: '/',
},
],
network: {
name: "dashcaddy-nextcloud",
driver: "bridge"
name: 'dashcaddy-nextcloud',
driver: 'bridge',
},
sharedVolumes: {
data: {
label: "Cloud Storage",
description: "Nextcloud data directory for user files",
defaultPath: "/opt/nextcloud/data",
usedBy: ["nextcloud"]
}
label: 'Cloud Storage',
description: 'Nextcloud data directory for user files',
defaultPath: '/opt/nextcloud/data',
usedBy: ['nextcloud'],
},
},
setupInstructions: [
"Complete the Nextcloud initial setup wizard in the browser",
"MariaDB and Redis are pre-configured and connected",
"If Collabora is enabled, configure it in Nextcloud: Settings \u2192 Nextcloud Office",
"Point Nextcloud Office to your Collabora URL (e.g., https://office.sami)",
"Configure email, 2FA, and other settings in Nextcloud admin panel"
]
'Complete the Nextcloud initial setup wizard in the browser',
'MariaDB and Redis are pre-configured and connected',
'If Collabora is enabled, configure it in Nextcloud: Settings \u2192 Nextcloud Office',
'Point Nextcloud Office to your Collabora URL (e.g., https://office.sami)',
'Configure email, 2FA, and other settings in Nextcloud admin panel',
],
},
// === DEVELOPMENT ===
"dev-environment": {
name: "Dev Environment",
description: "Self-hosted development workflow: Git, CI/CD, IDE, and database",
icon: "\uD83D\uDCBB",
category: "Development",
type: "recipe",
difficulty: "Advanced",
'dev-environment': {
name: 'Dev Environment',
description: 'Self-hosted development workflow: Git, CI/CD, IDE, and database',
icon: '\uD83D\uDCBB',
category: 'Development',
type: 'recipe',
difficulty: 'Advanced',
popularity: 82,
components: [
{
id: "dev-postgres",
role: "Database",
id: 'dev-postgres',
role: 'Database',
required: true,
order: 0,
docker: {
image: "postgres:16-alpine",
image: 'postgres:16-alpine',
ports: [],
volumes: ["/opt/dev-postgres/data:/var/lib/postgresql/data"],
volumes: ['/opt/dev-postgres/data:/var/lib/postgresql/data'],
environment: {
"POSTGRES_DB": "gitea",
"POSTGRES_USER": "gitea",
"POSTGRES_PASSWORD": "{{GENERATED_PASSWORD}}"
}
'POSTGRES_DB': 'gitea',
'POSTGRES_USER': 'gitea',
'POSTGRES_PASSWORD': '{{GENERATED_PASSWORD}}',
},
},
internal: true
internal: true,
},
{
id: "gitea",
role: "Git Server",
templateRef: "gitea",
id: 'gitea',
role: 'Git Server',
templateRef: 'gitea',
required: true,
order: 1,
envOverrides: {
"GITEA__database__DB_TYPE": "postgres",
"GITEA__database__HOST": "dashcaddy-dev-postgres:5432",
"GITEA__database__NAME": "gitea",
"GITEA__database__USER": "gitea",
"GITEA__database__PASSWD": "{{GENERATED_PASSWORD}}"
}
'GITEA__database__DB_TYPE': 'postgres',
'GITEA__database__HOST': 'dashcaddy-dev-postgres:5432',
'GITEA__database__NAME': 'gitea',
'GITEA__database__USER': 'gitea',
'GITEA__database__PASSWD': '{{GENERATED_PASSWORD}}',
},
},
{
id: "drone",
role: "CI/CD Pipeline",
templateRef: "drone",
id: 'drone',
role: 'CI/CD Pipeline',
templateRef: 'drone',
required: false,
order: 2
order: 2,
},
{
id: "vscode-server",
role: "Web IDE",
templateRef: "vscode-server",
id: 'vscode-server',
role: 'Web IDE',
templateRef: 'vscode-server',
required: false,
order: 3
}
order: 3,
},
],
network: {
name: "dashcaddy-dev",
driver: "bridge"
name: 'dashcaddy-dev',
driver: 'bridge',
},
setupInstructions: [
"Gitea is pre-configured with PostgreSQL database",
"Complete the Gitea initial setup wizard in the browser",
"If Drone CI is enabled, connect it to Gitea via OAuth application",
"VS Code Server provides a full IDE in your browser",
"All development services share a Docker network for inter-service communication"
]
'Gitea is pre-configured with PostgreSQL database',
'Complete the Gitea initial setup wizard in the browser',
'If Drone CI is enabled, connect it to Gitea via OAuth application',
'VS Code Server provides a full IDE in your browser',
'All development services share a Docker network for inter-service communication',
],
},
// === HOME AUTOMATION ===
"smart-home": {
name: "Smart Home Hub",
description: "Home automation: control, automate, and monitor IoT devices",
icon: "\uD83C\uDFE0",
category: "Home Automation",
type: "recipe",
difficulty: "Intermediate",
'smart-home': {
name: 'Smart Home Hub',
description: 'Home automation: control, automate, and monitor IoT devices',
icon: '\uD83C\uDFE0',
category: 'Home Automation',
type: 'recipe',
difficulty: 'Intermediate',
popularity: 88,
components: [
{
id: "mosquitto",
role: "MQTT Broker",
id: 'mosquitto',
role: 'MQTT Broker',
required: true,
order: 0,
docker: {
image: "eclipse-mosquitto:2",
ports: ["1883:1883", "9001:9001"],
image: 'eclipse-mosquitto:2',
ports: ['1883:1883', '9001:9001'],
volumes: [
"/opt/mosquitto/config:/mosquitto/config",
"/opt/mosquitto/data:/mosquitto/data",
"/opt/mosquitto/log:/mosquitto/log"
'/opt/mosquitto/config:/mosquitto/config',
'/opt/mosquitto/data:/mosquitto/data',
'/opt/mosquitto/log:/mosquitto/log',
],
environment: {}
environment: {},
},
subdomain: "mqtt",
subdomain: 'mqtt',
defaultPort: 1883,
internal: false,
setupNote: "MQTT broker for IoT device communication"
setupNote: 'MQTT broker for IoT device communication',
},
{
id: "homeassistant",
role: "Automation Hub",
templateRef: "homeassistant",
id: 'homeassistant',
role: 'Automation Hub',
templateRef: 'homeassistant',
required: true,
order: 1
order: 1,
},
{
id: "nodered",
role: "Flow Automation",
templateRef: "nodered",
id: 'nodered',
role: 'Flow Automation',
templateRef: 'nodered',
required: true,
order: 2
order: 2,
},
{
id: "zigbee2mqtt",
role: "Zigbee Bridge",
id: 'zigbee2mqtt',
role: 'Zigbee Bridge',
required: false,
order: 3,
docker: {
image: "koenkk/zigbee2mqtt:latest",
ports: ["{{PORT}}:8080"],
volumes: ["/opt/zigbee2mqtt/data:/app/data"],
image: 'koenkk/zigbee2mqtt:latest',
ports: ['{{PORT}}:8080'],
volumes: ['/opt/zigbee2mqtt/data:/app/data'],
environment: {
"TZ": "{{TIMEZONE}}"
}
'TZ': '{{TIMEZONE}}',
},
},
subdomain: "zigbee",
subdomain: 'zigbee',
defaultPort: 8080,
healthCheck: "/",
note: "Requires a Zigbee USB adapter (e.g., Sonoff Zigbee 3.0 USB Dongle Plus)"
}
healthCheck: '/',
note: 'Requires a Zigbee USB adapter (e.g., Sonoff Zigbee 3.0 USB Dongle Plus)',
},
],
network: {
name: "dashcaddy-smarthome",
driver: "bridge"
name: 'dashcaddy-smarthome',
driver: 'bridge',
},
setupInstructions: [
"Mosquitto MQTT broker is ready for IoT device connections on port 1883",
"Complete the Home Assistant onboarding wizard in the browser",
"Connect Home Assistant to MQTT: Settings \u2192 Integrations \u2192 MQTT",
"Node-RED provides visual flow automation \u2014 connect it to MQTT for device control",
"If Zigbee2MQTT is enabled, it requires a physical Zigbee USB adapter"
]
}
'Mosquitto MQTT broker is ready for IoT device connections on port 1883',
'Complete the Home Assistant onboarding wizard in the browser',
'Connect Home Assistant to MQTT: Settings \u2192 Integrations \u2192 MQTT',
'Node-RED provides visual flow automation \u2014 connect it to MQTT for device control',
'If Zigbee2MQTT is enabled, it requires a physical Zigbee USB adapter',
],
},
};
// Recipe category metadata (separate from app categories)
const RECIPE_CATEGORIES = {
"Media": { icon: "\uD83C\uDFAC", color: "#e74c3c", description: "Media streaming and automation stacks" },
"Productivity": { icon: "\u2601\uFE0F", color: "#3498db", description: "Cloud storage and office suites" },
"Development": { icon: "\uD83D\uDCBB", color: "#9b59b6", description: "Self-hosted development environments" },
"Home Automation": { icon: "\uD83C\uDFE0", color: "#27ae60", description: "IoT and smart home control" }
'Media': { icon: '\uD83C\uDFAC', color: '#e74c3c', description: 'Media streaming and automation stacks' },
'Productivity': { icon: '\u2601\uFE0F', color: '#3498db', description: 'Cloud storage and office suites' },
'Development': { icon: '\uD83D\uDCBB', color: '#9b59b6', description: 'Self-hosted development environments' },
'Home Automation': { icon: '\uD83C\uDFE0', color: '#27ae60', description: 'IoT and smart home control' },
};
module.exports = { RECIPE_TEMPLATES, RECIPE_CATEGORIES };