vikry / nsy
Simple. Layered. Harmony in MVC and HMVC.
Requires
- fakerphp/faker: ^1.16
- josantonius/cookie: ^2.0
- josantonius/json: ^2.0
- josantonius/session: ^2.0
- lablnet/encryption: ^1.0
- nesbot/carbon: ^2.53.1
- optimus/onion: ~1.0
- php-curl-class/php-curl-class: ^9.5
- rakit/validation: ^1.4
- symfony/html-sanitizer: ^6.1
- voku/anti-xss: ^4.1
Requires (Dev)
- phpunit/phpunit: ^9
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-28 09:59:17 UTC
README
Simple. Layered. Harmony in MVC and HMVC.
Site: https://nsyframework.com/ · Docs: OVERVIEW · Libraries · Load & Asset · Helpers · Router · Migration · Model
Codename
Current Release Codename: Gamelan
Inspired by the traditional Indonesian ensemble, Gamelan represents harmony, modularity, and synchronized execution. Just as each instrument in a Gamelan orchestra plays a precise role to create a rich rhythm, NSY brings together lightweight core components and flexible modules (HMVC) into a unified, harmonious workflow.
(Note: Codename evolves with major version releases to honor Indonesian cultural heritage).
Features
- MVC & HMVC with Razr templates
- PSR-4 Autoloading + NSY CLI (
nsy make:*,nsy run:migrate) - Asset Manager (
Add::link/script/meta) with?v=filemtimecache-busting - Unified DB (
NSY_DB::connect) + powerful Migrations (DRY, quoted identifiers)
Requirements
- PHP >= 8.1, Composer, MySQL/MariaDB/PostgreSQL/SQL Server (optional)
Quick Start
composer create-project kazuyamarino/nsy my-app
cd my-app
cp docs/env.example/env.example.php env.php
composer dump-autoload -o
nsy --setup
Configuration
env.php—APP_ENV,PUBLIC_DIR,SITE_TITLE,CSRF_TOKEN,DB_*(seedocs/env.example/env.example.php)System/Config/App.php&Site.php— env-aware withconfig_env() ?? fallback(no file edit in production)System/Config/Mimes.php— 182 mime types (modern: webp, avif, woff2, wasm)
Documentation
- Overview — Composer, Config, Helpers, Routes, MVC/HMVC, Assets, PSR-4, CLI
- Deploy to Shared Hosting —
System/outsidepublic_html, writable dirs,mod_rewrite/AllowOverride - Libraries — File, LanguageCode, LoadTime, Request, Validate
- Load & Asset Manager —
Load::view/template/model&Add::(?v=filemtime) - Helpers Global —
base_url(),is_filled(),css_url()etc. - CodeIgniter Helpers —
stringify_attributes(),directory_map()etc. - Router —
Route::get/post/group, middleware - Security Middleware — CSRF, XSS, rate-limit
- Migration —
Mig::createTable(),quoteIdent/execDDL(DRY) - Model & DB —
DB::query(),NSY_DB::connect()unified - Query Builder —
qb('users')->whereIn()->paginate()— minimal lines
License
MIT — see LICENSE.txt