Članci s tagom #architecture
-
How I built a PHP framework solo in 18 months: decisions that kept it manageable
18 months building the Shinobi Apps framework solo: zero runtime Composer deps (vendor/ not shipped), 4-prefix autoloader, zero BC policy (framework moves with production needs not arbitrary API stability), addon isolation (CSS/PHP stays in addon folder, not in core), forward-only migrations (no down/rollback), PHPStan level 5 + Psalm taint analysis as global tools. Sustainable for one person = the primary constraint.
-
MCP server architecture: building a remote HTTP MCP for AI tool use
How Shinobi serves MCP over streamable HTTP instead of stdio: one Node process with the dashboard and the /mcp and /mcp/home endpoints, SQLite on a Docker volume, a Cloudflare Tunnel in front, a static bearer token or OAuth for auth, modules that filter the tool list, and the long-lived jobs (plugin schedules, nightly backup, morning brief) that a stdio server could not run. Updated for Shinobi 0.12.1.
-
Decision logging for AI agents: capturing rationale that survives 6 months
Shinobi's log_decision captures architecture, library, pattern and tradeoff decisions with their rationale when they are made. recall finds them later (full-text by default, semantic with an embedding provider), decisions_for_file shows what was decided about a file, update_decision_status moves a decision through its lifecycle, and extract_decisions drafts entries from a transcript. Updated for Shinobi 0.12.1.
-
One PHP codebase, three MySQL servers: per-domain database routing without code changes
How to route a single PHP codebase to different MySQL databases based on HTTP_HOST — without code changes in any model or controller. The full implementation: ConnectionRouter, strict host validation, TLS to remote DBs, and CLI --connection flag.
-
Multi-tenant SaaS in PHP without a multi-tenant framework
Row-level tenancy in PHP using one database, one codebase, and a korisnici_companies table. How currentTenantId() and allowed_modules replaced per-tenant databases and per-tenant codebases — and the two contexts that can never be mixed up.
-
Addons vs modules: the architectural boundary that makes a 60k-line PHP SaaS manageable
How one PHP codebase serves infrastructure monitoring, fiscal invoicing, accounting, and a personal AI assistant without coupling any of them. The addons-vs-modules boundary — what it is, why it matters, and the decision tree I use to decide where new code goes.
-
Inside a PHP framework: 20 subsystems, a 5-stage bootstrap, and a request lifecycle you can read in one sitting
What happens between a browser request hitting Apache and your controller method running? Walk through the Shinobi Apps framework architecture: 5-stage bootstrap, 8-layer middleware pipeline, 20 core subsystems, and a request lifecycle that fits in your head.