OFA Framework Logo

⚡ One-For-All (OFA) Framework

Ruby Version License Framework

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 provides a production-ready foundation with a stunning "Glassmorphism" UI out of the box.


✨ Why One-For-All?

  • 💎 Premium Aesthetics: Beautiful Glassmorphism design system included by default with smooth dark/light mode transitions.
  • 🚀 Blazing Fast: Built on a modular Nio4r-powered engine for minimal overhead and instant boot times.
  • 📂 Multi-Database: Seamlessly switch between SQLite, MySQL, MariaDB, and MongoDB Atlas.
  • 🛠️ Developer First: A robust CLI (ofa) that handles everything from scaffolding to deployment.
  • 🔐 Enterprise Ready: Built-in CSRF protection, secure session management, and input validation.
  • 🌐 Global Support: Multi-language (I18n) support and SEO optimization ready.

🚀 Getting Started

1. Prerequisites

Ensure you have Ruby 3.0+ and Bundler installed on your system.

2. Installation

Clone the repository and install dependencies:

git clone https://github.com/ishikawauta/one-for-all-framework.git
cd one-for-all-framework
bundle install

3. Quick Initialization

Initialize your project environment and database:

./ofa init

The interactive wizard will help you configure your database and cloud storage (Cloudinary).

4. Run the Engine

Launch your development server:

./ofa run

Your app is now live at http://localhost:3000


🛠️ CLI Power Tools

The ofa CLI is your best friend. Use it to manage your entire application lifecycle:

Project Management

Command Description
ofa new NAME [TYPE] Create a new project with automatic bundle install.
ofa init [TYPE] Initialize project in current folder with interactive wizard.
ofa run Start the high-performance development server.
ofa deploy Deploy project to production (Railway/Docker ready).

Generators (Scaffolding)

Command Description
ofa g controller NAME Generate a RESTful controller in app/controllers.
ofa g model NAME Generate a database model and migration.
ofa g migration NAME Generate a new database migration file.
ofa g post TITLE Create a new Markdown post (Supports --category, --author).

Configuration & Features

Command Description
ofa type [TYPE] Set app type: portfolio, blog, or landing_page.
ofa theme [THEME] Set UI theme: light_glass, dark_glass, cyber_sidebar, etc.
ofa feature enable [F] Toggle features like cms or auth.
`ofa storage [local\ cloudinary]`
ofa reset-password USR PWD Reset or create admin account credentials.

Database Management

Command Description
ofa db switch [ADAPTER] Switch DB: sqlite, mysql, postgres, mongodb.
ofa db migrate Run all pending database migrations.

🏗️ Architecture

OFA follows a strict MVC (Model-View-Controller) pattern:

  • Models: Powered by Sequel for SQL and Mongo Ruby Driver for NoSQL.
  • Views: High-performance ERB templates with a modular design system.
  • Controllers: Lightweight logic handlers with built-in validation helpers.
  • Middleware: Custom authentication and session sliding expiration (8-hour default).

🚢 Deployment

One-For-All is optimized for modern cloud platforms:

  • Railway / Heroku: Uses the included Procfile for automatic detection.
  • Docker: A lightweight Dockerfile based on ruby:3.2-slim is provided.
  • VPS: Can be run behind Nginx/Apache using the ofa run command.

🤝 Contributing

We welcome contributions! Please feel free to submit Pull Requests or report issues on the GitHub repository.

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.