@aravinthan_p/appnest-engine 1.0.18 → 1.0.20
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/README.md +6 -6
- package/appnest-backend/package.json +2 -2
- package/appnest-command-line/appnest-command.js +1 -1
- package/appnest-command-line/bundleUtils.js +2 -2
- package/appnest-command-line/installUtils.js +1 -1
- package/appnest-frontend/core-ui/CoreMain.jsx +0 -1
- package/appnest-frontend/core-ui/CoreUI.jsx +35 -2
- package/appnest-frontend/vite.config.js +10 -0
- package/{appnest-installation-frontend → appnest-install-frontend}/package-lock.json +2 -2
- package/{appnest-installation-frontend → appnest-install-frontend}/package.json +1 -1
- package/appnest-proxy/server.js +2 -2
- package/package.json +1 -1
- /package/{appnest-installation-frontend → appnest-install-frontend}/README.md +0 -0
- /package/{appnest-installation-frontend → appnest-install-frontend}/core-ui/CoreMain.jsx +0 -0
- /package/{appnest-installation-frontend → appnest-install-frontend}/core-ui/CoreUI.css +0 -0
- /package/{appnest-installation-frontend → appnest-install-frontend}/core-ui/CoreUI.jsx +0 -0
- /package/{appnest-installation-frontend → appnest-install-frontend}/core-ui/index.css +0 -0
- /package/{appnest-installation-frontend → appnest-install-frontend}/eslint.config.js +0 -0
- /package/{appnest-installation-frontend → appnest-install-frontend}/index.html +0 -0
- /package/{appnest-installation-frontend → appnest-install-frontend}/vite.config.js +0 -0
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ Appnest Engine runs in the **developer’s project directory** (where `app-backe
|
|
|
36
36
|
│ • Allocates ports for app-backend, app-frontend, app-installation-* │
|
|
37
37
|
│ • Starts appnest-backend (loads user’s app-backend/server.js) │
|
|
38
38
|
│ • Starts appnest-frontend (Vite dev server for app-frontend) │
|
|
39
|
-
│ • Starts appnest-
|
|
39
|
+
│ • Starts appnest-install-frontend if folder exists │
|
|
40
40
|
│ • Proxies: │
|
|
41
41
|
│ /app-backend/* → app-backend │
|
|
42
42
|
│ /app-frontend/* → app-frontend │
|
|
@@ -57,7 +57,7 @@ Appnest Engine runs in the **developer’s project directory** (where `app-backe
|
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
- **User directory** = where the developer runs the CLI (`process.cwd()` → `ORIGINAL_CWD` for child processes).
|
|
60
|
-
- **Engine packages** = `appnest-backend`, `appnest-frontend`, `appnest-
|
|
60
|
+
- **Engine packages** = `appnest-backend`, `appnest-frontend`, `appnest-install-frontend`, `appnest-proxy` (inside this repo). They are the runtime that loads and serves the **app** folders from the user directory.
|
|
61
61
|
|
|
62
62
|
---
|
|
63
63
|
|
|
@@ -72,7 +72,7 @@ Appnest Engine runs in the **developer’s project directory** (where `app-backe
|
|
|
72
72
|
| **appnest-proxy/** | Express server on port 3000; env from user `.env`; starts backend + frontends; proxies and file watching. |
|
|
73
73
|
| **appnest-backend/** | Express app that loads the user’s `app-backend/server.js` and exposes it under `/app-backend`. |
|
|
74
74
|
| **appnest-frontend/** | Vite dev server for the user’s `app-frontend`. |
|
|
75
|
-
| **appnest-
|
|
75
|
+
| **appnest-install-frontend/** | Vite dev server for the user’s `app-installation-frontend` (optional). |
|
|
76
76
|
|
|
77
77
|
The developer’s project (user directory) is expected to have:
|
|
78
78
|
|
|
@@ -90,7 +90,7 @@ cd appnest-engine
|
|
|
90
90
|
npm install
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
If this repo uses **npm workspaces**, a single `npm install` at the root also installs dependencies for `appnest-backend`, `appnest-frontend`, `appnest-
|
|
93
|
+
If this repo uses **npm workspaces**, a single `npm install` at the root also installs dependencies for `appnest-backend`, `appnest-frontend`, `appnest-install-frontend`, and `appnest-proxy`.
|
|
94
94
|
|
|
95
95
|
---
|
|
96
96
|
|
|
@@ -125,7 +125,7 @@ From the **appnest-engine** directory, or with the `appnest-engine` binary on `P
|
|
|
125
125
|
2. **Proxy** reads `.env` from `ORIGINAL_CWD`, allocates ports for backend and frontends, then:
|
|
126
126
|
- Starts **appnest-backend** (which loads the user’s `app-backend/server.js`).
|
|
127
127
|
- Starts **appnest-frontend** (Vite for `app-frontend`).
|
|
128
|
-
- If `app-installation-frontend` exists, starts **appnest-
|
|
128
|
+
- If `app-installation-frontend` exists, starts **appnest-install-frontend**.
|
|
129
129
|
3. Proxy mounts:
|
|
130
130
|
- `/app-backend` → app-backend
|
|
131
131
|
- `/app-frontend` → app-frontend
|
|
@@ -136,7 +136,7 @@ From the **appnest-engine** directory, or with the `appnest-engine` binary on `P
|
|
|
136
136
|
|
|
137
137
|
## Zip / bundle flow
|
|
138
138
|
|
|
139
|
-
- **`run zip-app`** runs **bundle-frontend** first (builds appnest-frontend and appnest-
|
|
139
|
+
- **`run zip-app`** runs **bundle-frontend** first (builds appnest-frontend and appnest-install-frontend), then zips the **user’s** `app-frontend`, `app-backend`, and `app-installation-frontend` into **appnest-app-pack** (and updates paths in `app-frontend/dist/index.html` as needed). Use this to produce a single pack for deployment or distribution.
|
|
140
140
|
|
|
141
141
|
---
|
|
142
142
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"express": "^5.1.0",
|
|
18
18
|
"uuid": "^13.0.0",
|
|
19
|
-
"@aravinthan_p/appnest-app-sdk-core": "^
|
|
20
|
-
"@aravinthan_p/appnest-app-sdk-utils": "^
|
|
19
|
+
"@aravinthan_p/appnest-app-sdk-core": "^1.0.0",
|
|
20
|
+
"@aravinthan_p/appnest-app-sdk-utils": "^1.0.0"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -13,7 +13,7 @@ const { validateApp, validateAppFix } = require('./validateUtils');
|
|
|
13
13
|
const projects = {
|
|
14
14
|
'appnest-backend': path.join(__dirname, '../appnest-backend'),
|
|
15
15
|
'appnest-frontend': path.join(__dirname, '../appnest-frontend'),
|
|
16
|
-
'appnest-
|
|
16
|
+
'appnest-install-frontend': path.join(__dirname, '../appnest-install-frontend'),
|
|
17
17
|
'appnest-proxy': path.join(__dirname, '../appnest-proxy'),
|
|
18
18
|
'app-frontend': path.join(userDir, './app-frontend'),
|
|
19
19
|
'app-installation-frontend': path.join(userDir, './app-installation-frontend'),
|
|
@@ -6,8 +6,8 @@ const bundleFrontend = ({ projects }) => {
|
|
|
6
6
|
console.log('📦 Bundling the frontend app project...');
|
|
7
7
|
const appFrontendProject = projects['appnest-frontend'];
|
|
8
8
|
bundleFrontendProject({ frontendProject: appFrontendProject, projectName: 'appnest-frontend' });
|
|
9
|
-
const
|
|
10
|
-
bundleFrontendProject({ frontendProject:
|
|
9
|
+
const appInstallFrontendProject = projects['appnest-install-frontend'];
|
|
10
|
+
bundleFrontendProject({ frontendProject: appInstallFrontendProject, projectName: 'appnest-install-frontend' });
|
|
11
11
|
console.log('✅ All frontend app projects bundled successfully.');
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -8,7 +8,7 @@ const installPackages = ({ projects }) => {
|
|
|
8
8
|
const projectsToInstallKeys = [
|
|
9
9
|
'appnest-backend',
|
|
10
10
|
'appnest-frontend',
|
|
11
|
-
'appnest-
|
|
11
|
+
'appnest-install-frontend',
|
|
12
12
|
'appnest-proxy'
|
|
13
13
|
];
|
|
14
14
|
const projectsToInstall = projectsToInstallKeys.reduce((acc, key) => {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// src/App.jsx
|
|
2
2
|
import React, { Suspense } from 'react';
|
|
3
3
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
4
|
-
import './CoreUI.css';
|
|
5
4
|
|
|
6
5
|
let App;
|
|
7
6
|
|
|
@@ -33,7 +32,41 @@ export default function CoreUI() {
|
|
|
33
32
|
return (
|
|
34
33
|
<>
|
|
35
34
|
<ErrorBoundary FallbackComponent={ErrorFallback}>
|
|
36
|
-
<Suspense fallback={<div>Loading developer UI...</div>}>
|
|
35
|
+
{/* <Suspense fallback={<div>Loading developer UI...</div>}>
|
|
36
|
+
<App />
|
|
37
|
+
</Suspense> */}
|
|
38
|
+
<Suspense
|
|
39
|
+
fallback={
|
|
40
|
+
<div
|
|
41
|
+
style={{
|
|
42
|
+
display: 'flex',
|
|
43
|
+
flexDirection: 'column',
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
justifyContent: 'center',
|
|
46
|
+
minHeight: '100vh',
|
|
47
|
+
gap: '1rem',
|
|
48
|
+
background: 'linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)',
|
|
49
|
+
fontFamily: 'system-ui, -apple-system, sans-serif',
|
|
50
|
+
color: '#475569',
|
|
51
|
+
}}
|
|
52
|
+
>
|
|
53
|
+
<div
|
|
54
|
+
style={{
|
|
55
|
+
width: 40,
|
|
56
|
+
height: 40,
|
|
57
|
+
border: '3px solid #e2e8f0',
|
|
58
|
+
borderTopColor: '#3b82f6',
|
|
59
|
+
borderRadius: '50%',
|
|
60
|
+
animation: 'spin 0.8s linear infinite',
|
|
61
|
+
}}
|
|
62
|
+
/>
|
|
63
|
+
<style>{`@keyframes spin { to { transform: rotate(360deg); } }`}</style>
|
|
64
|
+
<span style={{ fontSize: '0.9375rem', fontWeight: 500 }}>
|
|
65
|
+
Loading Appnest Engine...
|
|
66
|
+
</span>
|
|
67
|
+
</div>
|
|
68
|
+
}
|
|
69
|
+
>
|
|
37
70
|
<App />
|
|
38
71
|
</Suspense>
|
|
39
72
|
</ErrorBoundary>
|
|
@@ -55,6 +55,16 @@ export default defineConfig({
|
|
|
55
55
|
'node_modules/react/jsx-runtime'
|
|
56
56
|
),
|
|
57
57
|
},
|
|
58
|
+
modules: [
|
|
59
|
+
path.resolve(userProjectPath, 'app-frontend/node_modules'),
|
|
60
|
+
'node_modules'
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
optimizeDeps: {
|
|
64
|
+
entries: [
|
|
65
|
+
path.resolve(userProjectPath, 'app-frontend/src/**/*.jsx'),
|
|
66
|
+
path.resolve(userProjectPath, 'app-frontend/src/**/*.js')
|
|
67
|
+
]
|
|
58
68
|
},
|
|
59
69
|
build: {
|
|
60
70
|
// Output dist folder inside the developer’s project
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "appnest-
|
|
2
|
+
"name": "appnest-install-frontend",
|
|
3
3
|
"version": "0.0.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
|
-
"name": "appnest-
|
|
8
|
+
"name": "appnest-install-frontend",
|
|
9
9
|
"version": "0.0.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"react": "^19.1.1",
|
package/appnest-proxy/server.js
CHANGED
|
@@ -50,7 +50,7 @@ const getAppEnv = () => {
|
|
|
50
50
|
const appnestProjects = {
|
|
51
51
|
'appnest-backend': path.join(__dirname, '../appnest-backend'),
|
|
52
52
|
'appnest-frontend': path.join(__dirname, '../appnest-frontend'),
|
|
53
|
-
'appnest-
|
|
53
|
+
'appnest-install-frontend': path.join(__dirname, '../appnest-install-frontend'),
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
const appProjectOverview = {
|
|
@@ -123,7 +123,7 @@ const startAppInstallationFrontend = () => {
|
|
|
123
123
|
// Start app-installation-frontend (React)
|
|
124
124
|
appInstallationFrontendProcess = spawn(
|
|
125
125
|
'npm',
|
|
126
|
-
['run', 'dev', '--prefix', appnestProjects['appnest-
|
|
126
|
+
['run', 'dev', '--prefix', appnestProjects['appnest-install-frontend']],
|
|
127
127
|
{
|
|
128
128
|
stdio: 'inherit',
|
|
129
129
|
env: { ...process.env, PORT: appInstallationFrontendPort, CLIENT_SCRIPT_URL: appInjectedEnv.CLIENT_SCRIPT_URL },
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|