@seip/blue-bird 0.3.1 → 0.3.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 +23 -13
- package/LICENSE +21 -21
- package/README.md +79 -79
- package/backend/index.js +12 -12
- package/backend/routes/api.js +34 -34
- package/backend/routes/frontend.js +1 -8
- package/core/app.js +359 -359
- package/core/auth.js +69 -69
- package/core/cache.js +35 -35
- package/core/cli/component.js +42 -42
- package/core/cli/init.js +120 -118
- package/core/cli/react.js +383 -409
- package/core/cli/route.js +42 -42
- package/core/cli/scaffolding-auth.js +967 -0
- package/core/config.js +41 -41
- package/core/debug.js +248 -248
- package/core/logger.js +80 -80
- package/core/middleware.js +27 -27
- package/core/router.js +134 -134
- package/core/swagger.js +24 -24
- package/core/template.js +288 -288
- package/core/upload.js +76 -76
- package/core/validate.js +291 -290
- package/frontend/index.html +28 -22
- package/frontend/resources/js/App.jsx +28 -42
- package/frontend/resources/js/Main.jsx +17 -17
- package/frontend/resources/js/blue-bird/components/Button.jsx +67 -0
- package/frontend/resources/js/blue-bird/components/Card.jsx +17 -0
- package/frontend/resources/js/blue-bird/components/DataTable.jsx +126 -0
- package/frontend/resources/js/blue-bird/components/Input.jsx +21 -0
- package/frontend/resources/js/blue-bird/components/Label.jsx +12 -0
- package/frontend/resources/js/blue-bird/components/Modal.jsx +27 -0
- package/frontend/resources/js/blue-bird/components/Translate.jsx +12 -0
- package/frontend/resources/js/blue-bird/components/Typography.jsx +25 -0
- package/frontend/resources/js/blue-bird/contexts/LanguageContext.jsx +29 -0
- package/frontend/resources/js/blue-bird/contexts/SnackbarContext.jsx +38 -0
- package/frontend/resources/js/blue-bird/contexts/ThemeContext.jsx +49 -0
- package/frontend/resources/js/blue-bird/locales/en.json +30 -0
- package/frontend/resources/js/blue-bird/locales/es.json +30 -0
- package/frontend/resources/js/pages/About.jsx +33 -15
- package/frontend/resources/js/pages/Home.jsx +93 -68
- package/package.json +56 -55
- package/vite.config.js +21 -21
|
@@ -1,16 +1,34 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Link } from 'react-router-dom';
|
|
3
|
+
|
|
4
|
+
export default function About() {
|
|
5
|
+
return (
|
|
6
|
+
<div
|
|
7
|
+
className="bg-white dark:bg-slate-900 text-gray-900 dark:text-gray-100 min-h-screen"
|
|
8
|
+
>
|
|
9
|
+
<nav
|
|
10
|
+
className='bg-white dark:bg-slate-900 text-gray-900 dark:text-gray-100 border-b border-gray-200 dark:border-slate-800 px-4 py-4 flex justify-between items-center gap-4 sticky top-0 z-10'
|
|
11
|
+
>
|
|
12
|
+
<div className='font-bold text-xl text-blue-600 dark:text-blue-400'>
|
|
13
|
+
Blue Bird
|
|
14
|
+
</div>
|
|
15
|
+
<div className='flex justify-between items-center gap-4'>
|
|
16
|
+
<Link to="/" className='text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100'>Home</Link>
|
|
17
|
+
<Link to="/about" className='text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100'>About</Link>
|
|
18
|
+
</div>
|
|
19
|
+
</nav>
|
|
20
|
+
<main className='max-w-7xl mx-auto'>
|
|
21
|
+
<div className='p-4'>
|
|
22
|
+
<h1 className='text-xl font-bold text-gray-900 dark:text-gray-100 mb-4'>About Blue Bird</h1>
|
|
23
|
+
<p className='text-gray-500 dark:text-gray-400 leading-1.6'>
|
|
24
|
+
Blue Bird is a modern framework designed to bridge the gap between backend routing and frontend interactivity.
|
|
25
|
+
It provides a seamless developer experience for building fast, reactive web applications.
|
|
26
|
+
</p>
|
|
27
|
+
<p className='text-red-500 text-xl mt-8 '>
|
|
28
|
+
Check your console JS
|
|
29
|
+
</p>
|
|
30
|
+
</div>
|
|
31
|
+
</main>
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
16
34
|
}
|
|
@@ -1,68 +1,93 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { Link } from 'react-router-dom';
|
|
3
|
+
import Card from '../blue-bird/components/Card';
|
|
4
|
+
|
|
5
|
+
export default function Home() {
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
// Example API call to the backend
|
|
8
|
+
fetch("http://localhost:3000/login", {
|
|
9
|
+
method: "POST",
|
|
10
|
+
headers: {
|
|
11
|
+
"Content-Type": "application/json",
|
|
12
|
+
},
|
|
13
|
+
body: JSON.stringify({
|
|
14
|
+
email: "example@example.com",
|
|
15
|
+
password: "myPassword123"
|
|
16
|
+
}),
|
|
17
|
+
})
|
|
18
|
+
.then((response) => response.json())
|
|
19
|
+
.then((data) => console.log('Backend response:', data))
|
|
20
|
+
.catch((error) => console.error('Error fetching from backend:', error));
|
|
21
|
+
}, []);
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<div
|
|
25
|
+
className="bg-white dark:bg-slate-900 text-gray-900 dark:text-gray-100 min-h-screen"
|
|
26
|
+
>
|
|
27
|
+
<nav
|
|
28
|
+
className='bg-white dark:bg-slate-900 text-gray-900 dark:text-gray-100 border-b border-gray-200 dark:border-slate-800 px-4 py-4 flex justify-between items-center gap-4 sticky top-0 z-10'
|
|
29
|
+
>
|
|
30
|
+
<div className='font-bold text-xl text-blue-600 dark:text-blue-400'>
|
|
31
|
+
Blue Bird
|
|
32
|
+
</div>
|
|
33
|
+
<div className='flex justify-between items-center gap-4'>
|
|
34
|
+
<Link to="/" className='text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100'>Home</Link>
|
|
35
|
+
<Link to="/about" className='text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100'>About</Link>
|
|
36
|
+
</div>
|
|
37
|
+
</nav>
|
|
38
|
+
<main className='max-w-7xl mx-auto'>
|
|
39
|
+
<div className='text-center p-4'>
|
|
40
|
+
<header className='mb-4'>
|
|
41
|
+
<h1 className='text-3xl font-bold bg-gradient-to-r from-blue-500 to-blue-600 dark:from-blue-400 dark:to-blue-500 bg-clip-text text-transparent mb-4'>
|
|
42
|
+
Welcome to Blue Bird
|
|
43
|
+
</h1>
|
|
44
|
+
<p className='text-gray-500 dark:text-gray-400 max-w-600px mx-auto'>
|
|
45
|
+
The elegant, fast, and weightless framework for modern web development.
|
|
46
|
+
</p>
|
|
47
|
+
</header>
|
|
48
|
+
|
|
49
|
+
<Card title={" Documentation (Eng)"} className='mt-8 border-none shadow-none'>
|
|
50
|
+
<div className='flex gap-4 justify-center mb-8'>
|
|
51
|
+
<a
|
|
52
|
+
href="https://seip25.github.io/Blue-bird/en.html"
|
|
53
|
+
target="_blank"
|
|
54
|
+
rel="noopener noreferrer"
|
|
55
|
+
className='bg-blue-600 text-white px-4 py-2 rounded-lg font-semibold transition-colors hover:bg-blue-500 dark:hover:bg-blue-700'
|
|
56
|
+
>
|
|
57
|
+
Documentation(Eng)
|
|
58
|
+
|
|
59
|
+
</a>
|
|
60
|
+
<a
|
|
61
|
+
href="https://seip25.github.io/Blue-bird/"
|
|
62
|
+
target="_blank"
|
|
63
|
+
rel="noopener noreferrer"
|
|
64
|
+
className='bg-blue-50 dark:bg-slate-800 text-blue-500 dark:text-blue-400 px-4 py-2 rounded-lg font-semibold transition-colors hover:bg-blue-100 dark:hover:bg-slate-700'
|
|
65
|
+
>
|
|
66
|
+
Documentación (Esp)
|
|
67
|
+
|
|
68
|
+
</a>
|
|
69
|
+
</div>
|
|
70
|
+
</Card>
|
|
71
|
+
|
|
72
|
+
<Card className='mt-4 border-none shadow-none'>
|
|
73
|
+
<div className='mt-8 grid grid-cols-1 md:grid-cols-3 gap-4 max-w-1000px mx-auto'>
|
|
74
|
+
<div className='p-4 rounded-lg bg-gray-50 dark:bg-slate-800 shadow-sm'>
|
|
75
|
+
<h3 className='text-blue-500 dark:text-blue-400 font-semibold text-xl mb-4'>Lightweight</h3>
|
|
76
|
+
<p className="dark:text-slate-300">Built with performance and simplicity in mind.</p>
|
|
77
|
+
</div>
|
|
78
|
+
<div className='p-4 rounded-lg bg-gray-50 dark:bg-slate-800 shadow-sm'>
|
|
79
|
+
<h3 className='text-blue-500 dark:text-blue-400 font-semibold text-xl mb-4'>React Powered</h3>
|
|
80
|
+
<p className="dark:text-slate-300">Full React + Vite integration .</p>
|
|
81
|
+
</div>
|
|
82
|
+
<div className='p-4 rounded-lg bg-gray-50 dark:bg-slate-800 shadow-sm'>
|
|
83
|
+
<h3 className='text-blue-500 dark:text-blue-400 font-semibold text-xl mb-4'>Express Backend</h3>
|
|
84
|
+
<p className="dark:text-slate-300">Robust and scalable backend architecture.</p>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</Card>
|
|
88
|
+
|
|
89
|
+
</div>
|
|
90
|
+
</main>
|
|
91
|
+
</div>
|
|
92
|
+
);
|
|
93
|
+
}
|
package/package.json
CHANGED
|
@@ -1,55 +1,56 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@seip/blue-bird",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "Express + React opinionated framework with SPA or API architecture and built-in JWT auth",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"blue-bird": "core/cli/init.js"
|
|
8
|
-
},
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/seip25/Blue-bird.git"
|
|
12
|
-
},
|
|
13
|
-
"keywords": [
|
|
14
|
-
"express",
|
|
15
|
-
"react",
|
|
16
|
-
"framework",
|
|
17
|
-
"vite"
|
|
18
|
-
],
|
|
19
|
-
"author": "Seip25",
|
|
20
|
-
"license": "MIT",
|
|
21
|
-
"bugs": {
|
|
22
|
-
"url": "https://github.com/seip25/Blue-bird/issues"
|
|
23
|
-
},
|
|
24
|
-
"homepage": "https://seip25.github.io/Blue-bird/",
|
|
25
|
-
"scripts": {
|
|
26
|
-
"dev": "node --watch --env-file=.env backend/index.js",
|
|
27
|
-
"start": "node --env-file=.env backend/index.js",
|
|
28
|
-
"create-react-app": "node core/cli/react.js",
|
|
29
|
-
"react": "node core/cli/react.js",
|
|
30
|
-
"init": "node core/cli/init.js",
|
|
31
|
-
"route": "node core/cli/route.js",
|
|
32
|
-
"component": "node core/cli/component.js",
|
|
33
|
-
"swagger-install": "node core/cli/swagger.js",
|
|
34
|
-
"
|
|
35
|
-
"vite:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"express
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"react
|
|
48
|
-
"react-
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@seip/blue-bird",
|
|
3
|
+
"version": "0.3.4",
|
|
4
|
+
"description": "Express + React opinionated framework with SPA or API architecture and built-in JWT auth",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"blue-bird": "core/cli/init.js"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/seip25/Blue-bird.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"express",
|
|
15
|
+
"react",
|
|
16
|
+
"framework",
|
|
17
|
+
"vite"
|
|
18
|
+
],
|
|
19
|
+
"author": "Seip25",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/seip25/Blue-bird/issues"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://seip25.github.io/Blue-bird/",
|
|
25
|
+
"scripts": {
|
|
26
|
+
"dev": "node --watch --env-file=.env backend/index.js",
|
|
27
|
+
"start": "node --env-file=.env backend/index.js",
|
|
28
|
+
"create-react-app": "node core/cli/react.js",
|
|
29
|
+
"react": "node core/cli/react.js",
|
|
30
|
+
"init": "node core/cli/init.js",
|
|
31
|
+
"route": "node core/cli/route.js",
|
|
32
|
+
"component": "node core/cli/component.js",
|
|
33
|
+
"swagger-install": "node core/cli/swagger.js",
|
|
34
|
+
"scaffolding-auth": "node core/cli/scaffolding-auth.js",
|
|
35
|
+
"vite:dev": "vite",
|
|
36
|
+
"vite:build": "vite build"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"chalk": "^5.6.2",
|
|
40
|
+
"cookie-parser": "^1.4.7",
|
|
41
|
+
"cors": "^2.8.6",
|
|
42
|
+
"express": "^5.2.1",
|
|
43
|
+
"express-rate-limit": "^8.2.1",
|
|
44
|
+
"helmet": "^8.1.0",
|
|
45
|
+
"jsonwebtoken": "^9.0.2",
|
|
46
|
+
"multer": "^2.0.2",
|
|
47
|
+
"react": "^19.2.4",
|
|
48
|
+
"react-dom": "^19.2.4",
|
|
49
|
+
"react-router-dom": "7.13.1",
|
|
50
|
+
"xss": "^1.0.15"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@vitejs/plugin-react": "^4.2.0",
|
|
54
|
+
"vite": "7.3.1"
|
|
55
|
+
}
|
|
56
|
+
}
|
package/vite.config.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineConfig } from 'vite';
|
|
2
|
-
import react from '@vitejs/plugin-react';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [react()],
|
|
7
|
-
root: path.resolve(__dirname, 'frontend/resources/js'),
|
|
8
|
-
base: '/build/',
|
|
9
|
-
build: {
|
|
10
|
-
outDir: path.resolve(__dirname, 'frontend/public/build'),
|
|
11
|
-
emptyOutDir: true,
|
|
12
|
-
manifest: true,
|
|
13
|
-
rollupOptions: {
|
|
14
|
-
input: path.resolve(__dirname, 'frontend/resources/js/Main.jsx'),
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
server: {
|
|
18
|
-
origin: 'http://localhost:5173',
|
|
19
|
-
strictPort: true,
|
|
20
|
-
cors: true,
|
|
21
|
-
},
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
plugins: [react()],
|
|
7
|
+
root: path.resolve(__dirname, 'frontend/resources/js'),
|
|
8
|
+
base: '/build/',
|
|
9
|
+
build: {
|
|
10
|
+
outDir: path.resolve(__dirname, 'frontend/public/build'),
|
|
11
|
+
emptyOutDir: true,
|
|
12
|
+
manifest: true,
|
|
13
|
+
rollupOptions: {
|
|
14
|
+
input: path.resolve(__dirname, 'frontend/resources/js/Main.jsx'),
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
server: {
|
|
18
|
+
origin: 'http://localhost:5173',
|
|
19
|
+
strictPort: true,
|
|
20
|
+
cors: true,
|
|
21
|
+
},
|
|
22
22
|
});
|