dotsystems/dotapp

DotApp PHP framework - a complete, scalable and efficient tool for web applications.

Maintainers

Package info

github.com/dotsystems-sk/DotApp

Homepage

Type:project

pkg:composer/dotsystems/dotapp

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.7.2 2025-08-04 11:53 UTC

This package is not auto-updated.

Last update: 2026-03-01 22:37:42 UTC


README

Full documentation is available at:

https://dotapp.dev/

dotApp is an ultra-fast, powerful, and scalable PHP framework for modern web applications. It stays lean yet handles very large apps, with clean structure that's easy for humans, vibe coders, and AI assistants to read, learn, and build on. Starting with version 1.8, dotApp includes comprehensive AI instructions making it perfectly compatible with advanced AI models like Claude Opus 4.5 and GPT-4.5 Sonnet for flawless code generation. It ships with a built-in Bridge for seamless PHPโ†”JS calls and an ultra-light reactive frontend library, alongside fast routing and templating.

Proudly made in Slovakia ๐Ÿ‡ธ๐Ÿ‡ฐ

๐Ÿ”น Minimal and efficient

๐Ÿ”น PSR-4 autoloading support

๐Ÿ”น Modular architecture

๐Ÿ”น Flexible templating system

๐Ÿ”น AI-optimized codebase - Perfect for Claude Opus 4.5 and GPT-4.5 Sonnet

Currently Working On ๐Ÿ› ๏ธ

Weโ€™re actively developing Connector, a powerful JS and PHP library integrated into the DotApp framework! Watch our testing demo to see how nodes are beautifully connected with mouse-driven logic, showcasing a stunning backend and frontend experience. The JS part is ready, and the PHP part is in progress. Check it out! ๐Ÿš€

Connector Testing Demo

Support DotAppโ€™s development! Be among the first 100 sponsors to earn permanent recognition on dotapp.dev. Sponsor Now

Getting Started

The dotApp instance is globally accessible, and you can work with it through facades for brevity. A few quick routing examples (single path, array of paths, controller strings, static routes):

// Single route
Router::get('/', fn($request) => 'Hello World');

// Multiple paths share the same handler
Router::get(['/', '/home'], fn($request) => 'Welcome!');

// Controller syntax (module:Controller@method)
Router::get('/users/{id}', 'Users:Profile@show');

// Static route (no pattern matching) example
Router::post('/login', 'Users:Login@loginPost', Router::STATIC_ROUTE);

This keeps routes concise while still letting you access other services via facades or DotApp::DotApp() when needed.

What's New โœจ

Version 1.8 Released (NEW โ€“ 2026-01-04)

  • Separated Database Drivers: MySQLi and PDO drivers are now in separate files (DatabaserMysqliDriver.php, DatabaserPdoDriver.php) for better maintainability
  • Custom Database Driver Support: Register your own database drivers using Databaser::customDriver('name', 'DriverClass') for MongoDB, Redis, or any custom database
  • ORM & QueryBuilder Improvements: Fixed bugs, improved stability, and enhanced performance in Object-Relational Mapping and SQL Query Builder
  • Complete ORM & QueryBuilder Testing: Comprehensive test suite covering all Entity, Collection, and QueryBuilder functionality
  • Database Configuration Fixes: Corrected driver naming conventions and configuration examples throughout documentation
  • AI-Friendly Framework: Added comprehensive AI instructions and guides (.cursorrules, ai_database_guide.md) making the framework highly compatible with advanced AI models like Claude Opus 4.5 and GPT-4.5 Sonnet for perfect code generation

Version 1.7.2 Released (2025-12-25)

  • Middleware chaining: Define multiple middlewares at once (arrays), run them as a group(), and react conditionally with when(), true(), false() callbacks.
  • Router + facades polish: Static route flag, array routes, and controller strings (Module:Controller@method) with DI-backed resolution.
  • OTP & QR utilities: TOTP generates Base32 secrets, TOTP codes, and otpauth URIs; QR builds PNG/base64 QR codes with styling options.
  • Email/SMS stack: Emailer (SMTP + IMAP/POP3) with Email facade helpers; Sms facade + SmsProvider interface for send/validate/status.
  • MCP server support: Model Context Protocol server layer with tool/resource/prompt registration and JSON-RPC initialize, tools/list, resources/list, prompts/list, and execution handling.
  • Bug fixes & stability: routing/middleware pipeline tweaks, limiter handling, and DI/resolver robustness.

AI-Friendly Features (1.8+)

  • Comprehensive AI Instructions: Complete .cursorrules file and ai_database_guide.md for perfect AI model compatibility
  • Claude Opus 4.5 & GPT-4.5 Sonnet Ready: Framework designed to work flawlessly with advanced AI models
  • Structured Code Generation: AI can perfectly generate controllers, models, routes, and database operations
  • Self-Documenting Architecture: Clean, readable code structure that AI understands intuitively

