ozi / ozi_script
Ozi script is an easy-to-use web development framework that handles both front-end and back-end web development. It uses a component-based concept, meaning that everything in Ozi script is a component, and a component is a method or function created to handle a specific task.
Requires
- php: >=8.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-27 04:46:01 UTC
README
oziScript is a modern, component-based PHP framework designed for building high-performance PWAs and Hybrid Apps with a "No-Script" philosophy. Build beautiful, functional experiences by simply composing reusable widgets—no deep PHP or CSS knowledge required.
✨ Key Features
- 🧩 Function-Based Components: Build your UI using simple PHP functions (Widgets).
- 🌐 Native PWA Support: Out-of-the-box service workers, manifest, and offline support.
- 🛣️ Pretty URLs: Clean, path-based routing (e.g.,
/about/id/1) built-in. - 📦 Remote Ecosystem: Install widgets and plugins directly from the oziDependencies repository.
- 🛠️ Powerful CLI: Manage your entire app life cycle with the
ozicommand-line tool. - 🚀 Native Device Bridge: One JS API (
OziDevice) across Web, PWA, Electron, Capacitor, and native Android WebView. - 📡 JSON API Layer: Expose your cores as raw JSON endpoints (
/api/...) for native apps and scripts. - 🏗️ Real Native Builds:
php ozi build apk/iosactually scaffolds Android/iOS targets, plus Electron for desktop. - 🎨 Premium UI Kit: Standardized, modern widgets (gradient heroes, glass nav) styled with Tailwind CSS out of the box - no build step, no npm.
📥 Installation
1. Requirements
- PHP 8.1+
- Apache with
mod_rewriteenabled (XAMPP/cPanel)
2. Setup
Download and install oziScript via Composer:
composer create-project ozi/ozi_script projectName
cd projectName
3. Serve Locally
Use the built-in development server:
php ozi serve
Your app is now live at http://localhost:3000!
🛠 Command Line Tool (ozi CLI)
The ozi tool is your companion for building apps.
Manage Screens
- Create:
php ozi screen <name> create - Delete:
php ozi screen <name> delete
Manage Widgets
- List Available:
php ozi widget list(Fetches from oziDependencies) - Search:
php ozi widget search <query> - Install:
php ozi widget <name> install - Remove:
php ozi widget <name> remove
Manage Plugins
- Install:
php ozi plugin <name> install(e.g.,php ozi plugin mailer install) - Remove:
php ozi plugin <name> remove
Manage JSON API Endpoints
- Create:
php ozi api <name> create(produces/api/<name>) - Delete:
php ozi api <name> delete
Build for Other Platforms
php ozi build apk https://yoursite.com(Android WebView app, no npm needed)php ozi build ios https://yoursite.com(Capacitor scaffold, needs macOS/Xcode)php ozi build android https://yoursite.com(Capacitor scaffold)php ozi build mac|windows|linux https://yoursite.com(Electron)
Identity, package id and version for every build come from system_files/config/app.php.
Audit Dependencies
php ozi audit(checks installed widgets/plugins againstsystem_files/deps.sha256.json)
📐 Building Your App
1. Functional Navigation
Use the linkTo() helper to generate clean, pretty URLs:
<a href="<?= linkTo("about&&productId=123"); ?>">View Product</a> <!-- Generates: /about/productId/123 -->
2. Composition (No-Code Style)
In oziScript, you don't write complex HTML. You call widgets like Lego blocks in your components/ files:
// components/index.php ozi_nav_simple("My Brand"); ozi_hero_modern( title: "The Future is Now", subTitle: "Composed entirely using Ozi Widgets.", btnText: "Join Now" ); // 3. Using a Plugin (e.g., mailer) // OziMailer("contact@example.com", "Subject"); ozi_footer_clean();
3. Accessing Data
Pretty URL parameters are automatically parsed into the $_GET superglobal:
// URL: /product/id/99 echo $_GET['id']; // Outputs: 99
4. Native Device Features (One Codebase)
Every screen automatically gets a global OziDevice object. Use the same
calls on Web, PWA, Electron, iOS and Android:
<script> OziDevice.getBattery().then(b => console.log(b.level + '%')); OziDevice.vibrate(200); OziDevice.toast("Saved"); OziDevice.store.set("token", "abc").then(() => OziDevice.store.get("token")); OziDevice.share({ title: "My App", url: "https://example.com" }); </script>
5. JSON API for Native Apps
Cores are reusable as raw JSON endpoints reachable by your native screen, AJAX, or any script:
// system_files/api/status.php api_require_method('GET'); api_response(['status' => 'ok', 'version' => ozi_app_config('version')]);
curl https://yoursite.com/api/status
📂 Project Structure
assets/: Media, icons, and local styles.components/: Pure logic/UI functions for your pages.screens/: Route entry points (automatically handled).system_files/: Core libraries, plugins, and installed widgets.system_files/config/app.php: Single app config (name, version, package id, build URL).system_files/libraries/api.php: JSON API layer (api_response,api_input,ApiDispatch).system_files/libraries/device_bridge.php:OziDeviceplatform bridge.system_files/api/: JSON API endpoint cores (/api/<name>).system_files/deps.sha256.json: Integrity manifest for installed widgets/plugins.view.php: Central registry for your screen functions.system_config.php: Global configuration and auto-loading.ui_config.php: this is the app entry poin configurationindex.php: this is the main page rendera that requires the system_configmain.js: the javascript for the users custome settingsoffline.html: this is the offline page that is shown when a user is offline in the appsw.js: this is the service worker configuration file for a PWAcreate_bk_request.php: this is the file that handles the backend request made by users- 'call_bk_request.php` : this is the file tht handles that enables the request sent by create_bk_request
composer.json: this is the composer configuration file- `manifest.json : this is the manifest needed to make a good PWA
ozi: this is the file that handles the shell comands in system_files/labraries/ozi_comands/- `
🌟 Vision
oziScript aims to be the go-to framework for designers and creators. By abstracting complexity into a searchable marketplace of widgets and plugins, we empower anyone to build "App-Store ready" applications using just a few lines of functional code.
📝 License
MIT License. Free for personal and commercial use.
#OziScript #PHP #PWA #NoCode #WebDevelopment #HybridApps
🎥 Tutorials & Learning
Watch our video tutorials to master oziScript: