naufkia / kyaaaa-php
Kyaaaa Weird PHP Framework
v2.0.1
2026-10-30 07:09 UTC
Requires
- php: ^8.3
- ext-fileinfo: *
- ext-json: *
- ext-mbstring: *
- ext-pdo: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-30 07:10:05 UTC
README
Kyaaaa-PHP
Lightweight PHP Framework
Requires PHP 8.3 or newer with the pdo, mbstring, fileinfo and json extensions.
Directory Structure :
| Directory | Description |
|---|---|
core |
App Directory |
core/Conf |
Configuration Directory |
core/Controllers |
Controllers Directory |
core/Models |
Models Directory |
core/Views |
Views Directory |
public |
Public Directory |
tests |
Smoke tests |
Installation
composer create-project naufkia/kyaaaa-php:dev-maincp .env.example .envand fill in your settings (APP_ENV=developmenton your own machine)php kyaaaa(options:--host=localhost --port=5555)- Open
http://localhost:5555on your browser.
Run the checks with composer test (or php tests/smoke.php).
Security notes
- Point the web server's document root to
public/. Never to the project root. Nginx:root /path/to/project/public; location / { try_files $uri /index.php$is_args$args; }andlocation ~ \.php$ { fastcgi_pass ...; }only for/index.php. - Keep secrets in
.env(git-ignored), not incore/Conf/*.php. - Without
APP_ENV=developmentthe app runs in production mode: generic error pages, details only in the PHP error log. - Set
APP_URL(and ideallyAPP_ALLOWED_HOSTS) in production so links never depend on the visitor'sHostheader. - Set
TRUST_PROXY=trueonly behind a trusted reverse proxy / CDN. - Query builder: values are always bound parameters, identifiers are validated.
selectRaw()andraw()are the only unsafe entry points, never give them user input (pass values toraw()through its$bindingsargument). - Output: escape with
esc($value)in views.url(), forms and redirects are already safe. - State changing routes:
$router->post('/x', ...)->csrf();and<?= csrf()->field() ?>in the form (AJAX: sendcsrf()->metaTag()'s token as theX-CSRF-Tokenheader). - Call
session()->regenerate()right after login / logout. - Uploads:
request()->validate()checks the real MIME type,request()->move()refuses executable extensions, path traversal and overwriting. SVG files can contain scripts, only accept them from trusted users.
Documentation
The project includes documentation. Just run it once to get started!