one-for-all-framework 1.0.0 → 3.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.
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 v1.0</div>
3
+ <div class="badge-premium">Documentation v3.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,8 @@
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="#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
+ <a href="#deploy" 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">Deployment</a>
18
20
  </nav>
19
21
  </aside>
20
22
 
@@ -26,7 +28,7 @@
26
28
  <i class="fas fa-star text-primary"></i> Introduction
27
29
  </h2>
28
30
  <div class="markdown-content">
29
- <p><strong>One-For-All (OFA)</strong> is a high-performance Ruby web framework focused on speed and aesthetics. It uses a modular architecture built on top of the <em>Eks-Cent</em> engine, allowing you to scale from simple landing pages to complex CMS-driven sites effortlessly.</p>
31
+ <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>
30
32
  <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>
31
33
  </div>
32
34
  </section>
@@ -36,34 +38,114 @@
36
38
  <h2 class="text-3xl font-black tracking-tight flex items-center gap-3 ml-2">
37
39
  <i class="fas fa-terminal text-primary"></i> CLI Power Tools
38
40
  </h2>
39
- <div class="glass-panel overflow-hidden">
40
- <table class="w-full text-left border-collapse">
41
- <thead class="bg-primary/5 border-b border-white/10">
41
+
42
+ <!-- Desktop Table View -->
43
+ <div class="hidden md:block glass-panel overflow-hidden">
44
+ <table class="w-full text-left border-collapse text-sm">
45
+ <thead class="bg-primary/5 border-b border-white/10 text-xs font-black uppercase text-slate-400">
42
46
  <tr>
43
- <th class="px-6 py-4 text-xs font-black uppercase text-slate-400">Command</th>
44
- <th class="px-6 py-4 text-xs font-black uppercase text-slate-400">Action</th>
47
+ <th class="px-6 py-4">Command</th>
48
+ <th class="px-6 py-4">Detailed Description</th>
45
49
  </tr>
46
50
  </thead>
47
51
  <tbody class="divide-y divide-white/5">
52
+ <tr class="bg-slate-500/5"><td colspan="2" class="px-6 py-2 text-[10px] font-black uppercase tracking-tighter text-slate-400">Project Lifecycle</td></tr>
48
53
  <tr>
49
- <td class="px-6 py-4 font-mono text-sm text-primary">./ofa init</td>
50
- <td class="px-6 py-4 text-slate-600 dark:text-slate-400">Initializes the project environment and DB.</td>
54
+ <td class="px-6 py-4 font-mono text-primary">./ofa new NAME [TYPE]</td>
55
+ <td class="px-6 py-4 text-slate-600 dark:text-slate-400">Create a new project. Generates structure and runs bundle install automatically.</td>
51
56
  </tr>
52
57
  <tr>
53
- <td class="px-6 py-4 font-mono text-sm text-primary">./ofa run</td>
54
- <td class="px-6 py-4 text-slate-600 dark:text-slate-400">Starts the Eksa development server.</td>
58
+ <td class="px-6 py-4 font-mono text-primary">./ofa init [TYPE]</td>
59
+ <td class="px-6 py-4 text-slate-600 dark:text-slate-400">Initialize in current folder via interactive wizard for DB & Cloudinary.</td>
55
60
  </tr>
56
61
  <tr>
57
- <td class="px-6 py-4 font-mono text-sm text-primary">./ofa g controller [name]</td>
58
- <td class="px-6 py-4 text-slate-600 dark:text-slate-400">Generates a new controller in app/controllers.</td>
62
+ <td class="px-6 py-4 font-mono text-primary">./ofa run</td>
63
+ <td class="px-6 py-4 text-slate-600 dark:text-slate-400">Starts the high-performance Eksa Server on port 3000.</td>
59
64
  </tr>
60
65
  <tr>
