@seip/blue-bird 0.2.1 → 0.2.2

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 CHANGED
@@ -1,12 +1,12 @@
1
- DEBUG=true
2
- DESCRIPTION_META="Example description meta"
3
- KEYWORDS_META="Example keywords meta"
4
- TITLE_META="Blue Bird"
5
- AUTHOR_META="Blue Bird"
6
- DESCRIPTION="Description project"
7
- TITLE="Blue Bird"
8
- VERSION="1.0.0"
9
- LANGMETA="en"
10
- HOST="http://localhost"
11
- PORT=3001
1
+ DEBUG=true
2
+ DESCRIPTION_META="Example description meta"
3
+ KEYWORDS_META="Example keywords meta"
4
+ TITLE_META="Blue Bird"
5
+ AUTHOR_META="Blue Bird"
6
+ DESCRIPTION="Description project"
7
+ TITLE="Blue Bird"
8
+ VERSION="1.0.0"
9
+ LANGMETA="en"
10
+ HOST="http://localhost"
11
+ PORT=3001
12
12
  STATIC_PATH="frontend/public"
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Andres Paiva
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Andres Paiva
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,80 +1,80 @@
1
- # Blue Bird Framework
2
-
3
- **The Future of Express & React Development**
4
-
5
- ![Blue Bird Logo](https://seip25.github.io/Blue-bird/blue-bird.png)
6
-
7
- [![npm version](https://img.shields.io/npm/v/@seip/blue-bird.svg)](https://www.npmjs.com/package/@seip/blue-bird)
8
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
-
10
-
11
- ## 🌟 Introduction / Introducción
12
-
13
- **Blue Bird** is a powerful, opinionated structure based on **Express** and **React**. It's designed to help developers build fast, scalable applications with hydrated components (Islands or Full views) and everything pre-configured.
14
-
15
- **Blue Bird** es una estructura potente basada en **Express** y **React**. Está diseñada para ayudar a los desarrolladores a construir aplicaciones rápidas y escalables con componentes hidratados (Islas o vistas completas) y todo pre-configurado.
16
-
17
-
18
-
19
- ## 🚀 Key Features / Características Clave
20
-
21
- - ⚡ **All-In-One**: Express, React, Vite, JWT Auth, and Validations ready to go.
22
- - 💎 **Flexible**: Extensible via standard Express `.use()` middleware.
23
- - 🏝️ **Island Architecture**: Hydrate only what you need with React.
24
- - 🔐 **Secure**: Integrated JWT authentication and multi-language validation.
25
- - 📁 **Uploads**: Easy file handling with Multer-based helpers.
26
-
27
-
28
-
29
- ## 🛠️ Quick Start / Inicio Rápido
30
-
31
- ### 1. Installation / Instalación
32
- ```bash
33
- npm install @seip/blue-bird
34
- ```
35
-
36
- ### 2. Initialize / Inicializar
37
- ```bash
38
- npx blue-bird
39
- ```
40
- *This copies the base structure: `backend`, `frontend`, and `.env`.*
41
- *Esto copia la estructura base: `backend`, `frontend` y `.env`.*
42
-
43
- ### 3. Setup React
44
- ```bash
45
- npm run react
46
- ```
47
- *Configures React, React Router, and Vite automatically.*
48
- *Configura React, React Router y Vite automáticamente.*
49
-
50
- ### 4. Development / Desarrollo
51
- ```bash
52
- # Start Backend (Express)
53
- npm run dev
54
-
55
- # Start Frontend (Vite)
56
- npm run vite:dev
57
- ```
58
-
59
- <hr />
60
-
61
- ## 📖 Documentation / Documentación
62
-
63
- Check out our full documentation for detailed API reference and examples:
64
-
65
- - 🇺🇸 [English Documentation](https://seip25.github.io/Blue-bird/en.html)
66
- - 🇪🇸 [Documentación en Español](https://seip25.github.io/Blue-bird/index.html)
67
-
68
- <hr />
69
-
70
- ## 📄 License / Licencia
71
-
72
- Distributed under the **MIT License**. See `LICENSE` for more information.
73
-
74
- Distribuido bajo la **Licencia MIT**. Mira `LICENSE` para más información.
75
-
76
- <hr />
77
-
78
- <div align="center">
79
- <p>Made with ❤️ by <strong>Seip25</strong></p>
80
- </div>
1
+ # Blue Bird Framework
2
+
3
+ **The Future of Express & React Development**
4
+
5
+ ![Blue Bird Logo](https://seip25.github.io/Blue-bird/blue-bird.png)
6
+
7
+ [![npm version](https://img.shields.io/npm/v/@seip/blue-bird.svg)](https://www.npmjs.com/package/@seip/blue-bird)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
+
10
+
11
+ ## 🌟 Introduction / Introducción
12
+
13
+ **Blue Bird** is a powerful, opinionated structure based on **Express** and **React**. It's designed to help developers build fast, scalable applications with hydrated components (Islands or Full views) and everything pre-configured.
14
+
15
+ **Blue Bird** es una estructura potente basada en **Express** y **React**. Está diseñada para ayudar a los desarrolladores a construir aplicaciones rápidas y escalables con componentes hidratados (Islas o vistas completas) y todo pre-configurado.
16
+
17
+
18
+
19
+ ## 🚀 Key Features / Características Clave
20
+
21
+ - ⚡ **All-In-One**: Express, React, Vite, JWT Auth, and Validations ready to go.
22
+ - 💎 **Flexible**: Extensible via standard Express `.use()` middleware.
23
+ - 🏝️ **Island Architecture**: Hydrate only what you need with React.
24
+ - 🔐 **Secure**: Integrated JWT authentication and multi-language validation.
25
+ - 📁 **Uploads**: Easy file handling with Multer-based helpers.
26
+
27
+
28
+
29
+ ## 🛠️ Quick Start / Inicio Rápido
30
+
31
+ ### 1. Installation / Instalación
32
+ ```bash
33
+ npm install @seip/blue-bird
34
+ ```
35
+
36
+ ### 2. Initialize / Inicializar
37
+ ```bash
38
+ npx blue-bird
39
+ ```
40
+ *This copies the base structure: `backend`, `frontend`, and `.env`.*
41
+ *Esto copia la estructura base: `backend`, `frontend` y `.env`.*
42
+
43
+ ### 3. Setup React
44
+ ```bash
45
+ npm run react
46
+ ```
47
+ *Configures React, React Router, and Vite automatically.*
48
+ *Configura React, React Router y Vite automáticamente.*
49
+
50
+ ### 4. Development / Desarrollo
51
+ ```bash
52
+ # Start Backend (Express)
53
+ npm run dev
54
+
55
+ # Start Frontend (Vite)
56
+ npm run vite:dev
57
+ ```
58
+
59
+ <hr />
60
+
61
+ ## 📖 Documentation / Documentación
62
+
63
+ Check out our full documentation for detailed API reference and examples:
64
+
65
+ - 🇺🇸 [English Documentation](https://seip25.github.io/Blue-bird/en.html)
66
+ - 🇪🇸 [Documentación en Español](https://seip25.github.io/Blue-bird/index.html)
67
+
68
+ <hr />
69
+
70
+ ## 📄 License / Licencia
71
+
72
+ Distributed under the **MIT License**. See `LICENSE` for more information.
73
+
74
+ Distribuido bajo la **Licencia MIT**. Mira `LICENSE` para más información.
75
+
76
+ <hr />
77
+
78
+ <div align="center">
79
+ <p>Made with ❤️ by <strong>Seip25</strong></p>
80
+ </div>
package/backend/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import App from "@seip/blue-bird/core/app.js";
2
- import routerUsers from "./routes/app.js";
3
-
4
- const app = new App({
5
- routes: [routerUsers],
6
- cors: [],
7
- middlewares: [],
8
- port: 3000,
9
- host: "http://localhost"
10
- })
11
-
12
-
1
+ import App from "@seip/blue-bird/core/app.js";
2
+ import routerUsers from "./routes/app.js";
3
+
4
+ const app = new App({
5
+ routes: [routerUsers],
6
+ cors: [],
7
+ middlewares: [],
8
+ port: 3000,
9
+ host: "http://localhost"
10
+ })
11
+
12
+
13
13
  app.run()
@@ -1,41 +1,53 @@
1
- import Router from "@seip/blue-bird/core/router.js"
2
- import Validator from "@seip/blue-bird/core/validate.js"
3
- import Template from "@seip/blue-bird/core/template.js"
4
-
5
-
6
- const routerUsers = new Router("/")
7
-
8
- routerUsers.get("/users", (req, res) => {
9
- const users = [
10
- {
11
- name: "John Doe",
12
- email: "john.doe@example.com",
13
- },
14
- {
15
- name: "Jane Doe2",
16
- email: "jane.doe2@example.com",
17
- },
18
- ]
19
- res.json(users)
20
- })
21
-
22
- const loginSchema = {
23
- email: { required: true, email: true },
24
- password: { required: true, min: 6 }
25
- };
26
-
27
- const loginValidator = new Validator(loginSchema, 'es');
28
-
29
- routerUsers.post('/login', loginValidator.middleware(), (req, res) => {
30
- res.json({ message: 'Login successful' });
31
- });
32
-
33
-
34
- routerUsers.get("*", (req, res) => {
35
- const response = Template.renderReact(res, "App", { title: "Example title" });
36
- return response;
37
-
38
- })
39
-
40
-
1
+ import Router from "@seip/blue-bird/core/router.js"
2
+ import Validator from "@seip/blue-bird/core/validate.js"
3
+ import Template from "@seip/blue-bird/core/template.js"
4
+
5
+
6
+ const routerUsers = new Router("/")
7
+
8
+ routerUsers.get("/users", (req, res) => {
9
+ const users = [
10
+ {
11
+ name: "John Doe",
12
+ email: "john.doe@example.com",
13
+ },
14
+ {
15
+ name: "Jane Doe2",
16
+ email: "jane.doe2@example.com",
17
+ },
18
+ ]
19
+ res.json(users)
20
+ })
21
+
22
+ const loginSchema = {
23
+ email: { required: true, email: true },
24
+ password: { required: true, min: 6 }
25
+ };
26
+
27
+ const loginValidator = new Validator(loginSchema, 'es');
28
+
29
+ routerUsers.post('/login', loginValidator.middleware(), (req, res) => {
30
+ res.json({ message: 'Login successful' });
31
+ });
32
+
33
+ //Example renderReact with customized meta Tags
34
+ routerUsers.get("/about", (req, res) => {
35
+ const response = Template.renderReact(res, "About", { title: "About Example title" }, {
36
+ metaTags: {
37
+ titleMeta: "About Title",
38
+ descriptionMeta: "About description",
39
+ keywordsMeta: "About,express, react, framework",
40
+ authorMeta: "Blue Bird",
41
+ langMeta: "es"
42
+ }
43
+ });
44
+ return response;
45
+ })
46
+
47
+ routerUsers.get("*", (req, res) => {
48
+ const response = Template.renderReact(res, "App", { title: "Example title" });
49
+ return response;
50
+ })
51
+
52
+
41
53
  export default routerUsers