Directory Structure
/ # Whizzybase root
|-- apps/ # Installed apps (each app is sandboxed)
| |-- attendance/ # app folder (example)
| |-- apis/ # app API endpoints (prefer route-driven)
| | └── attendance.php
| |-- config/
| | ├── settings.json
| | ├── permissions.json
| | └── routes.php # optional route->controller map
| |-- files/ # app static pages/templates
| | └── index.php
| |-- media/ # app specific media
| |-- functions/
| | ├── local/ # app private functions
| | └── global/ # functions to register to global scope (explicit)
| |-- init.php # app bootstrap (register hooks, routes)
| |-- manifest.json # canonical app manifest (metadata + entrypoints)
| └-- README.md
|
|-- plugins/ # Plugins extend platform (UI, auth, integrations)
| |-- plugin-mailer/
| | |-- src/
| | |-- manifest.json
| | └-- init.php
| └-- plugin-oauth/
|
|-- framework/ # Databridge + Phantom core code (framework logic)
| |-- cli/
| |-- data_seeds/
| |-- db_ops/
| | └── db_pdo.php
| |-- functions/
| | ├── bootstrap.php
| | ├── databridge.php
| | └── user_functions.php
| |-- migrations/
| |-- preprocessors/ # sanitize, validate
| |-- postprocessors/ # logging, notifications
| └-- loaders/ # autoloaders & module loader
|
|-- global_functions/ # Whizzybase-provided helpers (registered explicitly)
| |-- mailer/
| |-- notification_engine.php
|
|-- system/ # UI templates & shared frontend assets
| |-- ui/
| | ├── css/
| | └── js/
| └-- templates/
|
|-- cron_jobs/ # scheduled job definitions (cron wrappers)
|
|-- storage/ # persistent platform storage (uploads, cache)
| |-- uploads/
| |-- cache/
| |-- logs/
| └-- tmp/
|
|-- devops/ # CI, deployment, docker, seeds, backups
| |-- docker/
| |-- ci/
| └-- backup-scripts/
|
|-- public/ # web root (served by web server)
| |-- index.php
| |-- assets/ # compiled css/js/images
| └-- .htaccess
|
|-- config/ # platform-wide config & environment
| |-- config.php # loads env variables (.env recommended)
| └-- permissions/ # global role definitions
|
|-- tests/ # automated tests (unit/integration)
|
|-- scripts/ # admin scripts (install, upgrade, user import)
| ├-- install.php
| ├-- upgrade.php
| └-- seed.php
|
|-- .env.example
|-- composer.json # optional: for php dependencies & autoload (PSR-4)
|-- README.md
|-- changelog.md
Note: This is the Whizzybase root layout. Each app is sandboxed under
apps/, framework code lives in framework/, and public/ is the web server root. Modify files and folders to match your deployment, and keep manifests and init/bootstrap files consistent so apps/plugins can register hooks and routes.