@seip/blue-bird 0.3.8 → 0.4.0
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/backend/routes/frontend.js +3 -20
- package/core/cli/react.js +187 -135
- package/core/cli/scaffolding-auth.js +27 -11
- package/core/template.js +195 -4
- package/frontend/index.html +4 -7
- package/frontend/resources/css/tailwind.css +2 -0
- package/frontend/resources/js/App.jsx +16 -9
- package/frontend/resources/js/Main.jsx +12 -11
- package/frontend/resources/js/blue-bird/components/Card.jsx +3 -2
- package/frontend/resources/js/blue-bird/components/Skeleton.jsx +45 -0
- package/frontend/resources/js/blue-bird/contexts/LanguageContext.jsx +12 -1
- package/frontend/resources/js/blue-bird/locales/en.json +18 -0
- package/frontend/resources/js/blue-bird/locales/es.json +18 -0
- package/frontend/resources/js/components/Header.jsx +53 -0
- package/frontend/resources/js/pages/About.jsx +21 -23
- package/frontend/resources/js/pages/Home.jsx +47 -58
- package/package.json +3 -1
- package/vite.config.js +3 -2
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
|
-
import { Link } from 'react-router-dom';
|
|
3
2
|
import Card from '../blue-bird/components/Card';
|
|
3
|
+
import Header from '../components/Header';
|
|
4
|
+
import { useLanguage } from '../blue-bird/contexts/LanguageContext';
|
|
5
|
+
import Typography from '../blue-bird/components/Typography';
|
|
4
6
|
|
|
5
7
|
export default function Home() {
|
|
8
|
+
const { t } = useLanguage();
|
|
6
9
|
useEffect(() => {
|
|
7
10
|
// Example API call to the backend
|
|
8
11
|
fetch("http://localhost:3000/login", {
|
|
@@ -24,68 +27,54 @@ export default function Home() {
|
|
|
24
27
|
<div
|
|
25
28
|
className="bg-white dark:bg-slate-900 text-gray-900 dark:text-gray-100 min-h-screen"
|
|
26
29
|
>
|
|
27
|
-
<
|
|
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>
|
|
30
|
+
<Header />
|
|
38
31
|
<main className='max-w-7xl mx-auto'>
|
|
39
32
|
<div className='text-center p-4'>
|
|
40
|
-
<header className='mb-
|
|
41
|
-
<h1 className='text-
|
|
42
|
-
|
|
43
|
-
</
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
</
|
|
33
|
+
<header className='mb-8 mt-8'>
|
|
34
|
+
<Typography variant='h1' className='text-4xl font-extrabold tracking-tight lg:text-5xl text-slate-900 dark:text-slate-100 mb-4'>
|
|
35
|
+
{t("home_page.title")}
|
|
36
|
+
</Typography>
|
|
37
|
+
<Typography className='text-xl text-slate-500 dark:text-slate-400 max-w-[600px] mx-auto'>
|
|
38
|
+
{t("home_page.description")}
|
|
39
|
+
</Typography>
|
|
47
40
|
</header>
|
|
48
41
|
|
|
49
|
-
<
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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>
|
|
42
|
+
<div className='flex gap-4 justify-center mb-12'>
|
|
43
|
+
<a
|
|
44
|
+
href="https://seip25.github.io/Blue-bird/en.html"
|
|
45
|
+
target="_blank"
|
|
46
|
+
rel="noopener noreferrer"
|
|
47
|
+
className='inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-slate-900 dark:bg-slate-100 text-slate-50 dark:text-slate-900 hover:bg-slate-900/90 dark:hover:bg-slate-100/90 h-10 px-4 py-2'
|
|
48
|
+
>
|
|
49
|
+
Documentation (Eng)
|
|
50
|
+
</a>
|
|
51
|
+
<a
|
|
52
|
+
href="https://seip25.github.io/Blue-bird/"
|
|
53
|
+
target="_blank"
|
|
54
|
+
rel="noopener noreferrer"
|
|
55
|
+
className='inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-100 hover:bg-slate-100 dark:hover:bg-slate-800 h-10 px-4 py-2'
|
|
56
|
+
>
|
|
57
|
+
Documentación (Esp)
|
|
58
|
+
</a>
|
|
59
|
+
</div>
|
|
88
60
|
|
|
61
|
+
<div className='mt-8 grid grid-cols-1 md:grid-cols-3 gap-6 max-w-[1000px] mx-auto text-left'>
|
|
62
|
+
<Card title={t("home_page.lightweight")}>
|
|
63
|
+
<Typography className="text-sm text-slate-500 dark:text-slate-400">
|
|
64
|
+
{t("home_page.lightweightDescription")}
|
|
65
|
+
</Typography>
|
|
66
|
+
</Card>
|
|
67
|
+
<Card title={t("home_page.reactPowered")}>
|
|
68
|
+
<Typography className="text-sm text-slate-500 dark:text-slate-400">
|
|
69
|
+
{t("home_page.reactPoweredDescription")}
|
|
70
|
+
</Typography>
|
|
71
|
+
</Card>
|
|
72
|
+
<Card title={t("home_page.expressBackend")}>
|
|
73
|
+
<Typography className="text-sm text-slate-500 dark:text-slate-400">
|
|
74
|
+
{t("home_page.expressBackendDescription")}
|
|
75
|
+
</Typography>
|
|
76
|
+
</Card>
|
|
77
|
+
</div>
|
|
89
78
|
</div>
|
|
90
79
|
</main>
|
|
91
80
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seip/blue-bird",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Express + React opinionated framework with SPA or API architecture and built-in JWT auth",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"vite:build": "vite build"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
+
"@tailwindcss/vite": "^4.2.2",
|
|
39
40
|
"chalk": "^5.6.2",
|
|
40
41
|
"cookie-parser": "^1.4.7",
|
|
41
42
|
"cors": "^2.8.6",
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
"react": "^19.2.4",
|
|
48
49
|
"react-dom": "^19.2.4",
|
|
49
50
|
"react-router-dom": "7.13.1",
|
|
51
|
+
"tailwindcss": "^4.2.2",
|
|
50
52
|
"xss": "^1.0.15"
|
|
51
53
|
},
|
|
52
54
|
"devDependencies": {
|
package/vite.config.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { defineConfig } from 'vite';
|
|
2
2
|
import react from '@vitejs/plugin-react';
|
|
3
3
|
import path from 'path';
|
|
4
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
4
5
|
|
|
5
6
|
export default defineConfig({
|
|
6
|
-
plugins: [react()],
|
|
7
|
-
root: path.resolve(__dirname, 'frontend/resources/js'),
|
|
7
|
+
plugins: [react(), tailwindcss()],
|
|
8
|
+
root: path.resolve(__dirname, 'frontend/resources/js'),
|
|
8
9
|
base: '/build/',
|
|
9
10
|
build: {
|
|
10
11
|
outDir: path.resolve(__dirname, 'frontend/public/build'),
|