one-for-all-framework 4.5.0 → 5.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d724d07382e25a25fc566c6c889497bcabca8ef5536f86c13d9337f48507ef74
4
- data.tar.gz: d7322c62e8380e22f17773b3202a7574859db716289706591db041205df38b61
3
+ metadata.gz: 189b80a3eb7da358bd91a56cb6ffb17997f94433ee00fdd0366762320bea5f1e
4
+ data.tar.gz: 5693b52708caad36aa969c58ac3f25ae3b17a1d2e964de44ab7761577050aa5e
5
5
  SHA512:
6
- metadata.gz: 896e3107819354a1e335519e4a4ec8f6934bdab41ea7f2e99558bed67ede658295b1be2aeead6d50608d5a9c3b51603e71d1754837f6c45cd93b43580a5b1a72
7
- data.tar.gz: 7d9f02100feb5a46ee909932672c03443e585ba7fd6641d05d84006f3de780f5de85e56e381a84c0b4337fc6c59a5e9ea621f5281c112f8093be3063d19c3360
6
+ metadata.gz: 5f1bff39a001463536a39c0ee436438cb8579287cbbc4d1846b439a2172df848cead0a4dbc87ef0046cf0bc359833c47dca33e3347e2cfb94ac3c1108231f26c
7
+ data.tar.gz: 8375e210da774b3fd0f6db508c5a44df418c1d395cd71d742aa10bec261f3429b65b904a9cc07c36d906d35edfa9e1fdd00d6e0916e17143410520ee2ebd44f8
data/README.md CHANGED
@@ -2,13 +2,13 @@
2
2
  <img src="public/images/logo.png" width="500" height="500" alt="OFA Framework Logo">
3
3
  </p>
4
4
 
5
- # ⚡ One-For-All (OFA) Framework v4.5.0
5
+ # ⚡ One-For-All (OFA) Framework v5.0.0
6
6
 