61
- <td class="px-6 py-4 font-mono text-sm text-primary">./ofa theme [light|dark]</td>
62
- <td class="px-6 py-4 text-slate-600 dark:text-slate-400">Instantly toggles between UI themes.</td>
66
+ <td class="px-6 py-4 font-mono text-primary">./ofa deploy</td>
67
+ <td class="px-6 py-4 text-slate-600 dark:text-slate-400 text-xs italic">Railway/Docker/Git auto-detection for production.</td>
68
+ </tr>
69
+
70
+ <tr class="bg-slate-500/5"><td colspan="2" class="px-6 py-2 text-[10px] font-black uppercase tracking-tighter text-slate-400">Generators (Scaffolding)</td></tr>
71
+ <tr>
72
+ <td class="px-6 py-4 font-mono text-primary">./ofa g controller NAME</td>
73
+ <td class="px-6 py-4 text-slate-600 dark:text-slate-400">Generates <code>app/controllers/{name}_controller.rb</code>.</td>
74
+ </tr>
75
+ <tr>
76
+ <td class="px-6 py-4 font-mono text-primary">./ofa g model NAME</td>
77
+ <td class="px-6 py-4 text-slate-600 dark:text-slate-400">Creates model & migration linked to Sequel/NoSQL.</td>
78
+ </tr>
79
+ <tr>
80
+ <td class="px-6 py-4 font-mono text-primary">./ofa g migration NAME</td>
81
+ <td class="px-6 py-4 text-slate-600 dark:text-slate-400">Creates timestamped migration in <code>db/migrations/</code>.</td>
82
+ </tr>
83
+
84
+ <tr class="bg-slate-500/5"><td colspan="2" class="px-6 py-2 text-[10px] font-black uppercase tracking-tighter text-slate-400">Customization</td></tr>
85
+ <tr>
86
+ <td class="px-6 py-4 font-mono text-primary">./ofa theme NAME</td>
87
+ <td class="px-6 py-4 text-slate-600 dark:text-slate-400 text-xs">Switch UI: light_glass, dark_glass, cyber_sidebar, light_sidebar, retro_terminal.</td>
88
+ </tr>
89
+ <tr>
90
+ <td class="px-6 py-4 font-mono text-primary">./ofa type NAME</td>
91
+ <td class="px-6 py-4 text-slate-600 dark:text-slate-400 text-xs">Change mode: portfolio, blog, landing_page, e_commerce.</td>
92
+ </tr>
93
+ <tr>
94
+ <td class="px-6 py-4 font-mono text-primary">./ofa storage NAME</td>
95
+ <td class="px-6 py-4 text-slate-600 dark:text-slate-400 text-xs">Hot-swap storage: <code>local</code> or <code>cloudinary</code>.</td>
63
96
  </tr>
64
97
  </tbody>
65
98
  </table>
66
99
  </div>
100
+
101
+ <!-- Mobile Card View -->
102
+ <div class="md:hidden space-y-4">
103
+ <div class="glass-panel p-6 space-y-4">
104
+ <h4 class="text-[10px] font-black uppercase tracking-widest text-primary border-b border-white/5 pb-2">Project Lifecycle</h4>
105
+ <div class="space-y-4">
106
+ <div>
107
+ <code class="text-primary font-bold text-xs">./ofa new NAME [TYPE]</code>
108
+ <p class="text-slate-500 text-xs mt-1">Create a new project. Generates structure and runs bundle install automatically.</p>
109
+ </div>
110
+ <div>
111
+ <code class="text-primary font-bold text-xs">./ofa init [TYPE]</code>
112
+ <p class="text-slate-500 text-xs mt-1">Initialize in current folder via interactive wizard for DB & Cloudinary.</p>
113
+ </div>
114
+ <div>
115
+ <code class="text-primary font-bold text-xs">./ofa run</code>
116
+ <p class="text-slate-500 text-xs mt-1">Starts the high-performance Eksa Server on port 3000.</p>
117
+ </div>
118
+ </div>
119
+ </div>
120
+
121
+ <div class="glass-panel p-6 space-y-4">
122
+ <h4 class="text-[10px] font-black uppercase tracking-widest text-primary border-b border-white/5 pb-2">Scaffolding</h4>
123
+ <div class="space-y-4">
124
+ <div>
125
+ <code class="text-primary font-bold text-xs">./ofa g controller NAME</code>
126
+ <p class="text-slate-500 text-xs mt-1">Generates <code>app/controllers/{name}_controller.rb</code>.</p>
127
+ </div>
128
+ <div>
129
+ <code class="text-primary font-bold text-xs">./ofa g model NAME</code>
130
+ <p class="text-slate-500 text-xs mt-1">Creates model & migration linked to Sequel/NoSQL.</p>
131
+ </div>
132
+ </div>
133
+ </div>
134
+
135
+ <div class="glass-panel p-6 space-y-4">
136
+ <h4 class="text-[10px] font-black uppercase tracking-widest text-primary border-b border-white/5 pb-2">Customization</h4>
137
+ <div class="space-y-4">
138
+ <div>
139
+ <code class="text-primary font-bold text-xs">./ofa theme NAME</code>
140
+ <p class="text-slate-500 text-xs mt-1">Switch UI: light_glass, dark_glass, cyber_sidebar, light_sidebar, retro_terminal.</p>
141
+ </div>
142
+ <div>
143
+ <code class="text-primary font-bold text-xs">./ofa type NAME</code>
144
+ <p class="text-slate-500 text-xs mt-1">Change mode: portfolio, blog, landing_page, e_commerce.</p>
145
+ </div>
146
+ </div>
147
+ </div>
148
+ </div>
67
149
  </section>
