Phpy
Small & efficient component-oriented file-based framework for rapid prototyping with PHP
Install / Use
/learn @mrcrypster/PhpyREADME
PHPy2
PHPy is built for prototyping web apps, focusing on delivering apps to end-users in as little time as possible. Creating prototypes is different from (re)building apps based on known requirements. Prototyping means not only testing ideas, but delivering changes fast in situation of rapid evolution.
<?php return [
'h1' => 'Hi',
'p.text' => 'This is paragraph',
'ul#list' => [
['li' => 'First item'],
['li' => 'Second item']
],
'form:/signup' => [
'input:email' => 'test@example.com',
'select:type' => [
1 => 'Personal',
2 => 'Business'
],
'submit' => 'Sign up',
],
'a:/home' => ['Return home', ':rel' => 'nofollow']
];
Concepts
- Use native language features.
- Do not use big frameworks & libs.
- The less code the better.
- Use little or no third-party dependencies.
- Organize endpoints based on files.
- Move code a lot accross app.
- Keep files small, split and nest big files.
- Self-explanatory code instead of comments.
Features
- PHP-based markup.
- File based actions router.
- Simplified syntax for most HTML elements.
- Nest actions inside other actions.
- Render directly to DOM elements from JS.
- Create custom markup elements.
- Client-server Pub/sub queue
- Custom endpoints handlers
- Integrated boilerplate CSS
Quick start
git clone https://github.com/mrcrypster/phpy.git
php phpy/phpy.php init /path/to/newapp
And continue with the <a href="https://phpy.dev/guide">Building Web App Guide</a> or <a href="https://phpy.dev/docs">PHPy Reference</a>.
Contribute
This is a repository with prebuilt code. Sources and tests are available in phpy-src repo.
Related Skills
node-connect
347.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.6kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
