@seip/blue-bird 0.6.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/.env_example +38 -0
- package/AGENTS.md +276 -0
- package/LICENSE +21 -0
- package/README.md +311 -0
- package/backend/index.js +21 -0
- package/backend/routes/api.js +53 -0
- package/backend/routes/frontend.js +29 -0
- package/core/app.js +397 -0
- package/core/auth.js +180 -0
- package/core/cache.js +72 -0
- package/core/cli/docker.js +319 -0
- package/core/cli/init.js +130 -0
- package/core/cli/route.js +43 -0
- package/core/cli/swagger.js +40 -0
- package/core/config.js +52 -0
- package/core/debug.js +249 -0
- package/core/logger.js +100 -0
- package/core/middleware.js +27 -0
- package/core/router.js +148 -0
- package/core/seo.js +113 -0
- package/core/swagger.js +40 -0
- package/core/template.js +254 -0
- package/core/upload.js +77 -0
- package/core/validate.js +380 -0
- package/docker/Dockerfile +25 -0
- package/docker-compose.yml +70 -0
- package/frontend/public/favicon.ico +0 -0
- package/frontend/public/js/spa.js +183 -0
- package/frontend/public/js/tailwind.js +8 -0
- package/frontend/templates/about.html +101 -0
- package/frontend/templates/index.html +140 -0
- package/package.json +59 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="{{lang}}">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<title>{{title}}</title>
|
|
8
|
+
<link rel="canonical" href="{{canonicalUrl}}" />
|
|
9
|
+
<meta name="description" content="{{description}}">
|
|
10
|
+
<meta name="keywords" content="{{keywords}}">
|
|
11
|
+
<meta name="author" content="{{author}}">
|
|
12
|
+
<link rel="icon" href="/favicon.ico" />
|
|
13
|
+
<script src="/js/tailwind.js"></script>
|
|
14
|
+
</head>
|
|
15
|
+
|
|
16
|
+
<body class="min-h-screen bg-slate-950 text-white font-sans antialiased selection:bg-blue-500 selection:text-white">
|
|
17
|
+
<header class="sticky top-0 z-50 px-4 py-3">
|
|
18
|
+
<div
|
|
19
|
+
class="max-w-7xl mx-auto flex items-center justify-between backdrop-blur-md bg-slate-900/60 border border-white/10 rounded-2xl px-6 py-3 shadow-lg">
|
|
20
|
+
<div class="flex items-center space-x-3">
|
|
21
|
+
<a href="/" class="flex items-center space-x-3">
|
|
22
|
+
<div
|
|
23
|
+
class="w-10 h-10 bg-gradient-to-tr from-blue-500 to-indigo-600 rounded-xl flex items-center justify-center shadow-md shadow-blue-500/30">
|
|
24
|
+
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
25
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
26
|
+
d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8" />
|
|
27
|
+
</svg>
|
|
28
|
+
</div>
|
|
29
|
+
<span
|
|
30
|
+
class="text-xl font-bold tracking-tight bg-gradient-to-r from-blue-400 via-indigo-200 to-white bg-clip-text text-transparent">Blue
|
|
31
|
+
Bird</span>
|
|
32
|
+
</a>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<nav class="flex space-x-8 text-sm font-medium text-slate-300">
|
|
36
|
+
<a href="/" class="hover:text-blue-400 transition-colors">Home</a>
|
|
37
|
+
<a href="/about" class="hover:text-blue-400 transition-colors">About</a>
|
|
38
|
+
</nav>
|
|
39
|
+
</div>
|
|
40
|
+
</header>
|
|
41
|
+
|
|
42
|
+
<main class="max-w-4xl mx-auto px-4 py-16">
|
|
43
|
+
<div class="space-y-12">
|
|
44
|
+
<div>
|
|
45
|
+
<a href="/"
|
|
46
|
+
class="inline-flex items-center text-sm font-semibold text-blue-400 hover:text-blue-300 transition-colors">
|
|
47
|
+
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
48
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
49
|
+
d="M10 19l-7-7m0 0l7-7m-7 7h18" />
|
|
50
|
+
</svg>
|
|
51
|
+
Back to Home
|
|
52
|
+
</a>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<div class="space-y-4">
|
|
56
|
+
<h1
|
|
57
|
+
class="text-4xl sm:text-5xl font-extrabold tracking-tight bg-gradient-to-r from-blue-400 to-indigo-300 bg-clip-text text-transparent">
|
|
58
|
+
About Blue Bird
|
|
59
|
+
</h1>
|
|
60
|
+
<p class="text-lg text-slate-300 leading-relaxed">
|
|
61
|
+
Blue Bird provides built-in routing, JWT authentication, validation, performance caching, SEO
|
|
62
|
+
management, and raw HTML templates with no extra overhead.
|
|
63
|
+
</p>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<div class="pt-8 border-t border-white/10 space-y-6">
|
|
67
|
+
<h2 class="text-2xl font-bold">Framework Capabilities</h2>
|
|
68
|
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 text-sm text-slate-400">
|
|
69
|
+
<div class="bg-slate-900/50 border border-white/5 p-6 rounded-2xl">
|
|
70
|
+
<h3 class="font-bold text-white text-base mb-2">HTML Minifier</h3>
|
|
71
|
+
<p>Every HTML view is parsed, comments are stripped, and whitespace is compressed instantly,
|
|
72
|
+
delivering minimum payload sizes to ensure superior SEO metrics.</p>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="bg-slate-900/50 border border-white/5 p-6 rounded-2xl">
|
|
75
|
+
<h3 class="font-bold text-white text-base mb-2">In-Memory Cache</h3>
|
|
76
|
+
<p>The framework caches fully compiled HTML outputs in RAM memory with configurable time-to-live
|
|
77
|
+
expiration (TTL), ensuring sub-millisecond response times in production.</p>
|
|
78
|
+
</div>
|
|
79
|
+
<div class="bg-slate-900/50 border border-white/5 p-6 rounded-2xl">
|
|
80
|
+
<h3 class="font-bold text-white text-base mb-2">Pure API Focus</h3>
|
|
81
|
+
<p>Designed to serve as a fast API and static content backend. Perfect to run independently, or
|
|
82
|
+
to easily migrate to newer decoupled frontend tools later on.</p>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="bg-slate-900/50 border border-white/5 p-6 rounded-2xl">
|
|
85
|
+
<h3 class="font-bold text-white text-base mb-2">Gzip Compression</h3>
|
|
86
|
+
<p>All textual assets, compiled pages, and REST API payloads are compressed via Gzip before
|
|
87
|
+
network transit to ensure low latency and high score audits.</p>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</main>
|
|
93
|
+
|
|
94
|
+
<footer class="border-t border-white/5 py-8 bg-slate-950 mt-16">
|
|
95
|
+
<div class="max-w-7xl mx-auto px-4 text-center text-sm text-slate-500">
|
|
96
|
+
<p>Powered by Blue Bird Framework. All rights reserved.</p>
|
|
97
|
+
</div>
|
|
98
|
+
</footer>
|
|
99
|
+
</body>
|
|
100
|
+
|
|
101
|
+
</html>
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="{{lang}}">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<title>{{title}}</title>
|
|
8
|
+
<link rel="canonical" href="{{canonicalUrl}}" />
|
|
9
|
+
<meta name="description" content="{{description}}">
|
|
10
|
+
<meta name="keywords" content="{{keywords}}">
|
|
11
|
+
<meta name="author" content="{{author}}">
|
|
12
|
+
<link rel="icon" href="/favicon.ico" />
|
|
13
|
+
<script src="/js/tailwind.js"></script>
|
|
14
|
+
</head>
|
|
15
|
+
|
|
16
|
+
<body class="min-h-screen bg-slate-950 text-white font-sans antialiased selection:bg-blue-500 selection:text-white">
|
|
17
|
+
<header class="sticky top-0 z-50 px-4 py-3">
|
|
18
|
+
<div
|
|
19
|
+
class="max-w-7xl mx-auto flex items-center justify-between backdrop-blur-md bg-slate-900/60 border border-white/10 rounded-2xl px-6 py-3 shadow-lg">
|
|
20
|
+
<div class="flex items-center space-x-3">
|
|
21
|
+
<div
|
|
22
|
+
class="w-10 h-10 bg-gradient-to-tr from-blue-500 to-indigo-600 rounded-xl flex items-center justify-center shadow-md shadow-blue-500/30">
|
|
23
|
+
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
24
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
25
|
+
d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8" />
|
|
26
|
+
</svg>
|
|
27
|
+
</div>
|
|
28
|
+
<span
|
|
29
|
+
class="text-xl font-bold tracking-tight bg-gradient-to-r from-blue-400 via-indigo-200 to-white bg-clip-text text-transparent">Blue
|
|
30
|
+
Bird</span>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<nav class="flex space-x-8 text-sm font-medium text-slate-300">
|
|
34
|
+
<a href="/" class="hover:text-blue-400 transition-colors">Home</a>
|
|
35
|
+
<a href="/about" class="hover:text-blue-400 transition-colors">About</a>
|
|
36
|
+
</nav>
|
|
37
|
+
</div>
|
|
38
|
+
</header>
|
|
39
|
+
|
|
40
|
+
<main class="max-w-7xl mx-auto px-4 pt-12 pb-24">
|
|
41
|
+
|
|
42
|
+
<div
|
|
43
|
+
class="relative py-16 px-6 md:px-12 rounded-3xl overflow-hidden bg-gradient-to-b from-blue-900/20 to-slate-950 border border-white/5 shadow-2xl">
|
|
44
|
+
<div class="absolute -top-40 -left-40 w-96 h-96 bg-blue-500/10 rounded-full blur-3xl"></div>
|
|
45
|
+
<div class="absolute -right-40 -bottom-40 w-96 h-96 bg-indigo-500/10 rounded-full blur-3xl"></div>
|
|
46
|
+
|
|
47
|
+
<div class="relative max-w-4xl mx-auto text-center space-y-8">
|
|
48
|
+
<span
|
|
49
|
+
class="inline-flex items-center px-4 py-1.5 rounded-full text-xs font-semibold tracking-wider bg-blue-500/10 text-blue-400 border border-blue-500/20 uppercase">
|
|
50
|
+
Welcome to Blue Bird
|
|
51
|
+
</span>
|
|
52
|
+
|
|
53
|
+
<h1
|
|
54
|
+
class="text-4xl sm:text-6xl font-extrabold tracking-tight bg-gradient-to-r from-blue-400 via-indigo-300 to-white bg-clip-text text-transparent">
|
|
55
|
+
Hello, Developer! Welcome to the next level.
|
|
56
|
+
</h1>
|
|
57
|
+
|
|
58
|
+
<p class="text-lg sm:text-xl text-slate-400 leading-relaxed max-w-2xl mx-auto">
|
|
59
|
+
Blue Bird is a fast, structured, and opinionated Express.js framework for developers who want
|
|
60
|
+
visual elegance and performance with raw HTML and CSS.
|
|
61
|
+
</p>
|
|
62
|
+
|
|
63
|
+
<div class="flex flex-wrap justify-center gap-4 pt-4">
|
|
64
|
+
<a href="/about"
|
|
65
|
+
class="px-8 py-3.5 rounded-xl font-semibold bg-gradient-to-r from-blue-500 to-indigo-600 hover:from-blue-600 hover:to-indigo-700 shadow-lg shadow-blue-500/20 transform hover:-translate-y-0.5 transition-all">
|
|
66
|
+
About Us →
|
|
67
|
+
</a>
|
|
68
|
+
<a href="https://github.com/seip25/Blue-bird" target="_blank"
|
|
69
|
+
class="px-8 py-3.5 rounded-xl font-semibold bg-slate-900 border border-white/10 hover:bg-slate-800 transition-all">
|
|
70
|
+
GitHub
|
|
71
|
+
</a>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<section class="mt-24 space-y-12">
|
|
77
|
+
<div class="text-center space-y-3">
|
|
78
|
+
<h2 class="text-3xl font-bold bg-gradient-to-r from-white to-slate-400 bg-clip-text text-transparent">
|
|
79
|
+
High-Performance Core Features</h2>
|
|
80
|
+
<p class="text-slate-400">Everything preconfigured to serve raw, optimized HTML with minimal
|
|
81
|
+
overhead.</p>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
|
85
|
+
<div
|
|
86
|
+
class="group relative p-8 rounded-2xl bg-slate-900/40 border border-white/5 hover:border-blue-500/30 transition-all duration-300 hover:shadow-xl hover:shadow-blue-500/5 hover:-translate-y-1">
|
|
87
|
+
<div
|
|
88
|
+
class="w-12 h-12 bg-blue-500/10 text-blue-400 rounded-xl flex items-center justify-center mb-6 group-hover:scale-110 transition-transform">
|
|
89
|
+
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
90
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
91
|
+
d="M13 10V3L4 14h7v7l9-11h-7z" />
|
|
92
|
+
</svg>
|
|
93
|
+
</div>
|
|
94
|
+
<h3 class="text-xl font-semibold mb-3 group-hover:text-blue-400 transition-colors">Ultra-Fast
|
|
95
|
+
HTML Render</h3>
|
|
96
|
+
<p class="text-sm text-slate-400 leading-relaxed">Direct static HTML rendering using high-speed
|
|
97
|
+
string placeholder replacement, bypassing heavy parsing engines completely.</p>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<div
|
|
101
|
+
class="group relative p-8 rounded-2xl bg-slate-900/40 border border-white/5 hover:border-blue-500/30 transition-all duration-300 hover:shadow-xl hover:shadow-blue-500/5 hover:-translate-y-1">
|
|
102
|
+
<div
|
|
103
|
+
class="w-12 h-12 bg-indigo-500/10 text-indigo-400 rounded-xl flex items-center justify-center mb-6 group-hover:scale-110 transition-transform">
|
|
104
|
+
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
105
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
106
|
+
d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
|
|
107
|
+
</svg>
|
|
108
|
+
</div>
|
|
109
|
+
<h3 class="text-xl font-semibold mb-3 group-hover:text-indigo-400 transition-colors">In-Memory
|
|
110
|
+
HTML Caching</h3>
|
|
111
|
+
<p class="text-sm text-slate-400 leading-relaxed">Configurable time-to-live caching. Rendered
|
|
112
|
+
pages are stored in RAM for instant, sub-millisecond delivery in production.</p>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<div
|
|
116
|
+
class="group relative p-8 rounded-2xl bg-slate-900/40 border border-white/5 hover:border-blue-500/30 transition-all duration-300 hover:shadow-xl hover:shadow-blue-500/5 hover:-translate-y-1">
|
|
117
|
+
<div
|
|
118
|
+
class="w-12 h-12 bg-teal-500/10 text-teal-400 rounded-xl flex items-center justify-center mb-6 group-hover:scale-110 transition-transform">
|
|
119
|
+
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
120
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
121
|
+
d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" />
|
|
122
|
+
</svg>
|
|
123
|
+
</div>
|
|
124
|
+
<h3 class="text-xl font-semibold mb-3 group-hover:text-teal-400 transition-colors">JWT & Route
|
|
125
|
+
Security</h3>
|
|
126
|
+
<p class="text-sm text-slate-400 leading-relaxed">Secure cookie management, GCM-encrypted JWT
|
|
127
|
+
tokens, custom helmet configurations, and route rate limiting built-in.</p>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</section>
|
|
131
|
+
</main>
|
|
132
|
+
|
|
133
|
+
<footer class="border-t border-white/5 py-8 bg-slate-950 mt-16">
|
|
134
|
+
<div class="max-w-7xl mx-auto px-4 text-center text-sm text-slate-500">
|
|
135
|
+
<p>Powered by Blue Bird Framework. All rights reserved.</p>
|
|
136
|
+
</div>
|
|
137
|
+
</footer>
|
|
138
|
+
</body>
|
|
139
|
+
|
|
140
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@seip/blue-bird",
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "Express opinionated framework with HTML rendering, API architecture, built-in JWT auth, validation, caching, and SEO",
|
|
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
|
+
"framework",
|
|
16
|
+
"html",
|
|
17
|
+
"api",
|
|
18
|
+
"jwt",
|
|
19
|
+
"seo"
|
|
20
|
+
],
|
|
21
|
+
"author": "Seip25",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/seip25/Blue-bird/issues"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://seip25.github.io/Blue-bird/",
|
|
27
|
+
"scripts": {
|
|
28
|
+
"dev": "node --watch --env-file=.env backend/index.js",
|
|
29
|
+
"start": "node --env-file=.env backend/index.js",
|
|
30
|
+
"init": "node core/cli/init.js",
|
|
31
|
+
"route": "node core/cli/route.js",
|
|
32
|
+
"swagger-install": "node core/cli/swagger.js",
|
|
33
|
+
"docker": "node core/cli/init.js docker"
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"core",
|
|
40
|
+
"backend",
|
|
41
|
+
"frontend",
|
|
42
|
+
"docker",
|
|
43
|
+
"docker-compose.yml",
|
|
44
|
+
"AGENTS.md",
|
|
45
|
+
".env_example"
|
|
46
|
+
],
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"chalk": "^5.6.2",
|
|
49
|
+
"compression": "^1.8.1",
|
|
50
|
+
"cookie-parser": "^1.4.7",
|
|
51
|
+
"cors": "^2.8.6",
|
|
52
|
+
"express": "^5.2.1",
|
|
53
|
+
"express-rate-limit": "^8.2.1",
|
|
54
|
+
"helmet": "^8.1.0",
|
|
55
|
+
"jsonwebtoken": "^9.0.2",
|
|
56
|
+
"multer": "^2.0.2",
|
|
57
|
+
"xss": "^1.0.15"
|
|
58
|
+
}
|
|
59
|
+
}
|