68
150
 
69
151
  <!-- Structure -->
@@ -71,22 +153,32 @@
71
153
  <h2 class="text-3xl font-black tracking-tight mb-6 flex items-center gap-3">
72
154
  <i class="fas fa-folder-tree text-primary"></i> Project Structure
73
155
  </h2>
74
- <div class="space-y-4">
75
- <div class="p-4 bg-slate-900 rounded-2xl font-mono text-sm text-blue-400 overflow-x-auto">
156
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
157
+ <div>
158
+ <p class="text-slate-600 dark:text-slate-400 mb-4 text-sm">OFA follows a strict MVC pattern to keep your code organized and maintainable as your project grows.</p>
159
+ <ul class="space-y-2 text-xs">
160
+ <li><strong class="text-primary uppercase tracking-widest font-black text-[10px]">/app</strong>: Core logic, models, and UI templates.</li>
161
+ <li><strong class="text-primary uppercase tracking-widest font-black text-[10px]">/config</strong>: Routing and application features.</li>
162
+ <li><strong class="text-primary uppercase tracking-widest font-black text-[10px]">/db</strong>: Migrations and data store.</li>
163
+ <li><strong class="text-primary uppercase tracking-widest font-black text-[10px]">/public</strong>: Optimized assets (CSS/JS).</li>
164
+ </ul>
165
+ </div>
166
+ <div class="p-4 bg-slate-900 rounded-2xl font-mono text-[11px] text-blue-400 overflow-x-auto border border-white/5">
76
167
  <pre>
77
168
  /app
78
- /controllers # Logic handlers
79
- /models # Database entities
80
- /views # ERB templates
169
+ /controllers # Controllers
170
+ /models # Models (Sequel/NoSQL)
171
+ /views # Views (ERB)
81
172
  /config
82
- /database.rb # DB connections
83
- /routes.rb # URL mapping
173
+ /routes.rb # URL Mapping
174
+ /features.json # Feature Management
175
+ /db
176
+ /migrations # Schema Evolution
84
177
  /public
85
- /images # Static assets
86
- /css # Custom styles
178
+ /images # Multimedia
179
+ /css # Tailwind/Custom
87
180
  </pre>
88
181
  </div>
89
- <p class="text-slate-500 text-sm">Most of your work will happen inside the <code>/app</code> directory following the standard MVC pattern.</p>
90
182
  </div>
91
183
  </section>
92
184
 
@@ -124,6 +216,58 @@ resources :posts
124
216
  <p>Authentication is handled via BCrypt hashing with an 8-hour session sliding expiration window for optimal security.</p>
125
217
  </div>
126
218
  </section>