Highlights from 1.7

  • Testing with Tester Class: Lightweight unit and integration testing for modules and core.
  • FastSearch Library: Unified search interface for Elasticsearch, OpenSearch, Meilisearch, Algolia, and Typesense.
  • Cache Library: Driver-agnostic caching with file-based and Redis support.
  • Centralized Configuration with Config Facade: Unified configuration management.
  • Session Drivers: Five built-in drivers (Default, File, File2, DB, Redis) for flexible session management.
  • Router Facade: Alias for $dotApp->router.
  • DB Facade: Alias for $dotApp->db.
  • Request Facade: Alias for $dotApp->request.

๐Ÿ‘ฅ Installation

There are three ways to install dotApp:

  1. Using Composer (New!):

    Install dotApp directly into your current directory using Composer:

    composer create-project dotsystems/dotapp ./

    This will download the latest version of dotApp and set up the project structure in your current directory.

  2. Using DotApper CLI (Recommended):

    Obtain the dotapper.php file and run it to install dotApp. You can either:

    • Download it manually: Visit https://install.dotapp.dev/dotapper.php, download the file, and place it in your project directory.

    • Use wget: Run the following command to download dotapper.php directly:

      wget https://install.dotapp.dev/dotapper.php

    Then, execute the installer:

    php dotapper.php --install
  3. Using Git Clone:

    Clone the repository to your project directory:

    git clone https://github.com/dotsystems-sk/dotapp.git ./

โœ… After installation, you can freely use composer require to install additional libraries as needed.

๐Ÿš€ Usage

Simple "Hello World" example using dotApp:

// index.php
define('__ROOTDIR__', "/path/to/your/dotapp");
require_once __ROOTDIR__ . '/app/config.php';

Router::get('/', fn($request) => 'Hello World');

DotApp::DotApp()->run();

Route callbacks receive a locked Request object; you can return a string (it becomes the response body) or work with $request->response if you need full control.

โš™๏ธ Configuration

Main settings are located in app/config.php. Example:

use \Dotsystems\App\DotApp;
use \Dotsystems\App\SessionDriverRedis;
use \Dotsystems\App\Config;

$dotApp = new \Dotsystems\App\DotApp();

// Set encryption key
Config::set("app", "c_enc_key", md5('SECURE_KEY'));

// Configure databases
Config::addDatabase("main", "127.0.0.1", "dotsystems", "dotsystems", "dotsystems", "UTF8", "MYSQL", "mysqli");

// Configure session driver
Config::session("lifetime", 30 * 24 * 3600);
Config::session("redis_host", "127.0.0.1");
Config::session("redis_port", 6379);
Config::session("redis_prefix", "session:");
Config::sessionDriver("redis", SessionDriverRedis::driver());

$dotApp->load_modules();

๐Ÿ› ๏ธ DotApper CLI Tool

DotApper is a command-line utility for managing your dotApp application. Basic usage:

# Install dotApp
php dotapper.php --install

# Update dotApp core
php dotapper.php --update

# Install a module from Git or registry
php dotapper.php --install-module=https://github.com/vendor/module.git

# Create a new module
php dotapper.php --create-module=Blog

# List all routes
php dotapper.php --list-routes

# Regenerate .htaccess
php dotapper.php --create-htaccess

# Run tests
php dotapper.php --test # All tests (core)
php dotapper.php --test-modules # Module tests only
php dotapper.php --module=Blog --test # Tests for Blog module

All Available Options

Usage: php dotapper.php [options]

Options:
  --install                         Install a fresh copy of the dotApp PHP framework
  --update                          Update dotApp core to the latest version
  --create-module=<name>            Create a new module
  --modules                         List all modules
  --install-module=<url|name[:ver]> Install a module (Git URL or name, optional version)
  --prepare-database[=<prefix>]     Prepare database structure (optional table prefix)
  --module=<module_name> --create-controller=<ControllerName>  Create a new controller
  --module=<module_name> --create-middleware=<MiddlewareName>  Create a new middleware
  --module=<module_name> --create-model=<ModelName>            Create a new model
  --list-routes                     List all defined routes
  --list-route=<route>              List callbacks for a specific route (e.g., /)
  --create-htaccess                 Create or recreate a new .htaccess file
  --optimize-modules                Optimize module loading
  --test                            Run all core tests
  --test-modules                    Run all module tests (no core tests)
  --module=<module_name> --test     Run tests for a specific module

๐Ÿงช Version Note

This is the version 1.8 release of dotApp, featuring enhanced AI compatibility with comprehensive instructions for advanced AI models like Claude Opus 4.5 and GPT-4.5 Sonnet.

Older versions may have duplicate function names (lowercase and PascalCase) due to the transition to PascalCase for naming, maintaining backward compatibility. This has minimal impact on performance.

๐Ÿ“š Documentation

Full documentation is available at:

https://dotapp.dev/

๐Ÿ’Ž Contact

๐Ÿ“ง Email: dotapp@dotapp.dev

๐ŸŒ Web: https://dotapp.dev

๐ŸŒ Company Web: https://dotsystems.sk

๐Ÿ“ License

dotApp is licensed under the MIT License. You must retain the author's name in all library headers.

Additional Permission: The Software may be used for training AI models, provided the copyright notice is retained.