diff --git a/apps/ainas-controlplane/appinfo/info.xml b/apps/ainas-controlplane/appinfo/info.xml index d36430e..acad986 100644 --- a/apps/ainas-controlplane/appinfo/info.xml +++ b/apps/ainas-controlplane/appinfo/info.xml @@ -1,13 +1,13 @@ - ainascontrolplane + betternascontrolplane aiNAS Control Plane Thin aiNAS shell app for Nextcloud integration Provides aiNAS-branded entry points inside Nextcloud while delegating business logic to the aiNAS control plane. 0.1.0 AGPL-3.0-or-later - aiNAS + aiNAS AinasControlplane integration @@ -15,9 +15,9 @@ - ainascontrolplane + betternascontrolplane aiNAS - ainascontrolplane.page.index + betternascontrolplane.page.index app.svg link diff --git a/apps/ainas-controlplane/composer.json b/apps/ainas-controlplane/composer.json index 6f316d5..2bdea52 100644 --- a/apps/ainas-controlplane/composer.json +++ b/apps/ainas-controlplane/composer.json @@ -1,5 +1,5 @@ { - "name": "ainas/ainascontrolplane", + "name": "betternas/betternascontrolplane", "description": "aiNAS Nextcloud shell app", "license": "AGPL-3.0-or-later", "autoload": { diff --git a/apps/ainas-controlplane/css/ainascontrolplane.css b/apps/ainas-controlplane/css/ainascontrolplane.css index d5aec9e..e4b2840 100644 --- a/apps/ainas-controlplane/css/ainascontrolplane.css +++ b/apps/ainas-controlplane/css/ainascontrolplane.css @@ -1,10 +1,10 @@ -.ainas-shell { +.betternas-shell { max-width: 1100px; margin: 0 auto; padding: 32px; } -.ainas-shell__hero { +.betternas-shell__hero { margin-bottom: 28px; padding: 28px; border-radius: 24px; @@ -12,7 +12,7 @@ color: #f6fafc; } -.ainas-shell__eyebrow { +.betternas-shell__eyebrow { margin: 0 0 12px; font-size: 12px; letter-spacing: 0.12em; @@ -20,26 +20,26 @@ opacity: 0.8; } -.ainas-shell__title { +.betternas-shell__title { margin: 0 0 12px; font-size: 32px; line-height: 1.1; } -.ainas-shell__copy { +.betternas-shell__copy { margin: 0; max-width: 70ch; font-size: 15px; line-height: 1.6; } -.ainas-shell__grid { +.betternas-shell__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; } -.ainas-shell__card { +.betternas-shell__card { padding: 24px; border: 1px solid rgba(16, 33, 45, 0.12); border-radius: 20px; @@ -47,38 +47,38 @@ box-shadow: 0 20px 40px rgba(16, 33, 45, 0.06); } -.ainas-shell__card h2 { +.betternas-shell__card h2 { margin-top: 0; } -.ainas-shell__card dl { +.betternas-shell__card dl { display: grid; grid-template-columns: minmax(120px, 160px) 1fr; gap: 8px 16px; margin: 0; } -.ainas-shell__card dt { +.betternas-shell__card dt { font-weight: 600; } -.ainas-shell__card dd { +.betternas-shell__card dd { margin: 0; } -.ainas-shell__card code { +.betternas-shell__card code { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #eef4f7; } -.ainas-shell__card ul { +.betternas-shell__card ul { margin: 0; padding-left: 20px; } -.ainas-shell__error { +.betternas-shell__error { margin-top: 16px; color: #b42318; } diff --git a/apps/ainas-controlplane/lib/AppInfo/Application.php b/apps/ainas-controlplane/lib/AppInfo/Application.php index 6a6dbd2..6c2d2c8 100644 --- a/apps/ainas-controlplane/lib/AppInfo/Application.php +++ b/apps/ainas-controlplane/lib/AppInfo/Application.php @@ -10,7 +10,7 @@ use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; class Application extends App implements IBootstrap { - public const APP_ID = 'ainascontrolplane'; + public const APP_ID = 'betternascontrolplane'; public function __construct() { parent::__construct(self::APP_ID); diff --git a/apps/ainas-controlplane/templates/admin.php b/apps/ainas-controlplane/templates/admin.php index 37d622f..e3ae9cb 100644 --- a/apps/ainas-controlplane/templates/admin.php +++ b/apps/ainas-controlplane/templates/admin.php @@ -5,24 +5,24 @@ declare(strict_types=1); use OCA\AinasControlplane\AppInfo\Application; use OCP\Util; -Util::addStyle(Application::APP_ID, 'ainascontrolplane'); +Util::addStyle(Application::APP_ID, 'betternascontrolplane'); $snapshot = $_['snapshot']; $reachable = !empty($snapshot['available']) ? 'yes' : 'no'; $version = $snapshot['version']['version'] ?? 'unreachable'; ?> -
-
-

Admin settings

-

aiNAS control-plane wiring

-

+

+
+

Admin settings

+

aiNAS control-plane wiring

+

The local scaffold wires this app to the control plane through the AINAS_CONTROL_PLANE_URL environment variable in the Nextcloud container.

-
-
+
+

Current wiring

Control-plane URL
@@ -34,7 +34,7 @@ $version = $snapshot['version']['version'] ?? 'unreachable';
-
+

Next step

Keep storage policy, sharing logic, and orchestration in the control-plane service. This page should remain a thin integration surface.

diff --git a/apps/ainas-controlplane/templates/index.php b/apps/ainas-controlplane/templates/index.php index 3d1c3d8..287a10d 100644 --- a/apps/ainas-controlplane/templates/index.php +++ b/apps/ainas-controlplane/templates/index.php @@ -5,7 +5,7 @@ declare(strict_types=1); use OCA\AinasControlplane\AppInfo\Application; use OCP\Util; -Util::addStyle(Application::APP_ID, 'ainascontrolplane'); +Util::addStyle(Application::APP_ID, 'betternascontrolplane'); $snapshot = $_['snapshot']; $version = $snapshot['version']['version'] ?? 'unreachable'; @@ -13,17 +13,17 @@ $status = !empty($snapshot['available']) ? 'Connected' : 'Unavailable'; $error = $snapshot['error'] ?? null; ?> -
-
-

aiNAS inside Nextcloud

-

-

+

+
+

aiNAS inside Nextcloud

+

+

This shell app stays intentionally thin. It exposes aiNAS entry points inside Nextcloud and delegates business logic to the external control-plane service.

-
-
+
+

Control plane

Configured URL
@@ -34,11 +34,11 @@ $error = $snapshot['error'] ?? null;
-

+

-
+

Boundary

  • Nextcloud provides file and client primitives.
  • diff --git a/docs/current-architecture.md b/docs/current-architecture.md index 21d0f5d..0e9879f 100644 --- a/docs/current-architecture.md +++ b/docs/current-architecture.md @@ -6,7 +6,7 @@ aiNAS treats Nextcloud as an upstream backend, not as the place where aiNAS prod That leads to three explicit boundaries: -1. `apps/ainas-controlplane/` is a thin shell inside Nextcloud. +1. `apps/betternas-controlplane/` is a thin shell inside Nextcloud. 2. `exapps/control-plane/` owns aiNAS business logic and internal APIs. 3. `packages/contracts/` defines the interface between the shell app and the control plane. diff --git a/exapps/control-plane/package.json b/exapps/control-plane/package.json index 80db795..040ca65 100644 --- a/exapps/control-plane/package.json +++ b/exapps/control-plane/package.json @@ -1,5 +1,5 @@ { - "name": "@ainas/control-plane", + "name": "@betternas/control-plane", "version": "0.1.0", "private": true, "type": "module", @@ -11,7 +11,7 @@ "typecheck": "tsc --noEmit -p tsconfig.json" }, "dependencies": { - "@ainas/contracts": "file:../../packages/contracts" + "@betternas/contracts": "file:../../packages/contracts" }, "devDependencies": { "@types/node": "^22.18.6", diff --git a/exapps/control-plane/src/adapters/nextcloud-backend.ts b/exapps/control-plane/src/adapters/nextcloud-backend.ts index ea2befd..8c892c0 100644 --- a/exapps/control-plane/src/adapters/nextcloud-backend.ts +++ b/exapps/control-plane/src/adapters/nextcloud-backend.ts @@ -1,4 +1,4 @@ -import type { NextcloudBackendStatus } from "@ainas/contracts"; +import type { NextcloudBackendStatus } from "@betternas/contracts"; export class NextcloudBackendAdapter { constructor(private readonly baseUrl: string) {} diff --git a/exapps/control-plane/src/app.ts b/exapps/control-plane/src/app.ts index e32f556..7f30e1e 100644 --- a/exapps/control-plane/src/app.ts +++ b/exapps/control-plane/src/app.ts @@ -3,7 +3,7 @@ import { CONTROL_PLANE_ROUTES, type ControlPlaneHealthResponse, type ControlPlaneVersionResponse -} from "@ainas/contracts"; +} from "@betternas/contracts"; import type { ControlPlaneConfig } from "./config.js"; import { NextcloudBackendAdapter } from "./adapters/nextcloud-backend.js"; diff --git a/nextcloud.txt b/nextcloud.txt index 0daca75..17e675d 100644 --- a/nextcloud.txt +++ b/nextcloud.txt @@ -17,7 +17,7 @@ docker/ nextcloud/ CADDY/ apps/ - ainas-controlplane/ #generate from nextcloud tempalte + betternas-controlplane/ #generate from nextcloud tempalte exapps/ sharing-service/ #golang/python policy-service/ diff --git a/openspec/changes/scaffold-nextcloud-control-plane/design.md b/openspec/changes/scaffold-nextcloud-control-plane/design.md index 8ec7189..448adcb 100644 --- a/openspec/changes/scaffold-nextcloud-control-plane/design.md +++ b/openspec/changes/scaffold-nextcloud-control-plane/design.md @@ -65,7 +65,7 @@ The initial scaffold will create clear top-level directories for infrastructure, Initial structure: - `docker/`: local orchestration and container assets -- `apps/ainas-controlplane/`: generated Nextcloud shell app +- `apps/betternas-controlplane/`: generated Nextcloud shell app - `exapps/control-plane/`: aiNAS control-plane service, packaged for Nextcloud-compatible dev flows - `packages/contracts/`: shared schemas and API contracts - `docs/`: architecture and product model notes @@ -105,7 +105,7 @@ Alternatives considered: 1. Add the proposal artifacts that establish the architecture and scaffold requirements. 2. Create the top-level repository layout and a Docker Compose development environment. -3. Generate the Nextcloud shell app into `apps/ainas-controlplane/`. +3. Generate the Nextcloud shell app into `apps/betternas-controlplane/`. 4. Scaffold the control-plane service and shared contracts package. 5. Verify local startup, service discovery, and basic health paths before implementing product features. diff --git a/openspec/changes/scaffold-nextcloud-control-plane/tasks.md b/openspec/changes/scaffold-nextcloud-control-plane/tasks.md index 117a438..cab1374 100644 --- a/openspec/changes/scaffold-nextcloud-control-plane/tasks.md +++ b/openspec/changes/scaffold-nextcloud-control-plane/tasks.md @@ -7,7 +7,7 @@ ## 2. Nextcloud shell app scaffold -- [x] 2.1 Generate the aiNAS Nextcloud app scaffold into `apps/ainas-controlplane/` +- [x] 2.1 Generate the aiNAS Nextcloud app scaffold into `apps/betternas-controlplane/` - [x] 2.2 Configure the shell app with aiNAS branding, navigation entry points, and basic settings surface - [x] 2.3 Add an adapter layer in the shell app for calling aiNAS-owned service endpoints - [x] 2.4 Verify the shell app installs and loads in the local Nextcloud runtime diff --git a/package-lock.json b/package-lock.json index fa88499..f1bdc02 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,20 +1,20 @@ { - "name": "ainas", + "name": "betternas", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "ainas", + "name": "betternas", "workspaces": [ "packages/*", "exapps/*" ] }, "exapps/control-plane": { - "name": "@ainas/control-plane", + "name": "@betternas/control-plane", "version": "0.1.0", "dependencies": { - "@ainas/contracts": "file:../../packages/contracts" + "@betternas/contracts": "file:../../packages/contracts" }, "devDependencies": { "@types/node": "^22.18.6", @@ -22,11 +22,11 @@ "typescript": "^5.9.3" } }, - "node_modules/@ainas/contracts": { + "node_modules/@betternas/contracts": { "resolved": "packages/contracts", "link": true }, - "node_modules/@ainas/control-plane": { + "node_modules/@betternas/control-plane": { "resolved": "exapps/control-plane", "link": true }, @@ -604,7 +604,7 @@ "license": "MIT" }, "packages/contracts": { - "name": "@ainas/contracts", + "name": "@betternas/contracts", "version": "0.1.0" } } diff --git a/package.json b/package.json index 39c245f..94bf31f 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "ainas", + "name": "betternas", "private": true, "packageManager": "npm@10.9.7", "workspaces": [ @@ -7,9 +7,9 @@ "exapps/*" ], "scripts": { - "build": "npm run build --workspace @ainas/contracts && npm run build --workspace @ainas/control-plane", - "typecheck": "npm run typecheck --workspace @ainas/contracts && npm run typecheck --workspace @ainas/control-plane", - "dev:control-plane": "npm run dev --workspace @ainas/control-plane" + "build": "npm run build --workspace @betternas/contracts && npm run build --workspace @betternas/control-plane", + "typecheck": "npm run typecheck --workspace @betternas/contracts && npm run typecheck --workspace @betternas/control-plane", + "dev:control-plane": "npm run dev --workspace @betternas/control-plane" } } diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 428dbc6..c4c57e8 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -1,5 +1,5 @@ { - "name": "@ainas/contracts", + "name": "@betternas/contracts", "version": "0.1.0", "private": true, "type": "module", diff --git a/packages/contracts/schemas/control-plane-health.schema.json b/packages/contracts/schemas/control-plane-health.schema.json index 803bb10..c43bda2 100644 --- a/packages/contracts/schemas/control-plane-health.schema.json +++ b/packages/contracts/schemas/control-plane-health.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://ainas.local/schemas/control-plane-health.schema.json", + "$id": "https://betternas.local/schemas/control-plane-health.schema.json", "type": "object", "additionalProperties": false, "required": [ diff --git a/packages/contracts/schemas/control-plane-version.schema.json b/packages/contracts/schemas/control-plane-version.schema.json index 15b10da..1133e53 100644 --- a/packages/contracts/schemas/control-plane-version.schema.json +++ b/packages/contracts/schemas/control-plane-version.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://ainas.local/schemas/control-plane-version.schema.json", + "$id": "https://betternas.local/schemas/control-plane-version.schema.json", "type": "object", "additionalProperties": false, "required": [ diff --git a/phase1.txt b/phase1.txt index 25891a8..f348e33 100644 --- a/phase1.txt +++ b/phase1.txt @@ -1,9 +1,9 @@ aiNAS repo - │ apps/ainas-controlplane + │ apps/betternas-controlplane │ PHP Nextcloud app │ - nav entry: "aiNAS" - │ - page route: /index.php/apps/ainascontrolplane/ - │ - OCS route: /ocs/v2.php/apps/ainascontrolplane/api/status + │ - page route: /index.php/apps/betternascontrolplane/ + │ - OCS route: /ocs/v2.php/apps/betternascontrolplane/api/status │ - job today: call control-plane and render a thin shell │ │ exapps/control-plane diff --git a/scripts/dev-up b/scripts/dev-up index cb2c714..269403a 100755 --- a/scripts/dev-up +++ b/scripts/dev-up @@ -4,7 +4,7 @@ set -euo pipefail repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" compose_file="$repo_root/docker/compose.dev.yml" -app_source_dir="$repo_root/apps/ainas-controlplane" +app_source_dir="$repo_root/apps/betternas-controlplane" nextcloud_occ() { docker compose -f "$compose_file" exec -T --user www-data --workdir /var/www/html nextcloud php occ "$@" @@ -17,13 +17,13 @@ nextcloud_is_installed() { docker compose -f "$compose_file" up -d --build docker compose -f "$compose_file" exec -T --user root nextcloud sh -lc ' - mkdir -p /var/www/html/custom_apps/ainascontrolplane + mkdir -p /var/www/html/custom_apps/betternascontrolplane chown -R www-data:www-data /var/www/html/custom_apps ' -docker compose -f "$compose_file" cp "$app_source_dir/." nextcloud:/var/www/html/custom_apps/ainascontrolplane +docker compose -f "$compose_file" cp "$app_source_dir/." nextcloud:/var/www/html/custom_apps/betternascontrolplane docker compose -f "$compose_file" exec -T --user root nextcloud sh -lc ' - chown -R www-data:www-data /var/www/html/custom_apps/ainascontrolplane + chown -R www-data:www-data /var/www/html/custom_apps/betternascontrolplane ' echo "Waiting for Nextcloud command interface..." @@ -60,7 +60,7 @@ if ! nextcloud_is_installed; then fi fi -nextcloud_occ app:enable --force ainascontrolplane >/dev/null +nextcloud_occ app:enable --force betternascontrolplane >/dev/null echo "Nextcloud: http://localhost:8080" echo "aiNAS control plane: http://localhost:3001"