7
7
  [![Ruby Version](https://img.shields.io/badge/ruby-%3E%3D%203.0.0-red.svg)](https://www.ruby-lang.org/)
8
8
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
9
9
  [![Framework](https://img.shields.io/badge/MVC-Lightweight-orange.svg)]()
10
10
 
11
- **One-For-All (OFA)** is a premium, ultra-fast Ruby MVC framework designed for developers who value both high performance and modern aesthetics. Built on the powerful **Eks-Cent** engine and optimized with **Eksa Server**, OFA v3.0 now supports **Full E-Commerce integration** alongside its stunning "Glassmorphism" UI.
11
+ **One-For-All (OFA)** is a modern and powerful web application framework designed for developers who value high performance, scalability, and premium aesthetics. Built on the high-performance **Eksa Server** engine, OFA v5.0.0 introduces advanced dashboard analytics, native Lucide icon support, and a robust plugin architecture.
12
12
 
13
13
  ---
14
14
 
@@ -24,6 +24,8 @@
24
24
  - **📡 Modern API**: Built-in JWT support and automated Swagger/OpenAPI documentation.
25
25
  - **🚧 Maintenance Mode**: Instantly toggle "Under Construction" mode via CLI.
26
26
  - **🔍 Activity Logs**: Full audit trail in CMS to monitor user actions and security.
27
+ - **📊 Dashboard Analytics**: Integrated Chart.js for real-time content and user statistics.
28
+ - **🎨 Lucide Icons**: Native support for modern, lightweight Lucide icon set.
27
29
  - **🔌 Plugin System**: Modular architecture to extend the framework with custom add-ons.
28
30
 
29
31
  ---
@@ -8,7 +8,8 @@ class DashboardController < ApplicationController
8
8
  pages: Page.count,
9
9
  posts: Post.count,
10
10
  projects: Project.count,
11
- products: defined?(Product) ? Product.count : 0
11
+ products: defined?(Product) ? Product.count : 0,
12
+ users: User.count
12
13
  }
13
14
  render 'dashboard'
14
15
  end
data/app/models/user.rb CHANGED
@@ -15,6 +15,15 @@ class User < Sequel::Model
15
15
  defined?(MONGO_CLIENT) && MONGO_CLIENT
16
16
  end
17
17
 
18
+ # Override count for Mongo support
19
+ def self.count
20
+ if mongo?
21
+ MONGO_CLIENT[:users].count_documents
22
+ else
23
+ super
24
+ end
25
+ end
26
+
18
27
  # Override find for Mongo support
19
28
  def self.find(params)
20
29
  if mongo?
@@ -116,6 +116,97 @@
116
116
  <div class="text-lg font-black text-slate-700 dark:text-white uppercase tracking-wider truncate"><%= FEATURES_CONFIG['storage'] || 'Local Cluster' %></div>
117
117
  </div>
118
118
  </div>
119
+
120
+ <!-- System Analytics Chart -->
121
+ <div class="glass-card !p-8 group">
122
+ <div class="card-glow !bg-primary/5"></div>
123
+ <div class="flex items-center justify-between mb-8">
124
+ <div>
125
+ <h3 class="text-2xl font-black tracking-tighter text-slate-700 dark:text-white">System Analytics</h3>
126
+ <p class="text-slate-500 text-sm">Real-time content distribution and user growth</p>
127
+ </div>
128
+ <div class="flex gap-2">
129
+ <span class="w-3 h-3 rounded-full bg-primary animate-pulse"></span>
130
+ <span class="text-[10px] font-bold text-primary uppercase tracking-widest">Live Data</span>
131
+ </div>
132
+ </div>
133
+
134
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center">
135
+ <div class="relative h-[300px] w-full">
136
+ <canvas id="statsChart"></canvas>
137
+ </div>
138
+ <div class="space-y-6">
139
+ <div class="p-6 rounded-3xl bg-white/5 border border-white/10 hover:border-primary/30 transition-all group/stat">
140
+ <div class="flex items-center justify-between mb-2">
141
+ <span class="text-slate-500 font-bold text-xs uppercase tracking-widest">Active Users</span>
142
+ <i class="fas fa-users text-primary"></i>
143
+ </div>
144
+ <div class="text-3xl font-black text-slate-700 dark:text-white tracking-tighter"><%= @stats[:users] %></div>
145
+ </div>
146
+ <div class="p-6 rounded-3xl bg-white/5 border border-white/10 hover:border-primary/30 transition-all group/stat">
147
+ <div class="flex items-center justify-between mb-2">
148
+ <span class="text-slate-500 font-bold text-xs uppercase tracking-widest">Total Assets</span>
149
+ <i class="fas fa-database text-secondary"></i>
150
+ </div>
151
+ <div class="text-3xl font-black text-slate-700 dark:text-white tracking-tighter"><%= @stats[:pages] + @stats[:posts] + @stats[:projects] + @stats[:products] %></div>
152
+ </div>
153
+ </div>
154
+ </div>
155
+ </div>
156
+
157
+ <script>
158
+ document.addEventListener('DOMContentLoaded', () => {
159
+ const ctx = document.getElementById('statsChart').getContext('2d');
160
+
161
+ const stats = {
162
+ pages: <%= @stats[:pages] %>,
163
+ posts: <%= @stats[:posts] %>,
164
+ projects: <%= @stats[:projects] %>,
165
+ products: <%= @stats[:products] %>,
166
+ users: <%= @stats[:users] %>
167
+ };
168
+
169
+ new Chart(ctx, {
170
+ type: 'doughnut',
171
+ data: {
172
+ labels: ['Pages', 'Posts', 'Projects', 'Products', 'Users'],
173
+ datasets: [{
174
+ data: [stats.pages, stats.posts, stats.projects, stats.products, stats.users],
175
+ backgroundColor: [
176
+ '#4f46e5', // Primary (Indigo)
177
+ '#8b5cf6', // Secondary (Purple)
178
+ '#10b981', // Green
179
+ '#f59e0b', // Orange
180
+ '#ec4899' // Pink
181
+ ],
182
+ borderWidth: 0,
183
+ hoverOffset: 20
184
+ }]
185
+ },
186
+ options: {
187
+ responsive: true,
188
+ maintainAspectRatio: false,
189
+ cutout: '75%',
190
+ plugins: {
191
+ legend: {
192
+ display: true,
193
+ position: 'bottom',
194
+ labels: {
195
+ color: document.documentElement.classList.contains('dark') ? '#94a3b8' : '#64748b',
196
+ font: {
197
+ family: 'Outfit',
198
+ weight: '600',
199
+ size: 12
200
+ },
201
+ padding: 20,
202
+ usePointStyle: true
203
+ }
204
+ }
205
+ }
206
+ }
207
+ });
208
+ });
209
+ </script>
119
210
 
120
211
  <div class="glass-card !p-12 bg-gradient-to-br from-primary/5 to-transparent border-primary/10 text-left">
121
212
  <div class="max-w-xl">
data/app/views/docs.erb CHANGED
@@ -1,6 +1,6 @@
1
1
  <div class="space-y-12 pb-20">
2
2
  <div class="text-left">
3
- <div class="badge-premium">Documentation v4.5.0</div>
3
+ <div class="badge-premium">Documentation v5.0.0</div>
4
4
  <h1 class="text-5xl font-black tracking-tighter mb-4 text-slate-700 dark:text-white">Framework <span class="text-primary">Guide</span></h1>
5
5
  <p class="text-xl text-slate-500 max-w-2xl leading-relaxed">Everything you need to know about building premium web applications with the One-For-All framework.</p>
6
6
  </div>
@@ -15,6 +15,7 @@
15
15
  <a href="#structure" class="block px-4 py-2 rounded-xl hover:bg-primary/5 text-slate-600 hover:text-primary transition-all font-semibold border-l-2 border-transparent hover:border-primary">Project Structure</a>
16
16
  <a href="#routing" class="block px-4 py-2 rounded-xl hover:bg-primary/5 text-slate-600 hover:text-primary transition-all font-semibold border-l-2 border-transparent hover:border-primary">Routing System</a>
17
17
  <a href="#cms" class="block px-4 py-2 rounded-xl hover:bg-primary/5 text-slate-600 hover:text-primary transition-all font-semibold border-l-2 border-transparent hover:border-primary">CMS & Features</a>
18
+ <a href="#uiux" class="block px-4 py-2 rounded-xl hover:bg-primary/5 text-slate-600 hover:text-primary transition-all font-semibold border-l-2 border-transparent hover:border-primary">UI/UX & Analytics</a>
18
19
  <a href="#ecommerce" class="block px-4 py-2 rounded-xl hover:bg-primary/5 text-slate-600 hover:text-primary transition-all font-semibold border-l-2 border-transparent hover:border-primary">E-Commerce</a>
19
20
  <a href="#api" class="block px-4 py-2 rounded-xl hover:bg-primary/5 text-slate-600 hover:text-primary transition-all font-semibold border-l-2 border-transparent hover:border-primary">API & Modern Web</a>
20
21
  <a href="#advanced" class="block px-4 py-2 rounded-xl hover:bg-primary/5 text-slate-600 hover:text-primary transition-all font-semibold border-l-2 border-transparent hover:border-primary">Mailers & Background Jobs</a>
@@ -32,7 +33,7 @@
32
33
  <i class="fas fa-star text-primary"></i> Introduction
33
34
  </h2>
34
35
  <div class="markdown-content">
35
- <p><strong>One-For-All (OFA)</strong> is a premium, ultra-fast Ruby MVC framework designed for developers who value both high performance and modern aesthetics. Built on the powerful <strong>Eks-Cent</strong> engine and optimized with <strong>Eksa Server</strong>, OFA v3.0 now supports <strong>Full E-Commerce integration</strong> alongside its stunning "Glassmorphism" UI.</p>
36
+ <p><strong>One-For-All (OFA)</strong> is a modern and powerful web application framework designed for developers who value high performance, scalability, and premium aesthetics. Built on the high-performance <strong>Eksa Server</strong> engine, OFA v5.0.0 introduces advanced dashboard analytics, native Lucide icon support, and a robust plugin architecture.</p>
36
37
  <p>Our philosophy is "Premium by Default". You shouldn't have to spend hours tweaking CSS just to get a modern look. With OFA, you get Glassmorphism, animations, and responsive layouts baked in.</p>
37
38
  </div>
38
39
  </section>
@@ -331,6 +332,36 @@ resources :posts
331
332
  </div>
332
333
  </section>
333
334
 
335
+ <!-- UI/UX & Analytics -->
336
+ <section id="uiux" class="glass-panel p-8 md:p-12 text-left bg-gradient-to-br from-secondary/10 to-transparent">
337
+ <h2 class="text-3xl font-black tracking-tight mb-6 flex items-center gap-3">
338
+ <i class="fas fa-wand-magic-sparkles text-primary"></i> UI/UX & Analytics
339
+ </h2>
340
+ <div class="markdown-content">
341
+ <p>Version 5.0.0 brings significant enhancements to the visual and analytical capabilities of the framework.</p>
342
+
343
+ <h4 class="font-bold text-lg mt-8 mb-4">📊 Dashboard Analytics (Chart.js)</h4>
344
+ <p class="text-sm text-slate-500 mb-4">The CMS dashboard now includes real-time visualizations of your application's data. Powered by Chart.js, the analytics widget provides a clear overview of your content distribution and user growth.</p>
345
+ <ul class="text-xs space-y-2 text-slate-600 dark:text-slate-400">
346
+ <li>• <strong>Doughnut Chart:</strong> Visualizes the ratio of pages, posts, projects, products, and users.</li>
347
+ <li>• <strong>Live Stats:</strong> Real-time counters for "Active Users" and "Total Assets".</li>
348
+ <li>• <strong>Theme-Aware:</strong> The chart's colors and legend automatically adjust to match your chosen theme (Light/Dark).</li>
349
+ </ul>
350
+
351
+ <h4 class="font-bold text-lg mt-8 mb-4">🎨 Lucide Icons Integration</h4>
352
+ <p class="text-sm text-slate-500 mb-4">In addition to FontAwesome, OFA now natively supports **Lucide Icons**. Lucide provides a modern, lightweight, and consistent set of SVG icons that fit perfectly with the framework's minimalist aesthetic.</p>
353
+ <div class="p-4 bg-white/5 border border-white/10 rounded-2xl mb-4">
354
+ <p class="text-xs text-slate-500 mb-2">Usage Example:</p>
355
+ <code class="text-primary">&lt;i data-lucide="rocket"&gt;&lt;/i&gt;</code>
356
+ </div>
357
+ <ul class="text-xs space-y-2 text-slate-600 dark:text-slate-400">
358
+ <li>• <strong>Automatic Replacement:</strong> Icons are automatically initialized and rendered on page load.</li>
359
+ <li>• <strong>SVG Based:</strong> Scalable and CSS-stylable icons without the overhead of webfonts.</li>
360
+ <li>• <strong>Vast Library:</strong> Access to hundreds of modern icons for any use case.</li>
361
+ </ul>
362
+ </div>
363
+ </section>
364
+
334
365
  <!-- E-Commerce -->
335
366
  <section id="ecommerce" class="space-y-6 text-left">
336
367
  <h2 class="text-3xl font-black tracking-tight flex items-center gap-3 ml-2">
data/app/views/index.erb CHANGED
@@ -1,6 +1,6 @@
1
1
  <div class="text-center space-y-6 max-w-2xl mx-auto py-12">
2
2
  <div class="inline-flex items-center px-4 py-1.5 rounded-full bg-primary/10 border border-primary/20 text-primary text-xs font-bold uppercase tracking-wider animate-pulse">
3
- Framework Version 4.5.0
3
+ Framework Version 5.0.0
4
4
  </div>
5
5
 
6
6
  <h1 class="text-5xl md:text-7xl font-black tracking-tight leading-tight">
data/app/views/layout.erb CHANGED
@@ -21,6 +21,12 @@
21
21
  <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script>
22
22
  <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-ruby.min.js"></script>
23
23
 
24
+ <!-- Lucide Icons -->
25
+ <script src="https://unpkg.com/lucide@latest"></script>
26
+
27
+ <!-- Chart.js -->
28
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
29
+
24
30
  <% if FEATURES_CONFIG['rich_text'] %>
25
31
  <link rel="stylesheet" type="text/css" href="https://unpkg.com/trix@2.0.8/dist/trix.css">
26
32
  <script type="text/javascript" src="https://unpkg.com/trix@2.0.8/dist/trix.umd.min.js"></script>
@@ -584,6 +590,9 @@
584
590
 
585
591
  <script>
586
592
  document.addEventListener('DOMContentLoaded', () => {
593
+ // Initialize Lucide Icons
594
+ lucide.createIcons();
595
+
587
596
  // Initial Page Load Animation
588
597
  anime({
589
598
  targets: 'header nav',
data/bin/ofa CHANGED
@@ -33,7 +33,7 @@ def help
33
33
  puts " / __ \\/ ____/ / | "
34
34
  puts " / / / / /_ / /| | Framework "
35
35
  puts "/ /_/ / __/ / ___ | Premium MVC "
36
- puts "\\____/_/ /_/ |_| v4.5.0 "
36
+ puts "\\____/_/ /_/ |_| v5.0.0 "
37
37
  puts " "
38
38
  puts "✨ One-For-All Framework CLI ✨"
39
39
  puts "-----------------------------"
@@ -248,7 +248,7 @@ when 'init'
248
248
  puts " / __ \\/ ____/ / | "
249
249
  puts " / / / / /_ / /| | Framework "
250
250
  puts "/ /_/ / __/ / ___ | Premium MVC "
251
- puts "\\____/_/ /_/ |_| v4.5.0 "
251
+ puts "\\____/_/ /_/ |_| v5.0.0 "
252
252
  puts " "
253
253
  puts "Initializing One-For-All project as '#{app_type}' in #{PROJECT_ROOT}..."
254
254
 
@@ -861,7 +861,7 @@ when 'console'
861
861
  puts " / __ \\/ ____/ / | "
862
862
  puts " / / / / /_ / /| | Framework "
863
863
  puts "/ /_/ / __/ / ___ | Console (REPL) "
864
- puts "\\____/_/ /_/ |_| v4.5.0 "
864
+ puts "\\____/_/ /_/ |_| v5.0.0 "
865
865
  puts " "
866
866
  puts "✨ Loading environment... (Type 'exit' to quit)"
867
867
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: one-for-all-framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.5.0
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ishikawa Uta
@@ -288,5 +288,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
288
288
  requirements: []
289
289
  rubygems_version: 3.6.7
290
290
  specification_version: 4
291
- summary: A premium, ultra-fast Ruby MVC framework with Glassmorphism UI.
291
+ summary: Modern & Powerfull web application framework.
292
292
  test_files: []