@seip/bluebird-js 0.1.7 → 0.2.1
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/AGENTS.md +727 -620
- package/README.md +670 -607
- package/app/models/user.js +19 -0
- package/app/resources/html/home.html +137 -0
- package/app/resources/html/layouts/main.html +55 -0
- package/app/resources/html/notFound.html +14 -0
- package/app/resources/html/table.html +15 -0
- package/app/resources/html/terms.html +46 -0
- package/app/resources/index.html +27 -0
- package/app/resources/layouts/AppLayout.jsx +92 -0
- package/app/resources/main.jsx +18 -0
- package/app/resources/pages/Dashboard.jsx +93 -0
- package/app/resources/pages/Home.jsx +140 -0
- package/app/resources/pages/Login.jsx +35 -0
- package/app/resources/pages/NotFound.jsx +16 -0
- package/app/resources/pages/Register.jsx +55 -0
- package/app/resources/pages/TableDemo.jsx +85 -0
- package/app/resources/routes.jsx +59 -0
- package/app/resources/spa.js +73 -0
- package/app/resources/styles.css +9 -0
- package/app/routes/api.js +129 -50
- package/app/routes/auth.js +209 -0
- package/app/routes/web.js +89 -47
- package/core/ai.js +30 -10
- package/core/app.d.ts +2 -18
- package/core/app.js +987 -801
- package/core/auth.d.ts +2 -13
- package/core/auth.js +444 -326
- package/core/cli/build.js +37 -0
- package/core/cli/dev.js +155 -0
- package/core/cli/doctor.js +37 -2
- package/core/cli/export.js +191 -0
- package/core/cli/init.js +91 -322
- package/core/cli/nginx.js +1 -1
- package/core/cli/templates.js +139 -0
- package/core/cli/view.js +98 -161
- package/core/config.js +44 -2
- package/core/csrf.js +156 -24
- package/core/database.js +1184 -1131
- package/core/debug.js +1 -1
- package/core/html.js +8 -1
- package/core/index.d.ts +126 -310
- package/core/paths.js +55 -0
- package/core/ratelimit.js +10 -1
- package/core/react/client/api.js +239 -0
- package/core/react/client/auth.js +236 -0
- package/core/react/client/components.js +1321 -0
- package/core/react/client/datatable.js +595 -0
- package/core/react/client/i18n.js +440 -0
- package/core/react/client/index.d.ts +314 -0
- package/core/react/client/index.js +50 -0
- package/core/react/client/router.js +26 -0
- package/core/react/client/theme.css +512 -0
- package/core/render-cache.js +250 -212
- package/core/render.d.ts +25 -21
- package/core/render.js +738 -736
- package/core/router.d.ts +2 -3
- package/core/router.js +171 -171
- package/core/seo.js +10 -0
- package/core/spa.js +599 -0
- package/core/view-loader.js +155 -613
- package/core/vite-plugin.d.ts +18 -0
- package/core/vite-plugin.js +162 -0
- package/core/vite.js +250 -145
- package/index.js +22 -18
- package/jsconfig.json +5 -3
- package/package.json +114 -92
- package/production.md +8 -3
- package/public/js/bluebird.js +1886 -0
- package/templates/_auth/app/database.js +19 -0
- package/templates/_auth/app/models/user.js +22 -0
- package/templates/_auth/app/routes/auth-router.js +304 -0
- package/templates/_base/app/resources/html/layouts/main.html +55 -0
- package/templates/_base/app/resources/html/notFound.html +14 -0
- package/templates/_base/app/resources/index.html +27 -0
- package/templates/_base/app/resources/styles.css +9 -0
- package/templates/api/app/models/note.js +18 -0
- package/templates/api/app/routes/api.js +82 -0
- package/templates/api/app/routes/auth.js +11 -0
- package/templates/api/index.js +19 -0
- package/templates/api/template.json +13 -0
- package/templates/auth/app/mail.js +11 -0
- package/templates/auth/app/models/password_reset.js +18 -0
- package/templates/auth/app/resources/html/home.html +21 -0
- package/templates/auth/app/resources/html/partials/nav.html +2 -0
- package/templates/auth/app/resources/layouts/AppLayout.jsx +60 -0
- package/templates/auth/app/resources/main.jsx +18 -0
- package/templates/auth/app/resources/pages/Dashboard.jsx +51 -0
- package/templates/auth/app/resources/pages/ForgotPassword.jsx +34 -0
- package/templates/auth/app/resources/pages/Login.jsx +36 -0
- package/templates/auth/app/resources/pages/NotFound.jsx +16 -0
- package/templates/auth/app/resources/pages/Profile.jsx +99 -0
- package/templates/auth/app/resources/pages/Register.jsx +50 -0
- package/templates/auth/app/resources/pages/ResetPassword.jsx +50 -0
- package/templates/auth/app/resources/routes.jsx +54 -0
- package/templates/auth/app/resources/spa.js +29 -0
- package/templates/auth/app/routes/api.js +17 -0
- package/templates/auth/app/routes/auth.js +13 -0
- package/templates/auth/app/routes/web.js +21 -0
- package/templates/auth/index.js +19 -0
- package/templates/auth/template.json +15 -0
- package/templates/blank/app/models/.gitkeep +0 -0
- package/templates/blank/app/resources/html/home.html +27 -0
- package/templates/blank/app/resources/html/partials/nav.html +1 -0
- package/templates/blank/app/resources/main.jsx +16 -0
- package/templates/blank/app/resources/pages/Home.jsx +42 -0
- package/templates/blank/app/resources/pages/NotFound.jsx +27 -0
- package/templates/blank/app/resources/routes.jsx +15 -0
- package/templates/blank/app/resources/spa.js +24 -0
- package/templates/blank/app/routes/api.js +11 -0
- package/templates/blank/app/routes/web.js +21 -0
- package/templates/blank/index.js +13 -0
- package/templates/blank/template.json +12 -0
- package/templates/blog/app/lib/blog.js +149 -0
- package/templates/blog/app/models/post.js +22 -0
- package/templates/blog/app/resources/html/home.html +28 -0
- package/templates/blog/app/resources/html/not-found.html +5 -0
- package/templates/blog/app/resources/html/partials/nav.html +2 -0
- package/templates/blog/app/resources/html/partials/post-card.html +9 -0
- package/templates/blog/app/resources/html/post.html +8 -0
- package/templates/blog/app/resources/layouts/AdminLayout.jsx +54 -0
- package/templates/blog/app/resources/main.jsx +18 -0
- package/templates/blog/app/resources/pages/Login.jsx +31 -0
- package/templates/blog/app/resources/pages/NotFound.jsx +16 -0
- package/templates/blog/app/resources/pages/PostEditor.jsx +51 -0
- package/templates/blog/app/resources/pages/Posts.jsx +83 -0
- package/templates/blog/app/resources/pages/Register.jsx +43 -0
- package/templates/blog/app/resources/routes.jsx +51 -0
- package/templates/blog/app/resources/spa.js +25 -0
- package/templates/blog/app/resources/styles.css +40 -0
- package/templates/blog/app/routes/api.js +77 -0
- package/templates/blog/app/routes/auth.js +10 -0
- package/templates/blog/app/routes/web.js +114 -0
- package/templates/blog/index.js +21 -0
- package/templates/blog/template.json +14 -0
- package/vite.config.js +11 -0
- package/app/views/components/Header.jsx +0 -42
- package/app/views/components/LiveCounter.jsx +0 -67
- package/app/views/layouts/main/view.jsx +0 -201
- package/app/views/legal/terms.html +0 -29
- package/app/views/pages/about.jsx +0 -98
- package/app/views/pages/dashboard.jsx +0 -278
- package/app/views/pages/index.jsx +0 -123
- package/app/views/pages/login.jsx +0 -141
- package/core/actions.d.ts +0 -4
- package/core/actions.js +0 -355
- package/core/jsx.d.ts +0 -38
- package/core/jsx.js +0 -1597
- package/core/vite.d.ts +0 -3
- package/public/js/bluebird-client.js +0 -3265
- package/public/js/tailwind.js +0 -8
package/package.json
CHANGED
|
@@ -1,92 +1,114 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@seip/bluebird-js",
|
|
3
|
-
"version": "0.1
|
|
4
|
-
"description": "Performance-first Node.js
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "core/app.js",
|
|
7
|
-
"types": "core/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./core/index.d.ts",
|
|
11
|
-
"default": "./core/app.js"
|
|
12
|
-
},
|
|
13
|
-
"./
|
|
14
|
-
"types": "./core
|
|
15
|
-
"default": "./core
|
|
16
|
-
},
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
},
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"core",
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
".
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@seip/bluebird-js",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Performance-first Node.js framework: Express + HTML {{ }} SSR templates + React Router SPA with Vite, Tailwind CSS, JWT auth, BaseModel, smart migrations, and multi-level caching",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "core/app.js",
|
|
7
|
+
"types": "core/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./core/index.d.ts",
|
|
11
|
+
"default": "./core/app.js"
|
|
12
|
+
},
|
|
13
|
+
"./react": {
|
|
14
|
+
"types": "./core/react/client/index.d.ts",
|
|
15
|
+
"default": "./core/react/client/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./vite": {
|
|
18
|
+
"types": "./core/vite-plugin.d.ts",
|
|
19
|
+
"default": "./core/vite-plugin.js"
|
|
20
|
+
},
|
|
21
|
+
"./core/*.js": {
|
|
22
|
+
"types": "./core/*.d.ts",
|
|
23
|
+
"default": "./core/*.js"
|
|
24
|
+
},
|
|
25
|
+
"./*": "./*"
|
|
26
|
+
},
|
|
27
|
+
"bin": {
|
|
28
|
+
"bluebird-js": "core/cli/init.js",
|
|
29
|
+
"blue-bird": "core/cli/init.js"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/seip25/bluebird-js.git"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"api",
|
|
37
|
+
"express",
|
|
38
|
+
"framework",
|
|
39
|
+
"html",
|
|
40
|
+
"jwt",
|
|
41
|
+
"model",
|
|
42
|
+
"react",
|
|
43
|
+
"react-router",
|
|
44
|
+
"render",
|
|
45
|
+
"seo",
|
|
46
|
+
"spa",
|
|
47
|
+
"sqlite",
|
|
48
|
+
"ssr",
|
|
49
|
+
"tailwind",
|
|
50
|
+
"vite"
|
|
51
|
+
],
|
|
52
|
+
"author": "Seip25",
|
|
53
|
+
"license": "MIT",
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/seip25/bluebird-js/issues"
|
|
56
|
+
},
|
|
57
|
+
"homepage": "https://seip25.github.io/bluebird-js/",
|
|
58
|
+
"engines": {
|
|
59
|
+
"node": ">=22.18.0"
|
|
60
|
+
},
|
|
61
|
+
"scripts": {
|
|
62
|
+
"dev": "node core/cli/init.js dev",
|
|
63
|
+
"start": "node --env-file-if-exists=.env index.js",
|
|
64
|
+
"build": "node core/cli/init.js build",
|
|
65
|
+
"export": "node core/cli/init.js export",
|
|
66
|
+
"lint": "node --check index.js",
|
|
67
|
+
"init": "node core/cli/init.js",
|
|
68
|
+
"doctor": "node core/cli/init.js doctor",
|
|
69
|
+
"route": "node core/cli/init.js make:route",
|
|
70
|
+
"view": "node core/cli/init.js make:view",
|
|
71
|
+
"model": "node core/cli/init.js make:model",
|
|
72
|
+
"migrate": "node core/cli/init.js migrate",
|
|
73
|
+
"seed": "node core/cli/init.js seed",
|
|
74
|
+
"ecosystem": "node core/cli/init.js make:ecosystem",
|
|
75
|
+
"swagger-install": "node core/cli/init.js swagger-install",
|
|
76
|
+
"test": "node test/test_suite.js && node test/regression_suite.js"
|
|
77
|
+
},
|
|
78
|
+
"publishConfig": {
|
|
79
|
+
"access": "public"
|
|
80
|
+
},
|
|
81
|
+
"files": [
|
|
82
|
+
"core",
|
|
83
|
+
"app",
|
|
84
|
+
"templates",
|
|
85
|
+
"public",
|
|
86
|
+
"!public/build",
|
|
87
|
+
"index.js",
|
|
88
|
+
"vite.config.js",
|
|
89
|
+
"AGENTS.md",
|
|
90
|
+
"production.md",
|
|
91
|
+
".env_example",
|
|
92
|
+
"jsconfig.json",
|
|
93
|
+
".vscode"
|
|
94
|
+
],
|
|
95
|
+
"dependencies": {
|
|
96
|
+
"@tailwindcss/vite": "^4.3.5",
|
|
97
|
+
"@vitejs/plugin-react": "^5.2.0",
|
|
98
|
+
"express": "^5.2.1",
|
|
99
|
+
"react": "^19.3.1",
|
|
100
|
+
"react-dom": "^19.3.1",
|
|
101
|
+
"react-router": "^8.5.1",
|
|
102
|
+
"tailwindcss": "^4.3.5",
|
|
103
|
+
"vite": "^7.3.8"
|
|
104
|
+
},
|
|
105
|
+
"optionalDependencies": {
|
|
106
|
+
"ejs": "^3.1.10",
|
|
107
|
+
"helmet": "^8.1.0",
|
|
108
|
+
"multer": "^2.0.2",
|
|
109
|
+
"redis": "^6.1.0",
|
|
110
|
+
"swagger-jsdoc": "^6.2.8",
|
|
111
|
+
"swagger-ui-express": "^5.0.1",
|
|
112
|
+
"ws": "^8.18.0"
|
|
113
|
+
}
|
|
114
|
+
}
|
package/production.md
CHANGED
|
@@ -6,9 +6,10 @@ This guide covers recommended strategies for deploying a `@seip/bluebird-js` app
|
|
|
6
6
|
|
|
7
7
|
## 1. Quick Start: Standard Node.js (`npm start`)
|
|
8
8
|
|
|
9
|
-
For single-instance VPS hosts, developer previews, or container runtimes,
|
|
9
|
+
For single-instance VPS hosts, developer previews, or container runtimes, build the Vite client bundle once and start the application directly using Node.js:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
+
npx bluebird-js build # public/build/ (hashed client SPA & Tailwind CSS bundle + manifest)
|
|
12
13
|
npm run start
|
|
13
14
|
```
|
|
14
15
|
|
|
@@ -18,6 +19,8 @@ node --env-file=.env index.js
|
|
|
18
19
|
```
|
|
19
20
|
|
|
20
21
|
### Production Checklist Before Starting
|
|
22
|
+
- Run `npx bluebird-js build` on every deployment (without a build, Vite compiles client assets on the fly in middleware mode and a warning is printed).
|
|
23
|
+
- Set `ASSET_VERSION` if you want to control when open browser tabs see updated build identifiers (defaults to the build manifest hash).
|
|
21
24
|
- Set `DEBUG=false` in `.env`.
|
|
22
25
|
- Ensure `JWT_SECRET` is set to a secure, random string (minimum 32 characters).
|
|
23
26
|
- Ensure your database path or connection credentials in `.env` are secure and isolated.
|
|
@@ -159,7 +162,7 @@ server {
|
|
|
159
162
|
return 404;
|
|
160
163
|
}
|
|
161
164
|
|
|
162
|
-
location /
|
|
165
|
+
location /build/ {
|
|
163
166
|
try_files $uri =404;
|
|
164
167
|
expires 1y;
|
|
165
168
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
|
@@ -229,10 +232,12 @@ ENV NODE_ENV=production
|
|
|
229
232
|
|
|
230
233
|
COPY package*.json ./
|
|
231
234
|
|
|
232
|
-
RUN npm ci --
|
|
235
|
+
RUN npm ci --omit=dev
|
|
233
236
|
|
|
234
237
|
COPY . .
|
|
235
238
|
|
|
239
|
+
RUN npx bluebird-js build
|
|
240
|
+
|
|
236
241
|
EXPOSE 3000
|
|
237
242
|
|
|
238
243
|
CMD ["node", "--env-file=.env", "index.js"]
|