https://github.com/mrcrypster/phpy
Small & efficient component-oriented file-based framework for rapid prototyping with PHP
https://github.com/mrcrypster/phpy
css fastdevelopment javascript performance php php-framework prototyping
Last synced: about 1 year ago
JSON representation
Small & efficient component-oriented file-based framework for rapid prototyping with PHP
- Host: GitHub
- URL: https://github.com/mrcrypster/phpy
- Owner: mrcrypster
- License: mit
- Created: 2021-06-18T08:25:25.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-01-22T10:01:01.000Z (over 1 year ago)
- Last Synced: 2025-02-25T17:18:34.710Z (over 1 year ago)
- Topics: css, fastdevelopment, javascript, performance, php, php-framework, prototyping
- Language: PHP
- Homepage: https://phpy.dev
- Size: 163 KB
- Stars: 17
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
'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](https://github.com/mrcrypster/cssy-src/tree/main)
## Quick start
```bash
git clone https://github.com/mrcrypster/phpy.git
php phpy/phpy.php init /path/to/newapp
```
And continue with the Building Web App Guide or PHPy Reference.
## Contribute
This is a repository with prebuilt code.
Sources and tests are available in [phpy-src repo](https://github.com/mrcrypster/phpy-src).