viewi/viewi

Powerful tool for building progressive and completely reactive web applications

Maintainers

Details

github.com/viewi/viewi

Source

Issues

Fund package maintenance!
www.buymeacoffee.com/ivan.v

Installs: 1 270

Dependents: 3

Suggesters: 0

Security: 0

Stars: 561

Watchers: 16

Forks: 24

Open Issues: 1

Language:JavaScript


README

Stand With Ukraine

Viewi

Viewi V2

Unique and efficient front-end framework for PHP

Click here for Viewi v1

UI framework for PHP with reactivity on the front end and efficient SSR.

Viewi is not about avoiding javascript, it's about integrating them both for mutual benefits.

Front-end framework designed for PHP.

How? - by transpiring PHP/HTML code into javascript to fuel the front-end.

Transpiling works with a limited subset of PHP (not everything can be converted into JavaScript), but even then, it is still more than enough for building advanced web applications. And if you need more custom JS - there is a way to inject it.

Viewi takes your PHP components and converts them into JavaScript.

The flow:

  • The user opens the URL in the browser.
  • Viewi generates SEO-friendly HTML pages based on your components.
  • The browser receives an HTML page with Viewi scripts included.
  • Viewi JS framework runs a hydration process (creates events, makes page alive and reactive, as any other JS framework would).
  • From now on users can interact with the page without requesting new content from the server.
  • When navigating by clicking on links Viewi JS will render the page without making a request to your server using front-end routing.
  • API data can be requested with a built-in HTTP Client.

Documentation

https://viewi.net/docs

Discussions (Forum)

Testing

Run tests

All tests:

php vendor/bin/codecept run

Unit tests:

php vendor/bin/codecept run Unit

Specific test:

php vendor/bin/codecept run Unit JsTranspilerTest

Create test

php vendor/bin/codecept generate:test Unit JsTranspiler

Support

We all have full-time jobs and dedicate our free time to this project, and we would appreciate Your help of any kind. If you like what we are creating here and want us to spend more time on this, please consider supporting:

  • Give us a star⭐.
  • Support me on buymeacoffee
  • Follow us on Twitter.
  • Contribute by sending pull requests.
  • Any other ideas or proposals? Please mail me voitovych.ivan.v@gmail.com.
  • Feel welcome to share this project with your friends.

License

Copyright (c) 2020-present Ivan Voitovych

Please see MIT for license text