Remove redundant documentation and reorganize content to match the project's current structure and constraints. The updated file now aligns with the minimalist philosophy and core constraints while maintaining all essential information in a more concise format.
22 lines
1 KiB
Markdown
22 lines
1 KiB
Markdown
## Philosophy
|
|
Minimal PHP for modern conveniences. Prioritize longevity (decade-scale maintainability) by avoiding volatile dependencies. Strictly add only what's essential—readable, simple, and future-proof.
|
|
|
|
## Core Constraints
|
|
**Minimalism:** Only essential tech (HTML, PHP 8.4+, CSS). No JS, frameworks, build tools, or package managers. Comments only for major sections.
|
|
|
|
**Frontend:**
|
|
- Classless, semantic HTML5
|
|
- Modern CSS: nesting, `oklch()`, grid, `clamp()`, logical props
|
|
- Responsive via fluid typography + flexible layouts
|
|
|
|
**Security:**
|
|
- Path validation blocks traversal
|
|
- Files restricted to document root
|
|
- Strict MIME types + no direct user-input execution
|
|
|
|
## Code Style
|
|
**PHP:** Modern syntax (arrow functions, null coalescing, match). Type hints where practical. Ternary for simple conditionals. Single-purpose functions.
|
|
|
|
**CSS:** Variables, native nesting, grid layouts. `clamp()` over `@media`. Relative units > pixels.
|
|
|
|
**Templates:** Escape output (`htmlspecialchars()` for UGC). Short echo tags (`<?= $var ?>`).
|