Download the PHP package dotari/php-app without Composer
On this page you can find all versions of the php package dotari/php-app. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dotari/php-app
More information about dotari/php-app
Files in dotari/php-app
Package php-app
Short Description PHPapp is a lightweight PHP framework designed for quick and efficient web application development. It follows the MVC architecture and provides core components for database interaction, session management, request handling, and more.
License MIT
Informations about the package php-app
PHPapp Framework
PHPapp is a lightweight PHP framework designed for quick and efficient web application development. It follows the MVC (Model-View-Controller) architecture and provides core components for data management, routing, and user interaction.
@and-ri: Hello everyone! I am very excited to share with you a version of my PHP framework. Maybe it is far from such giants as Laravel or Yii, but it has become very convenient for me. Especially for quick prototyping and small applications.
I will be happy for any contribution :)
Features
- MVC Architecture: Clean separation of concerns with models, views, and controllers to organize code logically.
- Core Components: Includes essential libraries for handling sessions, database connections, request processing, and URL routing.
- Secure by Default: Twig auto-escaping, CSRF tokens, hardened sessions, and strict route validation out of the box.
- Modern Frontend Build: Tailwind CSS 4 + daisyUI bundled with Vite, with automatic cache busting.
- Migration System: Built-in system for managing database schema changes and versioning.
- Installer: Interactive installer for quick setup, including
.envgeneration, Composer installation, and database migration execution. - Easy to Install and Configure: Minimal setup required for developers to get started quickly.
Requirements
- PHP 8+
- A web server (e.g., Apache, Nginx)
- MySQL
- Node.js 20+ and npm (only for building frontend assets)
Installation
-
Clone the repository:
-
Navigate to the project directory:
-
Install dependencies and build frontend assets:
-
Run the installer: Open
http://yourdomain.com/installer.phpin your browser and follow the on-screen instructions to set up the database and configuration. - Done! For security, delete
installer.phpfrom thewwwdirectory after installation (it refuses to run again while.envexists, but removing it entirely is safer).
Frontend Assets
Frontend sources live in static/css/style.css and static/js/app.js and are bundled by Vite (Tailwind CSS 4 + daisyUI) into www/assets/:
Templates reference the built assets through $this->staticfile->getAssetUri('css/app.css'), which appends a cache-busting ?v=<timestamp> parameter. The built files in www/assets/ are committed to the repository, so remember to run npm run build before committing frontend changes.
Templating and Security
- Twig auto-escaping is enabled: any variable printed with
{{ ... }}is HTML-escaped. Pass trusted HTML (e.g. output of another controller) through$this->view->raw($html)—Load::controller()already does this for you. - Every form should include the CSRF field with
{{ csrf }}and validate it with$this->session->validateToken($this->request->post['csrf'])(seeapp/controller/catalog/csrf_protection.phpfor a complete example). - Request data (
$this->request->get/post/cookie) is raw. Escape at the output layer: Twig handles HTML, and use$this->db->escape()or$this->db->execute($sql, $params)(prepared statements) for SQL.
Core Components
Classes
- controller.php: Handles application logic, loading views and models.
- model.php: Manages database interactions and data-related operations.
- view.php: Renders views and passes data to the user interface.
Libraries
- app.php: Manages the application lifecycle, including initialization and configuration.
- cache.php: Simple file-based cache with optional TTL (
get,set,delete,deleteAll). - db.php: Provides methods for database queries and connection handling, including prepared statements via
execute(). - env.php: Handles environment variables and configuration settings.
- flash.php: One-time session messages for the POST -> redirect -> GET pattern.
- google_auth.php: Handles the Google authentication process for the application.
- language.php: Loads and manages language files for multi-language support.
- load.php: Loads models and controllers dynamically.
- mail.php: Sends email via SMTP or PHP
mail()using PHPMailer (configured through.env). - pagination.php: Provides simple pagination functionality.
- request.php: Handles incoming HTTP requests.
- response.php: Manages HTTP responses and headers.
- session.php: Facilitates session management (start, get, set, remove, etc.) and CSRF tokens.
- staticfile.php: Serves static files (CSS, JS, images) and generates cache-busted URIs for built assets.
- upload.php: Stores uploaded files safely (finfo MIME check, extension allowlist, random names).
- url.php: Generates URLs and manages routing.
- validator.php: Rule-based input validation (
required|email|min:8|...) with per-field error messages. - log.php: Provides centralized logging functionality using Monolog.
- meta.php: Manages SEO metadata including page titles, descriptions, Open Graph tags, and robots directives using the Melbahja/Seo package.
Migrations
Create a migration by copying migrations/template.php to a new file (e.g. migrations/2026_07_04_create_users.php). A migration returns an anonymous class with up() and down() methods:
Then run:
License
This project is licensed under the MIT License.
All versions of php-app with dependencies
twig/twig Version ^3.9
vlucas/phpdotenv Version ^5.6
google/apiclient Version ^2.0
monolog/monolog Version ^3.9
melbahja/seo Version ^2.1