@almadar/shell 2.16.1 → 2.16.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +17 -0
- package/.gitignore +31 -0
- package/locales/en.json +120 -0
- package/package.json +31 -9
- package/packages/client/eslint.config.cjs +56 -0
- package/packages/client/index.html +13 -0
- package/packages/client/node_modules/.bin/autoprefixer +21 -0
- package/packages/client/node_modules/.bin/eslint +21 -0
- package/packages/client/node_modules/.bin/tailwind +21 -0
- package/packages/client/node_modules/.bin/tailwindcss +21 -0
- package/packages/client/node_modules/.bin/tsc +21 -0
- package/packages/client/node_modules/.bin/tsserver +21 -0
- package/packages/client/node_modules/.bin/vite +21 -0
- package/packages/client/node_modules/.bin/vitest +21 -0
- package/packages/client/package.json +63 -0
- package/packages/client/postcss.config.js +6 -0
- package/packages/client/src/App.tsx +81 -0
- package/packages/client/src/config/firebase.ts +37 -0
- package/packages/client/src/features/auth/AuthContext.tsx +139 -0
- package/packages/client/src/features/auth/authService.ts +83 -0
- package/packages/client/src/features/auth/components/Login.tsx +218 -0
- package/packages/client/src/features/auth/components/ProtectedRoute.tsx +27 -0
- package/packages/client/src/features/auth/components/UserProfile.tsx +68 -0
- package/packages/client/src/features/auth/components/index.ts +3 -0
- package/packages/client/src/features/auth/index.ts +13 -0
- package/packages/client/src/features/auth/types.ts +24 -0
- package/packages/client/src/generated/index.ts +13 -0
- package/packages/client/src/index.css +19 -0
- package/packages/client/src/main.tsx +8 -0
- package/packages/client/src/navigation/index.ts +55 -0
- package/packages/client/src/pages/index.ts +12 -0
- package/packages/client/tailwind-preset.cjs +259 -0
- package/packages/client/tailwind.config.js +31 -0
- package/packages/client/tsconfig.json +33 -0
- package/packages/client/vite.config.ts +50 -0
- package/packages/server/eslint.config.cjs +23 -0
- package/packages/server/node_modules/.bin/esbuild +21 -0
- package/packages/server/node_modules/.bin/eslint +21 -0
- package/packages/server/node_modules/.bin/tsc +21 -0
- package/packages/server/node_modules/.bin/tsserver +21 -0
- package/packages/server/node_modules/.bin/tsx +21 -0
- package/packages/server/node_modules/.bin/vitest +21 -0
- package/packages/server/package.json +42 -0
- package/packages/server/pnpm-lock.yaml +4723 -0
- package/packages/server/src/app.ts +41 -0
- package/packages/server/src/index.ts +30 -0
- package/packages/server/src/routes.ts +11 -0
- package/packages/server/src/types/express.d.ts +17 -0
- package/packages/server/tsconfig.json +23 -0
- package/packages/shared/package.json +11 -0
- package/packages/shared/pnpm-lock.yaml +22 -0
- package/packages/shared/src/index.ts +2 -0
- package/pnpm-workspace.yaml +2 -0
- package/turbo.json +17 -0
package/.env.example
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Server
|
|
2
|
+
PORT=3030
|
|
3
|
+
NODE_ENV=production
|
|
4
|
+
# Comma-separated allowlist of browser origins permitted to call the API.
|
|
5
|
+
CORS_ORIGIN=http://localhost:5173,http://localhost:5174
|
|
6
|
+
# LOCAL DEV ONLY — set to true to skip Firebase auth when no Bearer token is sent.
|
|
7
|
+
# Leave unset/false in any deployed environment (fail closed).
|
|
8
|
+
# ALLOW_DEV_AUTH_BYPASS=true
|
|
9
|
+
|
|
10
|
+
# Firebase (required for auth — use emulator for local dev)
|
|
11
|
+
FIRESTORE_EMULATOR_HOST=localhost:8080
|
|
12
|
+
# FIREBASE_PROJECT_ID=
|
|
13
|
+
# FIREBASE_CLIENT_EMAIL=
|
|
14
|
+
# FIREBASE_PRIVATE_KEY=
|
|
15
|
+
|
|
16
|
+
# Client (set in packages/client/.env)
|
|
17
|
+
# VITE_API_URL=http://localhost:3030
|
package/.gitignore
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Turbo
|
|
2
|
+
.turbo/
|
|
3
|
+
|
|
4
|
+
# Node
|
|
5
|
+
node_modules/
|
|
6
|
+
*.log
|
|
7
|
+
|
|
8
|
+
# Build output
|
|
9
|
+
dist/
|
|
10
|
+
|
|
11
|
+
# Environment
|
|
12
|
+
.env
|
|
13
|
+
.env.local
|
|
14
|
+
.env.*.local
|
|
15
|
+
|
|
16
|
+
# Editor
|
|
17
|
+
.vscode/
|
|
18
|
+
.idea/
|
|
19
|
+
*.swp
|
|
20
|
+
*.swo
|
|
21
|
+
|
|
22
|
+
# OS
|
|
23
|
+
.DS_Store
|
|
24
|
+
Thumbs.db
|
|
25
|
+
|
|
26
|
+
# Test coverage
|
|
27
|
+
coverage/
|
|
28
|
+
.nyc_output/
|
|
29
|
+
|
|
30
|
+
# Lock files (regenerated on install)
|
|
31
|
+
package-lock.json
|
package/locales/en.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$meta": { "locale": "en", "direction": "ltr" },
|
|
3
|
+
|
|
4
|
+
"common.save": "Save",
|
|
5
|
+
"common.cancel": "Cancel",
|
|
6
|
+
"common.delete": "Delete",
|
|
7
|
+
"common.close": "Close",
|
|
8
|
+
"common.confirm": "Are you sure?",
|
|
9
|
+
"common.create": "Create",
|
|
10
|
+
"common.edit": "Edit",
|
|
11
|
+
"common.view": "View",
|
|
12
|
+
"common.add": "Add",
|
|
13
|
+
"common.remove": "Remove",
|
|
14
|
+
"common.search": "Search...",
|
|
15
|
+
"common.filter": "Filter",
|
|
16
|
+
"common.actions": "Actions",
|
|
17
|
+
"common.yes": "Yes",
|
|
18
|
+
"common.no": "No",
|
|
19
|
+
"common.ok": "OK",
|
|
20
|
+
"common.done": "Done",
|
|
21
|
+
"common.apply": "Apply",
|
|
22
|
+
"common.reset": "Reset",
|
|
23
|
+
"common.refresh": "Refresh",
|
|
24
|
+
"common.export": "Export",
|
|
25
|
+
"common.import": "Import",
|
|
26
|
+
"common.copy": "Copy",
|
|
27
|
+
"common.settings": "Settings",
|
|
28
|
+
|
|
29
|
+
"nav.previous": "Previous",
|
|
30
|
+
"nav.next": "Next",
|
|
31
|
+
"nav.back": "Back",
|
|
32
|
+
"nav.home": "Home",
|
|
33
|
+
|
|
34
|
+
"form.submit": "Submit",
|
|
35
|
+
"form.saving": "Saving...",
|
|
36
|
+
"form.required": "This field is required",
|
|
37
|
+
"form.invalidEmail": "Enter a valid email address",
|
|
38
|
+
"form.selectPlaceholder": "Select {{label}}...",
|
|
39
|
+
"form.searchPlaceholder": "Search {{entity}}...",
|
|
40
|
+
|
|
41
|
+
"table.empty.title": "No items found",
|
|
42
|
+
"table.empty.description": "No items to display.",
|
|
43
|
+
"table.search.placeholder": "Search...",
|
|
44
|
+
"table.pagination.showing": "Showing {{start}} to {{end}} of {{total}} results",
|
|
45
|
+
"table.pagination.page": "Page {{page}} of {{totalPages}}",
|
|
46
|
+
"table.bulk.selected": "{{count}} selected",
|
|
47
|
+
"table.loading": "Loading...",
|
|
48
|
+
|
|
49
|
+
"status.loading": "Loading...",
|
|
50
|
+
"status.scheduled": "Scheduled",
|
|
51
|
+
"status.inProgress": "In Progress",
|
|
52
|
+
"status.completed": "Completed",
|
|
53
|
+
"status.cancelled": "Cancelled",
|
|
54
|
+
"status.pending": "Pending",
|
|
55
|
+
"status.active": "Active",
|
|
56
|
+
"status.inactive": "Inactive",
|
|
57
|
+
"status.draft": "Draft",
|
|
58
|
+
"status.archived": "Archived",
|
|
59
|
+
|
|
60
|
+
"error.generic": "Something went wrong",
|
|
61
|
+
"error.retry": "Try again",
|
|
62
|
+
"error.notFound": "Not found",
|
|
63
|
+
"error.loadFailed": "Failed to load: {{message}}",
|
|
64
|
+
"error.configMissing": "Configuration not found for: {{id}}",
|
|
65
|
+
|
|
66
|
+
"common.loading": "Loading...",
|
|
67
|
+
"common.showMore": "Show More",
|
|
68
|
+
"common.showLess": "Show Less",
|
|
69
|
+
"common.noResults": "No results found",
|
|
70
|
+
"common.saveChanges": "Save Changes",
|
|
71
|
+
"common.retry": "Retry",
|
|
72
|
+
"common.open": "Open",
|
|
73
|
+
"common.back": "Back",
|
|
74
|
+
|
|
75
|
+
"empty.noItems": "No items",
|
|
76
|
+
"empty.noData": "No data available",
|
|
77
|
+
"empty.noItemsYet": "No items yet",
|
|
78
|
+
"empty.noItemsAdded": "No items added yet",
|
|
79
|
+
"empty.noOptionsFound": "No options found",
|
|
80
|
+
|
|
81
|
+
"list.addItemPlaceholder": "Add new item...",
|
|
82
|
+
|
|
83
|
+
"error.occurred": "An error occurred",
|
|
84
|
+
"error.failedToLoad": "Failed to load data",
|
|
85
|
+
|
|
86
|
+
"wizard.back": "Back",
|
|
87
|
+
"wizard.next": "Next",
|
|
88
|
+
"wizard.complete": "Complete",
|
|
89
|
+
"wizard.stepOf": "Step {{current}} of {{total}}",
|
|
90
|
+
|
|
91
|
+
"pagination.previous": "Previous",
|
|
92
|
+
"pagination.next": "Next",
|
|
93
|
+
"pagination.total": "Total:",
|
|
94
|
+
"pagination.show": "Show:",
|
|
95
|
+
"pagination.goTo": "Go to:",
|
|
96
|
+
"pagination.go": "Go",
|
|
97
|
+
|
|
98
|
+
"auth.signIn": "Sign in",
|
|
99
|
+
"auth.signOut": "Sign out",
|
|
100
|
+
|
|
101
|
+
"dialog.confirm": "Confirm",
|
|
102
|
+
"dialog.cancel": "Cancel",
|
|
103
|
+
"dialog.loading": "Loading...",
|
|
104
|
+
"dialog.delete.title": "Delete {{item}}?",
|
|
105
|
+
"dialog.delete.message": "This action cannot be undone.",
|
|
106
|
+
|
|
107
|
+
"trait.availableActions": "Available Actions",
|
|
108
|
+
"trait.transitions": "Transitions",
|
|
109
|
+
"trait.availableNow": "Available now",
|
|
110
|
+
|
|
111
|
+
"book.startReading": "Start Reading",
|
|
112
|
+
"book.tableOfContents": "Table of Contents",
|
|
113
|
+
"book.partNumber": "Part {{number}}",
|
|
114
|
+
"book.print": "Print",
|
|
115
|
+
"book.previousPage": "Previous page",
|
|
116
|
+
"book.nextPage": "Next page",
|
|
117
|
+
|
|
118
|
+
"quiz.showAnswer": "Show answer",
|
|
119
|
+
"quiz.hideAnswer": "Hide answer"
|
|
120
|
+
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/shell",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Minimal full-stack shell template for Almadar applications",
|
|
6
|
+
"packageManager": "pnpm@10.30.3",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "npx concurrently -n client,server -c blue,green \"pnpm --filter @almadar/shell-client dev\" \"pnpm --filter @almadar/shell-server dev\"",
|
|
9
|
+
"build": "pnpm run -r build",
|
|
10
|
+
"typecheck": "turbo run typecheck",
|
|
11
|
+
"lint": "turbo run lint",
|
|
12
|
+
"prepare": "git rev-parse --git-dir > /dev/null 2>&1 && git config core.hooksPath .githooks || true"
|
|
13
|
+
},
|
|
6
14
|
"devDependencies": {
|
|
7
15
|
"concurrently": "^9.2.1",
|
|
8
16
|
"turbo": "^2.8.17"
|
|
9
17
|
},
|
|
18
|
+
"pnpm": {
|
|
19
|
+
"overrides": {
|
|
20
|
+
"@tootallnate/once": "^3.0.1",
|
|
21
|
+
"esbuild": "^0.25.0",
|
|
22
|
+
"flatted": "^3.4.1",
|
|
23
|
+
"protobufjs": ">=7.5.8 <8",
|
|
24
|
+
"node-forge": "^1.4.0",
|
|
25
|
+
"fast-xml-parser": "^5.7.0",
|
|
26
|
+
"fast-xml-builder": ">=1.1.7",
|
|
27
|
+
"express>path-to-regexp": "0.1.13",
|
|
28
|
+
"qs": "^6.15.2",
|
|
29
|
+
"lodash-es": "^4.18.0"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
10
32
|
"files": [
|
|
11
|
-
"
|
|
33
|
+
"packages",
|
|
34
|
+
"locales",
|
|
35
|
+
"pnpm-workspace.yaml",
|
|
36
|
+
"turbo.json",
|
|
37
|
+
"pnpm-lock.yaml",
|
|
38
|
+
".env.example",
|
|
39
|
+
".gitignore"
|
|
12
40
|
],
|
|
13
41
|
"repository": {
|
|
14
42
|
"type": "git",
|
|
@@ -16,11 +44,5 @@
|
|
|
16
44
|
},
|
|
17
45
|
"publishConfig": {
|
|
18
46
|
"access": "public"
|
|
19
|
-
},
|
|
20
|
-
"scripts": {
|
|
21
|
-
"dev": "npx concurrently -n client,server -c blue,green \"pnpm --filter @almadar/shell-client dev\" \"pnpm --filter @almadar/shell-server dev\"",
|
|
22
|
-
"build": "pnpm run -r build",
|
|
23
|
-
"typecheck": "turbo run typecheck",
|
|
24
|
-
"lint": "turbo run lint"
|
|
25
47
|
}
|
|
26
|
-
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const tsParser = require("@typescript-eslint/parser");
|
|
3
|
+
const almadarPlugin = require("@almadar/eslint-plugin");
|
|
4
|
+
// react-hooks plugin registered so the codegen-emitted
|
|
5
|
+
// `// eslint-disable-next-line react-hooks/exhaustive-deps` comments are
|
|
6
|
+
// well-formed (eslint errors on disable directives that reference
|
|
7
|
+
// unknown rules). The actual rules are left off — enabling them would
|
|
8
|
+
// surface a backlog of dep-array warnings the codegen knows are
|
|
9
|
+
// intentional. Tightening is a separate codegen-fix pass.
|
|
10
|
+
let reactHooksPlugin;
|
|
11
|
+
try {
|
|
12
|
+
reactHooksPlugin = require("eslint-plugin-react-hooks");
|
|
13
|
+
} catch (_) {
|
|
14
|
+
reactHooksPlugin = { rules: { "exhaustive-deps": { meta: {}, create: () => ({}) }, "rules-of-hooks": { meta: {}, create: () => ({}) } } };
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
module.exports = [
|
|
18
|
+
{ ignores: ["dist/**", "node_modules/**", "**/*.test.ts", "**/*.test.tsx"] },
|
|
19
|
+
{
|
|
20
|
+
files: ["src/**/*.ts", "src/**/*.tsx"],
|
|
21
|
+
// The codegen emits `// eslint-disable-next-line react-hooks/exhaustive-deps`
|
|
22
|
+
// ahead of every mount-only effect's `[]` dep array. Until the real
|
|
23
|
+
// `eslint-plugin-react-hooks` is wired (it would fire the rule and
|
|
24
|
+
// make these directives meaningful), the shim's no-op create() means
|
|
25
|
+
// the rule never reports — so ESLint flags the directives as
|
|
26
|
+
// "Unused eslint-disable directive". That's a false alarm at this
|
|
27
|
+
// stage; suppress it so the strict-error rule set still hard-fails.
|
|
28
|
+
linterOptions: { reportUnusedDisableDirectives: "off" },
|
|
29
|
+
languageOptions: {
|
|
30
|
+
parser: tsParser,
|
|
31
|
+
parserOptions: {
|
|
32
|
+
ecmaFeatures: { jsx: true },
|
|
33
|
+
ecmaVersion: "latest",
|
|
34
|
+
sourceType: "module",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
plugins: { almadar: almadarPlugin, "react-hooks": reactHooksPlugin },
|
|
38
|
+
rules: {
|
|
39
|
+
// Zero escape hatches in emitted shell code. Each rule pairs with a
|
|
40
|
+
// codegen-template fix in orbital-rust (see docs/Almadar_Compiler_Gaps.md):
|
|
41
|
+
// - no-as-any: catches `as any` casts.
|
|
42
|
+
// - no-unknown-type: catches `: unknown` annotations.
|
|
43
|
+
// Service results are typed via the integrations
|
|
44
|
+
// contract; every other "unknown" is a typed
|
|
45
|
+
// shape the codegen knows.
|
|
46
|
+
// - no-record-string-unknown: catches `as Record<string, unknown>` casts
|
|
47
|
+
// the codegen used to index into entity rows by
|
|
48
|
+
// string key. The entity has a typed interface
|
|
49
|
+
// — emit against that.
|
|
50
|
+
"almadar/no-as-any": "error",
|
|
51
|
+
"almadar/no-unknown-type": "error",
|
|
52
|
+
"almadar/no-record-string-unknown": "error",
|
|
53
|
+
"almadar/no-import-generated": "error",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Almadar App</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/autoprefixer@10.4.27_postcss@8.5.8/node_modules/autoprefixer/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/autoprefixer@10.4.27_postcss@8.5.8/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/autoprefixer@10.4.27_postcss@8.5.8/node_modules/autoprefixer/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/autoprefixer@10.4.27_postcss@8.5.8/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../autoprefixer/bin/autoprefixer" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../autoprefixer/bin/autoprefixer" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/eslint@10.0.0_jiti@1.21.7/node_modules/eslint/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/eslint@10.0.0_jiti@1.21.7/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/eslint@10.0.0_jiti@1.21.7/node_modules/eslint/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/eslint@10.0.0_jiti@1.21.7/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../eslint/bin/eslint.js" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../eslint/bin/eslint.js" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/tailwindcss@3.4.19_tsx@4.21.0/node_modules/tailwindcss/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/tailwindcss@3.4.19_tsx@4.21.0/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/tailwindcss@3.4.19_tsx@4.21.0/node_modules/tailwindcss/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/tailwindcss@3.4.19_tsx@4.21.0/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../tailwindcss/lib/cli.js" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../tailwindcss/lib/cli.js" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/tailwindcss@3.4.19_tsx@4.21.0/node_modules/tailwindcss/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/tailwindcss@3.4.19_tsx@4.21.0/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/tailwindcss@3.4.19_tsx@4.21.0/node_modules/tailwindcss/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/tailwindcss@3.4.19_tsx@4.21.0/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../tailwindcss/lib/cli.js" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../tailwindcss/lib/cli.js" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../typescript/bin/tsc" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../typescript/bin/tsserver" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/vite@6.4.1_@types+node@22.19.15_jiti@1.21.7_tsx@4.21.0/node_modules/vite/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/vite@6.4.1_@types+node@22.19.15_jiti@1.21.7_tsx@4.21.0/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/vite@6.4.1_@types+node@22.19.15_jiti@1.21.7_tsx@4.21.0/node_modules/vite/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/vite@6.4.1_@types+node@22.19.15_jiti@1.21.7_tsx@4.21.0/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../vite/bin/vite.js" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../vite/bin/vite.js" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/vitest@2.1.9_@types+node@22.19.15_jsdom@25.0.1/node_modules/vitest/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/vitest@2.1.9_@types+node@22.19.15_jsdom@25.0.1/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/vitest@2.1.9_@types+node@22.19.15_jsdom@25.0.1/node_modules/vitest/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/vitest@2.1.9_@types+node@22.19.15_jsdom@25.0.1/node_modules:/home/osamah/kflow.ai.builder/orbital-rust/packages/almadar-shell/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../vitest/vitest.mjs" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../vitest/vitest.mjs" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@almadar/shell-client",
|
|
3
|
+
"version": "2.13.15",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc && vite build",
|
|
9
|
+
"typecheck": "tsc --noEmit",
|
|
10
|
+
"lint": "eslint --max-warnings 0 src/",
|
|
11
|
+
"preview": "vite preview",
|
|
12
|
+
"test": "vitest run --passWithNoTests",
|
|
13
|
+
"test:watch": "vitest"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@almadar/core": "^7.14.3",
|
|
17
|
+
"@almadar/evaluator": "^2.11.2",
|
|
18
|
+
"@almadar/logger": "^1.3.0",
|
|
19
|
+
"@almadar/patterns": "^2.30.2",
|
|
20
|
+
"@almadar/syntax": "^1.4.0",
|
|
21
|
+
"@almadar/ui": "^4.55.0",
|
|
22
|
+
"@monaco-editor/react": "^4.7.0",
|
|
23
|
+
"@react-three/drei": "^9.92.0",
|
|
24
|
+
"@react-three/fiber": "^9.0.0",
|
|
25
|
+
"@react-three/postprocessing": "^3.0.0",
|
|
26
|
+
"@tanstack/react-query": "^5.67.3",
|
|
27
|
+
"firebase": "^11.4.0",
|
|
28
|
+
"leaflet": "^1.9.4",
|
|
29
|
+
"lucide-react": "^0.344.0",
|
|
30
|
+
"monaco-editor": "^0.52.2",
|
|
31
|
+
"postprocessing": "^6.39.0",
|
|
32
|
+
"react": "^19.0.0",
|
|
33
|
+
"react-dom": "^19.0.0",
|
|
34
|
+
"react-force-graph-2d": "^1.25.5",
|
|
35
|
+
"react-leaflet": "^4.2.1",
|
|
36
|
+
"react-markdown": "^9.0.1",
|
|
37
|
+
"react-router-dom": "^7.3.0",
|
|
38
|
+
"rehype-katex": "^7.0.1",
|
|
39
|
+
"rehype-raw": "^7.0.0",
|
|
40
|
+
"remark-gfm": "^4.0.1",
|
|
41
|
+
"remark-math": "^6.0.0",
|
|
42
|
+
"three": "^0.160.0",
|
|
43
|
+
"zustand": "^5.0.3"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@almadar/eslint-plugin": "^2.8.1",
|
|
47
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
48
|
+
"@testing-library/react": "^16.1.0",
|
|
49
|
+
"@types/react": "^19.0.0",
|
|
50
|
+
"@types/react-dom": "^19.0.0",
|
|
51
|
+
"@typescript-eslint/parser": "8.56.0",
|
|
52
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
53
|
+
"autoprefixer": "^10.4.20",
|
|
54
|
+
"eslint": "10.0.0",
|
|
55
|
+
"jsdom": "^25.0.1",
|
|
56
|
+
"postcss": "^8.5.3",
|
|
57
|
+
"tailwindcss": "^3.4.17",
|
|
58
|
+
"@tailwindcss/container-queries": "^0.1.1",
|
|
59
|
+
"typescript": "^5.7.3",
|
|
60
|
+
"vite": "^6.2.1",
|
|
61
|
+
"vitest": "^2.1.9"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App Entry Point
|
|
3
|
+
*
|
|
4
|
+
* Main application component with compiler-generated content placeholders.
|
|
5
|
+
* The Rust compiler replaces {{PLACEHOLDERS}} with generated code.
|
|
6
|
+
*
|
|
7
|
+
* Navigation works via schema-driven NavigationProvider:
|
|
8
|
+
* - NavigationProvider holds active page state
|
|
9
|
+
* - navigateTo() switches pages and fires INIT with payload
|
|
10
|
+
* - No dependency on react-router for internal navigation
|
|
11
|
+
* - react-router is optional for URL bookmarkability
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { BrowserRouter, Routes, Route } from 'react-router-dom';
|
|
15
|
+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
16
|
+
import { ThemeProvider, UISlotProvider } from '@almadar/ui/context';
|
|
17
|
+
import { UISlotComponent, NotifyListener } from '@almadar/ui/components';
|
|
18
|
+
import {
|
|
19
|
+
EventBusProvider,
|
|
20
|
+
VerificationProvider,
|
|
21
|
+
} from '@almadar/ui/providers';
|
|
22
|
+
import { NavigationProvider } from '@almadar/ui/renderer';
|
|
23
|
+
import { I18nProvider, createTranslate } from '@almadar/ui/hooks';
|
|
24
|
+
import defaultLocale from '@almadar/ui/locales/en.json';
|
|
25
|
+
|
|
26
|
+
// {{GENERATED_I18N_IMPORT}}
|
|
27
|
+
// {{GENERATED_IMPORTS}}
|
|
28
|
+
|
|
29
|
+
// Generated schema import (compiler fills this in)
|
|
30
|
+
// {{GENERATED_SCHEMA_IMPORT}}
|
|
31
|
+
const schema = { name: 'app', orbitals: [] }; // Placeholder - replaced by compiler
|
|
32
|
+
|
|
33
|
+
// {{GENERATED_I18N_VALUE}}
|
|
34
|
+
const { $meta: defaultMeta, ...defaultMessages } = defaultLocale;
|
|
35
|
+
const i18nValue = { locale: defaultMeta?.locale ?? 'en', direction: (defaultMeta?.direction ?? 'ltr') as 'ltr' | 'rtl', t: createTranslate(defaultMessages) };
|
|
36
|
+
|
|
37
|
+
const queryClient = new QueryClient({
|
|
38
|
+
defaultOptions: {
|
|
39
|
+
queries: {
|
|
40
|
+
staleTime: 1000 * 60,
|
|
41
|
+
refetchOnWindowFocus: false,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
function App() {
|
|
47
|
+
return (
|
|
48
|
+
<I18nProvider value={i18nValue}>
|
|
49
|
+
<QueryClientProvider client={queryClient}>
|
|
50
|
+
<ThemeProvider defaultTheme="minimalist">
|
|
51
|
+
<EventBusProvider>
|
|
52
|
+
<VerificationProvider>
|
|
53
|
+
<UISlotProvider>
|
|
54
|
+
<NavigationProvider
|
|
55
|
+
schema={schema}
|
|
56
|
+
updateUrl={true}
|
|
57
|
+
onNavigate={(pageName, path, payload) => {
|
|
58
|
+
console.log('[App] Navigation:', { pageName, path, payload });
|
|
59
|
+
}}
|
|
60
|
+
>
|
|
61
|
+
<BrowserRouter>
|
|
62
|
+
<Routes>
|
|
63
|
+
{/* {{GENERATED_ROUTES}} */}
|
|
64
|
+
<Route path="/" element={<div>Welcome to Almadar</div>} />
|
|
65
|
+
</Routes>
|
|
66
|
+
{/* Portal slots rendered by compiled trait views via CompiledPortal */}
|
|
67
|
+
{/* Toast notifications (non-overlapping, always safe to render here) */}
|
|
68
|
+
<UISlotComponent slot="toast" portal />
|
|
69
|
+
<NotifyListener />
|
|
70
|
+
</BrowserRouter>
|
|
71
|
+
</NavigationProvider>
|
|
72
|
+
</UISlotProvider>
|
|
73
|
+
</VerificationProvider>
|
|
74
|
+
</EventBusProvider>
|
|
75
|
+
</ThemeProvider>
|
|
76
|
+
</QueryClientProvider>
|
|
77
|
+
</I18nProvider>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export default App;
|