219
+
220
+ <!-- E-Commerce -->
221
+ <section id="ecommerce" class="space-y-6 text-left">
222
+ <h2 class="text-3xl font-black tracking-tight flex items-center gap-3 ml-2">
223
+ <i class="fas fa-shopping-bag text-primary"></i> E-Commerce Module
224
+ </h2>
225
+ <div class="glass-panel p-8">
226
+ <p class="text-slate-600 dark:text-slate-400 mb-6">Version 3.0.0 introduces a full-featured e-commerce system. Activate it with a single command:</p>
227
+ <div class="p-4 bg-slate-900 rounded-2xl font-mono text-sm text-green-400 mb-6">
228
+ ./ofa type e_commerce
229
+ </div>
230
+ <ul class="space-y-3">
231
+ <li class="flex items-start gap-3">
232
+ <i class="fas fa-check-circle text-primary mt-1"></i>
233
+ <div><strong class="text-slate-700 dark:text-white">Shopping Cart:</strong> Fully functional cart with real-time quantity updates and session persistence.</div>
234
+ </li>
235
+ <li class="flex items-start gap-3">
236
+ <i class="fas fa-check-circle text-primary mt-1"></i>
237
+ <div><strong class="text-slate-700 dark:text-white">Product CMS:</strong> Dedicated management interface for products, inventory, and categories.</div>
238
+ </li>
239
+ <li class="flex items-start gap-3">
240
+ <i class="fas fa-check-circle text-primary mt-1"></i>
241
+ <div><strong class="text-slate-700 dark:text-white">Mobile Optimized:</strong> 100% responsive checkout and product listing pages.</div>
242
+ </li>
243
+ </ul>
244
+ </div>
245
+ </section>
246
+
247
+ <!-- Deployment -->
248
+ <section id="deploy" class="glass-panel p-8 md:p-12 text-left border-primary/20">
249
+ <h2 class="text-3xl font-black tracking-tight mb-6 flex items-center gap-3">
250
+ <i class="fas fa-rocket text-primary"></i> Deployment Guide
251
+ </h2>
252
+ <div class="space-y-8">
253
+ <div>
254
+ <h4 class="font-bold text-lg mb-2">1. Railway (Recommended)</h4>
255
+ <p class="text-slate-500 text-sm mb-4">Run <code>./ofa deploy</code>. The CLI will automatically detect your project and push it to Railway using the included Procfile.</p>
256
+ </div>
257
+ <div>
258
+ <h4 class="font-bold text-lg mb-2">2. Docker Support</h4>
259
+ <p class="text-slate-500 text-sm mb-4">Use the provided <code>Dockerfile</code> for containerized hosting on any cloud provider.</p>
260
+ <div class="p-4 bg-slate-900 rounded-2xl font-mono text-xs text-slate-400">
261
+ docker build -t ofa-app .<br>
262
+ docker run -p 3000:3000 ofa-app
263
+ </div>
264
+ </div>
265
+ <div>
266
+ <h4 class="font-bold text-lg mb-2">3. VPS Deployment</h4>
267
+ <p class="text-slate-500 text-sm mb-4">On a raw Linux server, use PM2 to manage the process and Nginx as a reverse proxy.</p>
268
+ </div>
269
+ </div>
270
+ </section>
127
271
  </div>
128
272
  </div>
129
273
  </div>
@@ -132,9 +276,17 @@ resources :posts
132
276
  document.querySelectorAll('a[href^="#"]').forEach(anchor => {
133
277
  anchor.addEventListener('click', function (e) {
134
278
  e.preventDefault();
135
- document.querySelector(this.getAttribute('href')).scrollIntoView({
136
- behavior: 'smooth'
137
- });
279
+ const target = document.querySelector(this.getAttribute('href'));
280
+ if (target) {
281
+ const headerOffset = 100;
282
+ const elementPosition = target.getBoundingClientRect().top;
283
+ const offsetPosition = elementPosition + window.pageYOffset - headerOffset;
284
+
285
+ window.scrollTo({
286
+ top: offsetPosition,
287
+ behavior: 'smooth'
288
+ });
289
+ }
138
290
  });
139
291
  });
140
292
  </script>
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 1.0.0
3
+ Framework Version 3.0.0
4
4
  </div>
5
5
 
6
6
  <h1 class="text-5xl md:text-7xl font-black tracking-tight leading-tight">