ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.
Python astracloudflarecontrol-panelcyberpaneldnsfablehosting-control-panelhosting-panelkimi-k3server-managementserverkitubuntu-web-panelwebserver
Add repository manifest detection and templates
Juan Denis99abf8f14748
diff --git a/backend/app/api/apps.py b/backend/app/api/apps.pyindex c100abbf..cc45b7a7 100644--- a/backend/app/api/apps.py+++ b/backend/app/api/apps.py@@ -9,6 +9,7 @@ from app.models import Application, Userfrom app.services.build_service import BuildServicefrom app.services.docker_service import DockerServicefrom app.services.git_service import GitService+from app.services.repository_manifest_service import RepositoryManifestServicefrom app.services.source_connection_service import SourceConnectionServicefrom app.services.remote_docker_service import RemoteDockerServicefrom app.services.log_service import LogService@@ -365,6 +366,9 @@ def create_app_from_repository():build_method = (data.get('build_method') or 'auto').strip().lower()auto_deploy = bool(data.get('auto_deploy', True))port = data.get('port')+ dockerfile_path = (data.get('dockerfile_path') or '').strip() or None+ custom_build_cmd = (data.get('custom_build_cmd') or '').strip() or None+ custom_start_cmd = (data.get('custom_start_cmd') or '').strip() or Noneif not name or len(name) < 2:return jsonify({'error': 'Service name must be at least 2 characters'}), 400@@ -418,8 +422,34 @@ def create_app_from_repository():clone_result['error'] = clone_result['error'].replace(clone_repo_url, deploy_repo_url)return jsonify(clone_result), 400+ manifest = RepositoryManifestService.analyze_path(app_path)+ recommended = manifest.get('recommended') or {}+ manifest_strategy = manifest.get('strategy')detection = BuildService.detect_build_method(app_path)- resolved_app_type = _derive_repo_app_type(detection) if app_type == 'auto' else app_type+ manifest_app_type_strategies = {+ 'serverkit',+ 'docker_compose',+ 'render',+ 'railway',+ 'dockerfile',+ 'app_json',+ }+ resolved_app_type = (+ (recommended.get('app_type') if manifest_strategy in manifest_app_type_strategies else None)+ or _derive_repo_app_type(detection)+ ) if app_type == 'auto' else app_type+ resolved_build_method = build_method+ if build_method == 'auto':+ resolved_build_method = (+ recommended.get('build_method') if manifest_strategy else None+ ) or detection.get('build_method') or 'auto'+ if resolved_build_method == 'custom' and not (custom_build_cmd or recommended.get('custom_build_cmd')):+ resolved_build_method = 'auto'+ if not port:+ port = recommended.get('port')+ dockerfile_path = dockerfile_path or recommended.get('dockerfile_path') or 'Dockerfile'+ custom_build_cmd = custom_build_cmd or recommended.get('custom_build_cmd')+ custom_start_cmd = custom_start_cmd or recommended.get('custom_start_cmd')app = Application(name=name,@@ -447,7 +477,10 @@ def create_app_from_repository():build_result = BuildService.configure_build(app_id=app.id,app_path=app.root_path,- build_method=build_method,+ build_method=resolved_build_method,+ dockerfile_path=dockerfile_path,+ custom_build_cmd=custom_build_cmd,+ custom_start_cmd=custom_start_cmd,)if not build_result.get('success'):raise RuntimeError(build_result.get('error', 'Failed to configure build'))@@ -463,6 +496,7 @@ def create_app_from_repository():},'build_config': build_result.get('config'),'detection': detection,+ 'manifest': manifest,}), 201except Exception as exc:db.session.rollback()diff --git a/backend/app/api/source_connections.py b/backend/app/api/source_connections.pyindex 8bbb269e..2d823589 100644--- a/backend/app/api/source_connections.py+++ b/backend/app/api/source_connections.py@@ -89,6 +89,21 @@ def github_branches(full_name):return jsonify({'error': _github_error(exc)}), 400+@source_connections_bp.route('/github/repos/<path:full_name>/manifest', methods=['GET'])+@jwt_required()+def github_repository_manifest(full_name):+ user_id = int(get_jwt_identity())+ ref = request.args.get('ref') or None++ try:+ manifest = SourceConnectionService.get_github_repository_manifest(user_id, full_name, ref)+ return jsonify({'manifest': manifest}), 200+ except ValueError as exc:+ return jsonify({'error': str(exc)}), 400+ except HTTPError as exc:+ return jsonify({'error': _github_error(exc)}), 400++@source_connections_bp.route('/github', methods=['DELETE'])@jwt_required()def disconnect_github():diff --git a/backend/app/services/repository_manifest_service.py b/backend/app/services/repository_manifest_service.pynew file mode 100644index 00000000..c9a52155--- /dev/null+++ b/backend/app/services/repository_manifest_service.py@@ -0,0 +1,552 @@+"""Repository manifest detection for service imports."""++import json+import re+import tomllib+from pathlib import Path+from typing import Any, Dict, List, Optional++import yaml+++class RepositoryManifestService:+ """Detect deploy metadata from common PaaS and ServerKit manifest files."""++ SERVERKIT_FILES = ('serverkit.json', 'serverkit.yaml', 'serverkit.yml')+ RENDER_FILES = ('render.yaml', 'render.yml', 'render.json')+ RAILWAY_FILES = ('railway.json', 'railway.toml')+ COMPOSE_FILES = ('docker-compose.yml', 'docker-compose.yaml', 'compose.yml', 'compose.yaml')+ APP_FILES = ('app.json',)+ BUILD_FILES = (+ 'Dockerfile',+ 'nixpacks.toml',+ 'package.json',+ 'pyproject.toml',+ 'requirements.txt',+ 'Procfile',+ )+ MAX_FILE_BYTES = 512 * 1024++ @classmethod+ def supported_files(cls) -> List[str]:+ return list(dict.fromkeys(+ cls.SERVERKIT_FILES+ + cls.RENDER_FILES+ + cls.RAILWAY_FILES+ + cls.COMPOSE_FILES+ + cls.APP_FILES+ + cls.BUILD_FILES+ ))++ @classmethod+ def analyze_path(cls, repo_path: str) -> Dict:+ root = Path(repo_path)+ file_map = {}+ root_files = []++ if not root.exists() or not root.is_dir():+ return cls._empty_result([f'Repository path does not exist: {repo_path}'])++ try:+ root_files = [entry.name for entry in root.iterdir() if entry.is_file()]+ except OSError:+ root_files = []++ for file_name in cls.supported_files():+ path = root / file_name+ if not path.is_file():+ continue+ try:+ if path.stat().st_size > cls.MAX_FILE_BYTES:+ continue+ file_map[file_name] = path.read_text(encoding='utf-8', errors='replace')+ except OSError:+ continue++ return cls.analyze_files(file_map, root_files=root_files)++ @classmethod+ def analyze_files(cls, file_map: Dict[str, str], root_files: Optional[List[str]] = None) -> Dict:+ root_files = root_files or list(file_map.keys())+ result = cls._empty_result()+ result['detected_files'] = sorted(set(root_files))++ cls._detect_serverkit(file_map, result)+ cls._detect_compose(file_map, result)+ cls._detect_render(file_map, result)+ cls._detect_railway(file_map, result)+ cls._detect_dockerfile(file_map, result)+ cls._detect_app_json(file_map, result)+ cls._detect_language_files(file_map, result)++ cls._dedupe_env(result)+ cls._finalize_recommendation(result)+ return result++ @staticmethod+ def _empty_result(warnings: Optional[List[str]] = None) -> Dict:+ return {+ 'success': True,+ 'strategy': None,+ 'recommended': {+ 'app_type': 'static',+ 'build_method': 'custom',+ 'port': None,+ 'dockerfile_path': 'Dockerfile',+ 'custom_build_cmd': None,+ 'custom_start_cmd': None,+ 'healthcheck_path': None,+ },+ 'manifests': [],+ 'env': [],+ 'ports': [],+ 'detected_files': [],+ 'warnings': warnings or [],+ }++ @classmethod+ def _detect_serverkit(cls, file_map: Dict[str, str], result: Dict) -> None:+ file_name, data = cls._first_parsed(file_map, cls.SERVERKIT_FILES)+ if not isinstance(data, dict):+ return++ build = data.get('build') if isinstance(data.get('build'), dict) else {}+ deploy = data.get('deploy') if isinstance(data.get('deploy'), dict) else {}+ app_type = data.get('app_type') or data.get('type') or deploy.get('type')+ build_method = (+ data.get('build_method')+ or build.get('method')+ or build.get('build_method')+ )+ dockerfile_path = (+ data.get('dockerfile_path')+ or build.get('dockerfile_path')+ or build.get('dockerfilePath')+ )+ port = cls._extract_port(data.get('port') or deploy.get('port'))++ cls._set_recommended(+ result,+ strategy='serverkit',+ app_type=app_type,+ build_method=build_method,+ port=port,+ dockerfile_path=dockerfile_path,+ custom_build_cmd=data.get('build_command') or build.get('command') or build.get('buildCommand'),+ custom_start_cmd=data.get('start_command') or deploy.get('start_command') or deploy.get('startCommand'),+ healthcheck_path=deploy.get('healthcheck_path') or deploy.get('healthcheckPath'),+ )+ cls._merge_env(result, cls._env_from_mapping(data.get('env'), source=file_name))+ cls._add_manifest(result, 'serverkit', file_name, 'ServerKit manifest', 'Native import settings')++ @classmethod+ def _detect_compose(cls, file_map: Dict[str, str], result: Dict) -> None:+ file_name, data = cls._first_parsed(file_map, cls.COMPOSE_FILES)+ if not data:+ return++ services = data.get('services') if isinstance(data, dict) else {}+ if not isinstance(services, dict):+ services = {}++ service_name = None+ service_count = len(services)+ ports = []+ env_entries = []+ build_method = 'custom'+ dockerfile_path = None++ for name, service in services.items():+ if service_name is None:+ service_name = name+ if not isinstance(service, dict):+ continue+ ports.extend(cls._ports_from_compose_service(service))+ env_entries.extend(cls._env_from_compose_service(service, file_name))+ build = service.get('build')+ if isinstance(build, dict):+ dockerfile_path = build.get('dockerfile')+ build_method = 'dockerfile' if dockerfile_path or 'Dockerfile' in file_map else 'custom'+ elif build:+ build_method = 'dockerfile' if 'Dockerfile' in file_map else 'custom'++ for port in ports:+ cls._append_port(result, port)++ cls._set_recommended(+ result,+ strategy='docker_compose',+ app_type='docker',+ build_method=build_method,+ port=ports[0] if ports else None,+ dockerfile_path=dockerfile_path,+ )+ cls._merge_env(result, env_entries)+ summary = f'{service_count} compose service{"s" if service_count != 1 else ""}'+ if service_name:+ summary = f'{service_name}: {summary}'+ cls._add_manifest(result, 'docker_compose', file_name, 'Docker Compose', summary)++ @classmethod+ def _detect_render(cls, file_map: Dict[str, str], result: Dict) -> None:+ file_name, data = cls._first_parsed(file_map, cls.RENDER_FILES)+ if not data:+ return++ services = data.get('services') if isinstance(data, dict) else []+ if not isinstance(services, list):+ services = []+ service = next((item for item in services if isinstance(item, dict) and item.get('type') == 'web'), None)+ service = service or next((item for item in services if isinstance(item, dict)), {})+ if not service:+ return++ runtime = str(service.get('runtime') or '').lower()+ dockerfile_path = service.get('dockerfilePath') or service.get('dockerfile_path')+ build_method = 'dockerfile' if runtime == 'docker' or dockerfile_path else None+ app_type = 'docker' if build_method == 'dockerfile' else None+ env_entries = cls._env_from_render(service.get('envVars'), file_name)+ port = cls._port_from_env(env_entries)++ cls._set_recommended(+ result,+ strategy='render',+ app_type=app_type,+ build_method=build_method,+ port=port,+ dockerfile_path=dockerfile_path,+ custom_build_cmd=service.get('buildCommand'),+ custom_start_cmd=service.get('startCommand'),+ healthcheck_path=service.get('healthCheckPath') or service.get('healthcheckPath'),+ )+ if port:+ cls._append_port(result, port)+ cls._merge_env(result, env_entries)++ name = service.get('name') or 'web'+ summary = f'{name} service'+ if runtime:+ summary = f'{summary} using {runtime}'+ cls._add_manifest(result, 'render', file_name, 'Render blueprint', summary)++ @classmethod+ def _detect_railway(cls, file_map: Dict[str, str], result: Dict) -> None:+ file_name, data = cls._first_parsed(file_map, cls.RAILWAY_FILES)+ if not isinstance(data, dict):+ return++ build = data.get('build') if isinstance(data.get('build'), dict) else {}+ deploy = data.get('deploy') if isinstance(data.get('deploy'), dict) else {}+ dockerfile_path = build.get('dockerfilePath') or build.get('dockerfile_path')+ build_method = 'dockerfile' if dockerfile_path else None++ cls._set_recommended(+ result,+ strategy='railway',+ app_type='docker' if build_method == 'dockerfile' else None,+ build_method=build_method,+ dockerfile_path=dockerfile_path,+ custom_build_cmd=build.get('buildCommand') or build.get('build_command'),+ custom_start_cmd=deploy.get('startCommand') or deploy.get('start_command'),+ healthcheck_path=deploy.get('healthcheckPath') or deploy.get('healthcheck_path'),+ )+ summary = 'Railway deploy settings'+ if deploy.get('healthcheckPath') or deploy.get('healthcheck_path'):+ summary = f'{summary} with health check'+ cls._add_manifest(result, 'railway', file_name, 'Railway config', summary)++ @classmethod+ def _detect_dockerfile(cls, file_map: Dict[str, str], result: Dict) -> None:+ content = file_map.get('Dockerfile')+ if content is None:+ return++ ports = cls._ports_from_dockerfile(content)+ for port in ports:+ cls._append_port(result, port)++ cls._set_recommended(+ result,+ strategy='dockerfile',+ app_type='docker',+ build_method='dockerfile',+ port=ports[0] if ports else None,+ dockerfile_path='Dockerfile',+ )+ summary = 'Container build'+ if ports:+ summary = f'{summary}, exposes {ports[0]}'+ cls._add_manifest(result, 'dockerfile', 'Dockerfile', 'Dockerfile', summary)++ @classmethod+ def _detect_app_json(cls, file_map: Dict[str, str], result: Dict) -> None:+ file_name, data = cls._first_parsed(file_map, cls.APP_FILES)+ if not isinstance(data, dict):+ return++ stack = str(data.get('stack') or '').lower()+ app_type = 'docker' if stack == 'container' else None+ build_method = 'dockerfile' if stack == 'container' and 'Dockerfile' in file_map else None+ cls._set_recommended(+ result,+ strategy='app_json',+ app_type=app_type,+ build_method=build_method,+ )+ cls._merge_env(result, cls._env_from_mapping(data.get('env'), source=file_name))+ cls._add_manifest(result, 'app_json', file_name, 'Heroku app manifest', data.get('description') or 'App metadata')++ @classmethod+ def _detect_language_files(cls, file_map: Dict[str, str], result: Dict) -> None:+ if 'package.json' in file_map:+ cls._set_recommended(result, strategy='nixpacks', app_type='static', build_method='nixpacks')+ cls._add_manifest(result, 'package_json', 'package.json', 'Node package', 'Nixpacks-compatible Node project')++ if 'pyproject.toml' in file_map or 'requirements.txt' in file_map:+ framework = 'Python'+ app_type = 'flask'+ build_method = 'nixpacks'+ cls._set_recommended(result, strategy='nixpacks', app_type=app_type, build_method=build_method)+ cls._add_manifest(result, 'python', 'pyproject.toml' if 'pyproject.toml' in file_map else 'requirements.txt', framework, 'Nixpacks-compatible Python project')++ if 'nixpacks.toml' in file_map:+ cls._set_recommended(result, strategy='nixpacks', build_method='nixpacks')+ cls._add_manifest(result, 'nixpacks', 'nixpacks.toml', 'Nixpacks config', 'Explicit Nixpacks build plan')++ @classmethod+ def _finalize_recommendation(cls, result: Dict) -> None:+ if result['strategy']:+ return+ if result['manifests']:+ result['strategy'] = result['manifests'][0]['type']+ return+ result['warnings'].append('No supported deployment manifest found')++ @classmethod+ def _set_recommended(cls, result: Dict, strategy: Optional[str] = None, **values: Any) -> None:+ priority = {+ 'serverkit': 90,+ 'docker_compose': 80,+ 'render': 70,+ 'railway': 65,+ 'dockerfile': 60,+ 'app_json': 50,+ 'nixpacks': 40,+ }+ current_priority = priority.get(result.get('strategy'), 0)+ next_priority = priority.get(strategy, 0)+ can_set_strategy = strategy and next_priority >= current_priority++ if can_set_strategy:+ result['strategy'] = strategy++ for key, value in values.items():+ if value in (None, ''):+ continue+ if key == 'port':+ value = cls._extract_port(value)+ if not value:+ continue+ cls._append_port(result, value)+ if can_set_strategy or result['recommended'].get(key) in (None, '', 'custom', 'static'):+ result['recommended'][key] = value++ @staticmethod+ def _add_manifest(result: Dict, manifest_type: str, file_name: str, label: str, summary: str) -> None:+ if any(item['file'] == file_name for item in result['manifests']):+ return+ result['manifests'].append({+ 'type': manifest_type,+ 'file': file_name,+ 'label': label,+ 'summary': summary,+ })++ @classmethod+ def _first_parsed(cls, file_map: Dict[str, str], candidates: tuple) -> tuple:+ for file_name in candidates:+ if file_name not in file_map:+ continue+ data = cls._parse_file(file_name, file_map[file_name])+ if data is not None:+ return file_name, data+ return None, None++ @staticmethod+ def _parse_file(file_name: str, content: str) -> Optional[Any]:+ try:+ if file_name.endswith('.json'):+ return json.loads(content)+ if file_name.endswith(('.yaml', '.yml')):+ return yaml.safe_load(content) or {}+ if file_name.endswith('.toml'):+ return tomllib.loads(content)+ except Exception:+ return None+ return None++ @classmethod+ def _env_from_render(cls, env_vars: Any, source: str) -> List[Dict]:+ if not isinstance(env_vars, list):+ return []++ entries = []+ for item in env_vars:+ if not isinstance(item, dict) or not item.get('key'):+ continue+ value = item.get('value')+ secret = item.get('sync') is False or cls._looks_secret(item['key'])+ entries.append({+ 'key': item['key'],+ 'value': None if secret else value,+ 'required': item.get('sync') is False or value in (None, ''),+ 'secret': secret,+ 'source': source,+ 'description': item.get('description') or '',+ })+ return entries++ @classmethod+ def _env_from_mapping(cls, env: Any, source: str) -> List[Dict]:+ if not isinstance(env, dict):+ return []++ entries = []+ for key, value in env.items():+ if isinstance(value, dict):+ raw_value = value.get('value')+ required = bool(value.get('required', raw_value in (None, '')))+ description = value.get('description') or ''+ else:+ raw_value = value+ required = raw_value in (None, '')+ description = ''+ secret = cls._looks_secret(key)+ entries.append({+ 'key': key,+ 'value': None if secret else raw_value,+ 'required': required,+ 'secret': secret,+ 'source': source,+ 'description': description,+ })+ return entries++ @classmethod+ def _env_from_compose_service(cls, service: Dict, source: str) -> List[Dict]:+ entries = []+ env = service.get('environment')+ if isinstance(env, dict):+ entries.extend(cls._env_from_mapping(env, source))+ elif isinstance(env, list):+ for item in env:+ if not isinstance(item, str) or not item:+ continue+ key, _, value = item.partition('=')+ secret = cls._looks_secret(key)+ entries.append({+ 'key': key,+ 'value': None if secret or not value else value,+ 'required': not bool(value),+ 'secret': secret,+ 'source': source,+ 'description': '',+ })+ env_file = service.get('env_file')+ if env_file:+ files = env_file if isinstance(env_file, list) else [env_file]+ for file_name in files:+ entries.append({+ 'key': str(file_name),+ 'value': None,+ 'required': False,+ 'secret': False,+ 'source': source,+ 'description': 'Referenced env file',+ 'kind': 'env_file',+ })+ return entries++ @staticmethod+ def _looks_secret(key: str) -> bool:+ return bool(re.search(r'(SECRET|TOKEN|PASSWORD|API_KEY|PRIVATE|CREDENTIAL)', key or '', re.I))++ @classmethod+ def _merge_env(cls, result: Dict, entries: List[Dict]) -> None:+ result['env'].extend(entries)++ @staticmethod+ def _dedupe_env(result: Dict) -> None:+ merged = {}+ for entry in result['env']:+ key = entry.get('key')+ if not key:+ continue+ current = merged.get(key, {})+ merged[key] = {+ **current,+ **entry,+ 'required': bool(current.get('required')) or bool(entry.get('required')),+ 'secret': bool(current.get('secret')) or bool(entry.get('secret')),+ 'sources': sorted(set(current.get('sources', []) + [entry.get('source')])) if entry.get('source') else current.get('sources', []),+ }+ result['env'] = sorted(merged.values(), key=lambda item: (not item.get('required'), item.get('key', '')))++ @classmethod+ def _port_from_env(cls, entries: List[Dict]) -> Optional[int]:+ for entry in entries:+ if entry.get('key', '').upper().endswith('PORT'):+ port = cls._extract_port(entry.get('value'))+ if port:+ return port+ return None++ @staticmethod+ def _ports_from_compose_service(service: Dict) -> List[int]:+ ports = []+ for item in service.get('ports') or []:+ port = None+ if isinstance(item, int):+ port = item+ elif isinstance(item, str):+ cleaned = item.split('/')[0]+ parts = cleaned.split(':')+ port = parts[-2] if len(parts) > 1 else parts[0]+ elif isinstance(item, dict):+ port = item.get('published') or item.get('target')+ extracted = RepositoryManifestService._extract_port(port)+ if extracted:+ ports.append(extracted)+ return ports++ @staticmethod+ def _ports_from_dockerfile(content: str) -> List[int]:+ ports = []+ for line in content.splitlines():+ match = re.match(r'^\s*EXPOSE\s+(.+)$', line, re.I)+ if not match:+ continue+ for value in match.group(1).split():+ port = RepositoryManifestService._extract_port(value.split('/')[0])+ if port:+ ports.append(port)+ return ports++ @staticmethod+ def _extract_port(value: Any) -> Optional[int]:+ if isinstance(value, int) and 0 < value <= 65535:+ return value+ if not isinstance(value, str):+ return None+ match = re.search(r'\d{2,5}', value)+ if not match:+ return None+ port = int(match.group(0))+ if 0 < port <= 65535:+ return port+ return None++ @staticmethod+ def _append_port(result: Dict, port: Optional[int]) -> None:+ if port and port not in result['ports']:+ result['ports'].append(port)diff --git a/backend/app/services/source_connection_service.py b/backend/app/services/source_connection_service.pyindex e53b439c..811d5741 100644--- a/backend/app/services/source_connection_service.py+++ b/backend/app/services/source_connection_service.py@@ -1,5 +1,6 @@"""Source provider connection service for GitHub repository imports."""+import base64import osimport secretsfrom datetime import datetime@@ -10,6 +11,7 @@ from flask import sessionfrom app import dbfrom app.models import SourceConnection+from app.services.repository_manifest_service import RepositoryManifestServicefrom app.services.settings_service import SettingsServicefrom app.utils.crypto import encrypt_secret, decrypt_secret@@ -185,6 +187,27 @@ class SourceConnectionService:for branch in branches]+ @classmethod+ def get_github_repository_manifest(cls, user_id, full_name, ref=None):+ token = cls._get_github_token(user_id)+ owner, repo = cls._split_full_name(full_name)+ root_files = cls._github_list_root_files(token, owner, repo, ref)+ file_map = {}++ for file_name in RepositoryManifestService.supported_files():+ if root_files and file_name not in root_files:+ continue+ content = cls._github_get_file_content(token, owner, repo, file_name, ref)+ if content is not None:+ file_map[file_name] = content++ manifest = RepositoryManifestService.analyze_files(file_map, root_files=root_files)+ connection = cls.get_connection(user_id)+ if connection:+ connection.last_used_at = datetime.utcnow()+ db.session.commit()+ return manifest+@classmethoddef get_authenticated_clone_url(cls, user_id, connection_id, full_name):connection = SourceConnection.query.filter_by(@@ -233,6 +256,43 @@ class SourceConnectionService:'X-GitHub-Api-Version': '2022-11-28',}+ @classmethod+ def _github_list_root_files(cls, token, owner, repo, ref=None):+ params = {}+ if ref:+ params['ref'] = ref+ response = requests.get(+ f'{cls.GITHUB_API_URL}/repos/{quote(owner)}/{quote(repo)}/contents',+ headers=cls._github_headers(token),+ params=params,+ timeout=20,+ )+ response.raise_for_status()+ data = response.json()+ if not isinstance(data, list):+ return []+ return [item.get('name') for item in data if item.get('type') == 'file' and item.get('name')]++ @classmethod+ def _github_get_file_content(cls, token, owner, repo, file_name, ref=None):+ params = {}+ if ref:+ params['ref'] = ref+ response = requests.get(+ f'{cls.GITHUB_API_URL}/repos/{quote(owner)}/{quote(repo)}/contents/{quote(file_name)}',+ headers=cls._github_headers(token),+ params=params,+ timeout=20,+ )+ if response.status_code == 404:+ return None+ response.raise_for_status()+ data = response.json()+ if data.get('type') != 'file' or data.get('encoding') != 'base64':+ return None+ raw = base64.b64decode(data.get('content') or '', validate=False)+ return raw.decode('utf-8', errors='replace')+@staticmethoddef _split_full_name(full_name):parts = (full_name or '').strip().split('/')diff --git a/backend/tests/test_repository_manifest_service.py b/backend/tests/test_repository_manifest_service.pynew file mode 100644index 00000000..b8b64993--- /dev/null+++ b/backend/tests/test_repository_manifest_service.py@@ -0,0 +1,95 @@+from app.services.repository_manifest_service import RepositoryManifestService+++def test_detects_agentsite_style_manifests(tmp_path):+ (tmp_path / 'Dockerfile').write_text('FROM python:3.11\nEXPOSE 6391\n', encoding='utf-8')+ (tmp_path / 'docker-compose.yml').write_text(+ '''+services:+ agentsite:+ build: .+ ports:+ - "6391:6391"+ env_file:+ - .env+''',+ encoding='utf-8',+ )+ (tmp_path / 'render.yaml').write_text(+ '''+services:+ - type: web+ name: agentsite+ runtime: docker+ dockerfilePath: ./Dockerfile+ envVars:+ - key: AGENTSITE_PORT+ value: "6391"+ - key: OPENAI_API_KEY+ sync: false+''',+ encoding='utf-8',+ )+ (tmp_path / 'railway.json').write_text(+ '''+{+ "build": { "dockerfilePath": "Dockerfile" },+ "deploy": { "healthcheckPath": "/api/health" }+}+''',+ encoding='utf-8',+ )+ (tmp_path / 'app.json').write_text(+ '''+{+ "name": "AgentSite",+ "stack": "container",+ "env": {+ "CLAUDE_API_KEY": { "required": false }+ }+}+''',+ encoding='utf-8',+ )++ manifest = RepositoryManifestService.analyze_path(str(tmp_path))++ assert manifest['strategy'] == 'docker_compose'+ assert manifest['recommended']['app_type'] == 'docker'+ assert manifest['recommended']['build_method'] == 'dockerfile'+ assert manifest['recommended']['port'] == 6391+ assert manifest['recommended']['healthcheck_path'] == '/api/health'+ assert {item['file'] for item in manifest['manifests']} >= {+ 'docker-compose.yml',+ 'render.yaml',+ 'railway.json',+ 'Dockerfile',+ 'app.json',+ }+ assert 6391 in manifest['ports']+ env = {item['key']: item for item in manifest['env']}+ assert env['OPENAI_API_KEY']['secret'] is True+ assert env['OPENAI_API_KEY']['required'] is True+ assert env['.env']['kind'] == 'env_file'+++def test_serverkit_manifest_takes_priority(tmp_path):+ (tmp_path / 'Dockerfile').write_text('FROM nginx\n', encoding='utf-8')+ (tmp_path / 'serverkit.json').write_text(+ '''+{+ "app_type": "flask",+ "build": { "method": "nixpacks" },+ "deploy": { "port": 8000, "startCommand": "uvicorn app:app" }+}+''',+ encoding='utf-8',+ )++ manifest = RepositoryManifestService.analyze_path(str(tmp_path))++ assert manifest['strategy'] == 'serverkit'+ assert manifest['recommended']['app_type'] == 'flask'+ assert manifest['recommended']['build_method'] == 'nixpacks'+ assert manifest['recommended']['port'] == 8000+ assert manifest['recommended']['custom_start_cmd'] == 'uvicorn app:app'diff --git a/frontend/src/pages/NewService.jsx b/frontend/src/pages/NewService.jsxindex 2a818df5..37f1159b 100644--- a/frontend/src/pages/NewService.jsx+++ b/frontend/src/pages/NewService.jsx@@ -41,6 +41,49 @@ const BUILD_METHOD_OPTIONS = [{ value: 'custom', label: 'Custom command' },];+const APP_TYPE_LABELS = Object.fromEntries(APP_TYPE_OPTIONS.map(option => [option.value, option.label]));+const BUILD_METHOD_LABELS = Object.fromEntries(BUILD_METHOD_OPTIONS.map(option => [option.value, option.label]));++const SERVICE_TEMPLATES = [+ {+ id: 'agentsite',+ name: 'AgentSite',+ serviceName: 'agentsite',+ description: 'AI-powered website builder with multi-agent orchestration.',+ repoUrl: 'https://github.com/jhd3197/AgentSite.git',+ branch: 'main',+ appType: 'docker',+ buildMethod: 'dockerfile',+ port: 6391,+ badges: ['Render', 'Railway', 'Compose', 'Dockerfile'],+ manifest: {+ strategy: 'docker_compose',+ recommended: {+ app_type: 'docker',+ build_method: 'dockerfile',+ port: 6391,+ dockerfile_path: 'Dockerfile',+ healthcheck_path: '/api/health',+ },+ manifests: [+ { type: 'docker_compose', file: 'docker-compose.yml', label: 'Docker Compose', summary: 'agentsite service on port 6391' },+ { type: 'render', file: 'render.yaml', label: 'Render blueprint', summary: 'agentsite web service using docker' },+ { type: 'railway', file: 'railway.json', label: 'Railway config', summary: 'Dockerfile build with health check' },+ { type: 'app_json', file: 'app.json', label: 'App manifest', summary: 'AI-powered website builder using multi-agent orchestration' },+ ],+ env: [+ { key: 'OPENAI_API_KEY', required: true, secret: true, source: 'render.yaml' },+ { key: 'CLAUDE_API_KEY', required: true, secret: true, source: 'render.yaml' },+ { key: 'GOOGLE_API_KEY', required: true, secret: true, source: 'render.yaml' },+ { key: 'GROQ_API_KEY', required: true, secret: true, source: 'render.yaml' },+ { key: 'GROK_API_KEY', required: true, secret: true, source: 'render.yaml' },+ { key: 'OPENROUTER_API_KEY', required: true, secret: true, source: 'render.yaml' },+ ],+ ports: [6391],+ },+ },+];+function slugify(value) {return value.toLowerCase().replace(/[^a-z0-9-]+/g, '-').replace(/^-+|-+$/g, '');}@@ -60,6 +103,14 @@ function normalizeManualRepo(value) {return trimmed;}+function formatAppType(value) {+ return APP_TYPE_LABELS[value] || value || 'Auto-detect';+}++function formatBuildMethod(value) {+ return BUILD_METHOD_LABELS[value] || value || 'Auto build';+}+const NewService = () => {const navigate = useNavigate();const toast = useToast();@@ -69,8 +120,11 @@ const NewService = () => {const [reposLoading, setReposLoading] = useState(false);const [repoSearch, setRepoSearch] = useState('');const [selectedRepo, setSelectedRepo] = useState(null);+ const [selectedTemplate, setSelectedTemplate] = useState(null);const [branches, setBranches] = useState([]);const [branchesLoading, setBranchesLoading] = useState(false);+ const [repoManifest, setRepoManifest] = useState(null);+ const [repoManifestLoading, setRepoManifestLoading] = useState(false);const [manualRepoUrl, setManualRepoUrl] = useState('');const [name, setName] = useState('');const [nameTouched, setNameTouched] = useState(false);@@ -85,14 +139,22 @@ const NewService = () => {const githubConnection = githubStatus?.connection;const githubConfigured = githubStatus?.configured;const normalizedManualRepo = useMemo(() => normalizeManualRepo(manualRepoUrl), [manualRepoUrl]);+ const activeManifest = sourceMode === 'template' ? selectedTemplate?.manifest : repoManifest;+ const recommended = activeManifest?.recommended || {};const detectedServiceName = useMemo(() => {+ if (sourceMode === 'template' && selectedTemplate) return slugify(selectedTemplate.serviceName || selectedTemplate.name || '');if (sourceMode === 'github' && selectedRepo) return slugify(selectedRepo.name || '');return repoNameFromUrl(normalizedManualRepo);- }, [normalizedManualRepo, selectedRepo, sourceMode]);+ }, [normalizedManualRepo, selectedRepo, selectedTemplate, sourceMode]);const serviceName = nameTouched ? name : detectedServiceName;const canSubmit = sourceMode === 'github'? Boolean(githubConnection && selectedRepo && serviceName?.length >= 2)- : Boolean(normalizedManualRepo && serviceName?.length >= 2);+ : sourceMode === 'template'+ ? Boolean(selectedTemplate && serviceName?.length >= 2)+ : Boolean(normalizedManualRepo && serviceName?.length >= 2);+ const buildSummary = buildMethod === 'auto' && recommended.build_method+ ? `Auto -> ${formatBuildMethod(recommended.build_method)}`+ : formatBuildMethod(buildMethod);const loadGithubStatus = useCallback(async () => {try {@@ -145,6 +207,40 @@ const NewService = () => {}}, [selectedRepo, loadBranches]);+ useEffect(() => {+ if (sourceMode !== 'github' || !selectedRepo) {+ if (sourceMode !== 'template') setRepoManifest(null);+ setRepoManifestLoading(false);+ return undefined;+ }++ let cancelled = false;+ setRepoManifestLoading(true);+ api.inspectGithubRepositoryManifest(selectedRepo.full_name, branch || selectedRepo.default_branch || 'main')+ .then((data) => {+ if (cancelled) return;+ const manifest = data.manifest || null;+ setRepoManifest(manifest);+ const detectedPort = manifest?.recommended?.port;+ if (!port && detectedPort) {+ setPort(String(detectedPort));+ }+ })+ .catch((err) => {+ if (!cancelled) {+ setRepoManifest(null);+ toast.error(err.message || 'Failed to inspect repository manifests');+ }+ })+ .finally(() => {+ if (!cancelled) setRepoManifestLoading(false);+ });++ return () => {+ cancelled = true;+ };+ }, [branch, port, selectedRepo, sourceMode, toast]);+useEffect(() => {if (selectedRepo) {if (!nameTouched) {@@ -164,6 +260,27 @@ const NewService = () => {}}+ function handleSourceModeChange(mode) {+ setSourceMode(mode);+ if (mode === 'template' && !selectedTemplate) {+ handleSelectTemplate(SERVICE_TEMPLATES[0]);+ }+ }++ function handleSelectTemplate(template) {+ setSelectedTemplate(template);+ setSelectedRepo(null);+ setRepoManifest(template.manifest || null);+ setManualRepoUrl(template.repoUrl);+ setName(slugify(template.serviceName || template.name || ''));+ setNameTouched(false);+ setBranch(template.branch || 'main');+ setAppType(template.appType || 'auto');+ setBuildMethod(template.buildMethod || 'auto');+ setPort(template.port ? String(template.port) : '');+ setAutoDeploy(template.autoDeploy ?? true);+ }+function handleManualRepoChange(value) {setManualRepoUrl(value);if (!nameTouched) {@@ -174,7 +291,11 @@ const NewService = () => {async function handleSubmit(e) {e.preventDefault();if (!canSubmit) {- toast.error(sourceMode === 'github' ? 'Select a GitHub repository' : 'Repository URL is required');+ toast.error(sourceMode === 'github'+ ? 'Select a GitHub repository'+ : sourceMode === 'template'+ ? 'Select a service template'+ : 'Repository URL is required');return;}@@ -186,11 +307,17 @@ const NewService = () => {port: port ? Number(port) : null,auto_deploy: autoDeploy,};+ if (recommended.dockerfile_path) payload.dockerfile_path = recommended.dockerfile_path;+ if (recommended.custom_build_cmd) payload.custom_build_cmd = recommended.custom_build_cmd;+ if (recommended.custom_start_cmd) payload.custom_start_cmd = recommended.custom_start_cmd;if (sourceMode === 'github') {payload.source_connection_id = githubConnection.id;payload.repository_full_name = selectedRepo.full_name;payload.repo_url = `https://github.com/${selectedRepo.full_name}.git`;+ } else if (sourceMode === 'template') {+ payload.template_id = selectedTemplate.id;+ payload.repo_url = selectedTemplate.repoUrl;} else {payload.repo_url = normalizedManualRepo;}@@ -232,7 +359,7 @@ const NewService = () => {<buttonclassName={`new-service-page__mode-card ${sourceMode === 'github' ? 'new-service-page__mode-card--active' : ''}`}type="button"- onClick={() => setSourceMode('github')}+ onClick={() => handleSourceModeChange('github')}><span className="new-service-page__mode-icon"><Github size={18} />@@ -246,7 +373,7 @@ const NewService = () => {<buttonclassName={`new-service-page__mode-card ${sourceMode === 'manual' ? 'new-service-page__mode-card--active' : ''}`}type="button"- onClick={() => setSourceMode('manual')}+ onClick={() => handleSourceModeChange('manual')}><span className="new-service-page__mode-icon"><KeyRound size={18} />@@ -257,23 +384,27 @@ const NewService = () => {</span>{sourceMode === 'manual' ? <CheckCircle2 size={18} /> : <ArrowRight size={18} />}</button>- <Link to="/templates" className="new-service-page__mode-card">+ <button+ className={`new-service-page__mode-card ${sourceMode === 'template' ? 'new-service-page__mode-card--active' : ''}`}+ type="button"+ onClick={() => handleSourceModeChange('template')}+ ><span className="new-service-page__mode-icon"><Package size={18} /></span><span>- <strong>Template</strong>- <small>Packaged apps and infrastructure services</small>+ <strong>Deploy Template</strong>+ <small>Fast import from manifest-ready repos</small></span>- <ArrowRight size={18} />- </Link>+ {sourceMode === 'template' ? <CheckCircle2 size={18} /> : <ArrowRight size={18} />}+ </button></div><form className="new-service-page__wizard" onSubmit={handleSubmit}><section className="new-service-page__panel new-service-page__provider-panel"><div className="new-service-page__section-heading"><Link2 size={16} />- <h2>{sourceMode === 'github' ? 'Pick Repository' : 'Connect Source'}</h2>+ <h2>{sourceMode === 'github' ? 'Pick Repository' : sourceMode === 'template' ? 'Choose Template' : 'Connect Source'}</h2></div>{sourceMode === 'github' ? (@@ -353,6 +484,50 @@ const NewService = () => {</div>)}</div>+ ) : sourceMode === 'template' ? (+ <div className="new-service-page__connect-box">+ <div className="new-service-page__connect-heading">+ <span className="new-service-page__connect-icon">+ <Package size={18} />+ </span>+ <div>+ <strong>Manifest-ready templates</strong>+ <span>Templates can ship Render, Railway, Docker Compose, app.json, or ServerKit manifest files.</span>+ </div>+ </div>++ <div className="new-service-page__template-list">+ {SERVICE_TEMPLATES.map(template => (+ <button+ key={template.id}+ type="button"+ className={`new-service-page__template-row ${selectedTemplate?.id === template.id ? 'new-service-page__template-row--active' : ''}`}+ onClick={() => handleSelectTemplate(template)}+ >+ <span className="new-service-page__template-main">+ <strong>{template.name}</strong>+ <small>{template.description}</small>+ <em>{template.repoUrl}</em>+ </span>+ <span className="new-service-page__template-badges">+ {template.badges.map(badge => (+ <span key={badge}>{badge}</span>+ ))}+ </span>+ {selectedTemplate?.id === template.id ? <CheckCircle2 size={18} /> : <ArrowRight size={18} />}+ </button>+ ))}+ </div>++ <div className="new-service-page__connect-actions new-service-page__connect-actions--left">+ <Button type="button" variant="outline" asChild>+ <Link to="/templates">+ <Package size={16} />+ Template Library+ </Link>+ </Button>+ </div>+ </div>) : (<div className="new-service-page__connect-box"><div className="new-service-page__connect-heading">@@ -378,7 +553,7 @@ const NewService = () => {</div>)}- {(selectedRepo || sourceMode === 'manual') && (+ {(selectedRepo || sourceMode === 'manual' || selectedTemplate) && (<div className="new-service-page__repo-preview"><div><span>Service</span>@@ -390,7 +565,7 @@ const NewService = () => {</div><div><span>Build</span>- <strong>{buildMethod === 'auto' ? 'Auto' : buildMethod}</strong>+ <strong>{buildSummary}</strong></div></div>)}@@ -424,14 +599,65 @@ const NewService = () => {</div></div>+ {(repoManifestLoading || activeManifest) && (+ <div className="new-service-page__manifest-card">+ <div className="new-service-page__manifest-head">+ <span>+ <Zap size={16} />+ Manifest Detection+ </span>+ <strong>{repoManifestLoading ? 'Inspecting' : activeManifest?.strategy?.replace('_', ' ') || 'Detected'}</strong>+ </div>+ {!repoManifestLoading && activeManifest && (+ <>+ <div className="new-service-page__manifest-grid">+ <div>+ <span>Type</span>+ <strong>{formatAppType(recommended.app_type)}</strong>+ </div>+ <div>+ <span>Build</span>+ <strong>{formatBuildMethod(recommended.build_method)}</strong>+ </div>+ <div>+ <span>Port</span>+ <strong>{recommended.port || 'Auto'}</strong>+ </div>+ </div>+ <div className="new-service-page__manifest-files">+ {(activeManifest.manifests || []).slice(0, 5).map(manifest => (+ <span key={manifest.file}>+ <CheckCircle2 size={13} />+ {manifest.file}+ </span>+ ))}+ </div>+ {(activeManifest.env || []).length > 0 && (+ <div className="new-service-page__env-preview">+ {(activeManifest.env || []).slice(0, 6).map(env => (+ <span key={env.key} className={env.secret ? 'new-service-page__env-preview-secret' : ''}>+ {env.key}+ </span>+ ))}+ </div>+ )}+ </>+ )}+ </div>+ )}+<div className="new-service-page__summary"><div><span>Source</span>- <strong>{sourceMode === 'github' ? 'GitHub API' : 'Git remote'}</strong>+ <strong>{sourceMode === 'github' ? 'GitHub API' : sourceMode === 'template' ? 'Template' : 'Git remote'}</strong></div><div><span>Repository</span>- <strong>{selectedRepo?.full_name || normalizedManualRepo || 'Not selected'}</strong>+ <strong>{selectedRepo?.full_name || selectedTemplate?.repoUrl || normalizedManualRepo || 'Not selected'}</strong>+ </div>+ <div>+ <span>Build</span>+ <strong>{buildSummary}</strong></div><div><span>Auto-deploy</span>@@ -547,11 +773,11 @@ const NewService = () => {<div className="new-service-page__notes"><div className="new-service-page__note"><ShieldCheck size={16} />- <span>GitHub repositories are listed through the API after account authorization.</span>+ <span>ServerKit checks serverkit.json, Docker Compose, Render, Railway, app.json, Dockerfile, and Nixpacks signals.</span></div><div className="new-service-page__note"><Lock size={16} />- <span>Other Git remotes still use server-side keys or authenticated URLs.</span>+ <span>Secret values from manifests stay empty until you add them to the service environment.</span></div></div>diff --git a/frontend/src/services/api/sourceConnections.js b/frontend/src/services/api/sourceConnections.jsindex ccf84dde..2711a8cc 100644--- a/frontend/src/services/api/sourceConnections.js+++ b/frontend/src/services/api/sourceConnections.js@@ -31,6 +31,13 @@ export async function listGithubBranches(fullName) {return this.request(`/source-connections/github/repos/${encodeURIComponent(fullName)}/branches`);}+export async function inspectGithubRepositoryManifest(fullName, ref = null) {+ const params = new URLSearchParams();+ if (ref) params.set('ref', ref);+ const query = params.toString();+ return this.request(`/source-connections/github/repos/${encodeURIComponent(fullName)}/manifest${query ? `?${query}` : ''}`);+}+export async function getGithubSourceConfig() {return this.request('/source-connections/admin/github');}diff --git a/frontend/src/styles/pages/_new-service.scss b/frontend/src/styles/pages/_new-service.scssindex c2090207..61623ecd 100644--- a/frontend/src/styles/pages/_new-service.scss+++ b/frontend/src/styles/pages/_new-service.scss@@ -64,8 +64,10 @@border: 1px solid $border-subtle;border-radius: $radius-lg;color: $text-primary;+ font: inherit;text-align: left;text-decoration: none;+ cursor: pointer;transition: border-color $transition-fast, background $transition-fast, transform $transition-fast;&:hover {@@ -422,6 +424,97 @@justify-content: center;gap: $space-2;flex-wrap: wrap;++ &--left {+ justify-content: flex-start;+ }+ }++ &__template-list {+ display: grid;+ gap: $space-2;+ }++ &__template-row {+ display: grid;+ grid-template-columns: minmax(0, 1fr) auto auto;+ align-items: center;+ gap: $space-3;+ width: 100%;+ min-height: 86px;+ padding: $space-3;+ background: $bg-elevated;+ border: 1px solid $border-subtle;+ border-radius: $radius-md;+ color: $text-primary;+ font: inherit;+ text-align: left;+ cursor: pointer;+ transition: border-color $transition-fast, background $transition-fast;++ &:hover {+ background: $bg-hover;+ border-color: $border-hover;+ }++ &--active {+ border-color: rgba(20, 184, 166, 0.55);+ box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.18);++ > svg {+ color: $success;+ }+ }+ }++ &__template-main {+ display: grid;+ gap: 3px;+ min-width: 0;++ strong,+ small,+ em {+ display: block;+ min-width: 0;+ overflow-wrap: anywhere;+ }++ strong {+ color: $text-primary;+ font-size: $font-size-sm;+ font-weight: $font-weight-semibold;+ }++ small,+ em {+ color: $text-tertiary;+ font-size: $font-size-xs;+ line-height: 1.35;+ }++ em {+ font-style: normal;+ }+ }++ &__template-badges {+ display: flex;+ align-items: center;+ justify-content: flex-end;+ gap: $space-1;+ flex-wrap: wrap;+ max-width: 210px;++ span {+ padding: 3px $space-2;+ background: rgba(20, 184, 166, 0.1);+ border: 1px solid rgba(20, 184, 166, 0.22);+ border-radius: $radius-full;+ color: $accent-primary;+ font-size: $font-size-xs;+ line-height: 1;+ }}&__field {@@ -554,6 +647,116 @@}}+ &__manifest-card {+ display: grid;+ gap: $space-3;+ padding: $space-3;+ background: $bg-elevated;+ border: 1px solid $border-subtle;+ border-radius: $radius-md;+ }++ &__manifest-head {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: $space-3;++ span {+ display: flex;+ align-items: center;+ gap: $space-2;+ color: $text-secondary;+ font-size: $font-size-sm;+ font-weight: $font-weight-medium;+ }++ svg {+ color: $accent-primary;+ }++ strong {+ color: $text-primary;+ font-size: $font-size-xs;+ font-weight: $font-weight-semibold;+ text-transform: capitalize;+ }+ }++ &__manifest-grid {+ display: grid;+ grid-template-columns: repeat(3, minmax(0, 1fr));+ gap: $space-2;++ > div {+ min-width: 0;+ padding: $space-2;+ background: $bg-card;+ border: 1px solid $border-subtle;+ border-radius: $radius-sm;+ }++ span,+ strong {+ display: block;+ min-width: 0;+ overflow-wrap: anywhere;+ }++ span {+ color: $text-tertiary;+ font-size: $font-size-xs;+ }++ strong {+ margin-top: 2px;+ color: $text-primary;+ font-size: $font-size-xs;+ font-weight: $font-weight-semibold;+ }+ }++ &__manifest-files,+ &__env-preview {+ display: flex;+ align-items: center;+ gap: $space-2;+ flex-wrap: wrap;+ }++ &__manifest-files span,+ &__env-preview span {+ display: inline-flex;+ align-items: center;+ gap: 4px;+ min-height: 24px;+ padding: 0 $space-2;+ border: 1px solid $border-subtle;+ border-radius: $radius-full;+ color: $text-secondary;+ font-size: $font-size-xs;+ line-height: 1;+ }++ &__manifest-files span {+ background: rgba(16, 185, 129, 0.08);++ svg {+ color: $success;+ }+ }++ &__env-preview span {+ background: $bg-card;+ max-width: 100%;+ overflow-wrap: anywhere;+ }++ &__env-preview-secret {+ border-color: rgba(245, 158, 11, 0.25) !important;+ color: $warning !important;+ }+&__advanced-toggle {display: flex;align-items: center;@@ -694,6 +897,8 @@&__provider-grid,&__repo-preview,&__repo-search,+ &__template-row,+ &__manifest-grid,&__two-col {grid-template-columns: 1fr;}