Skip to content
viewiPublic

About

Unique and efficient front-end framework for PHP

Topics

Resources

Stars

608 stars

Watchers

15 watching

Forks

Latest commit

 

History

756 Commits

Folders and files

Repository files navigation

Stand With Ukraine

Viewi

Viewi

Unique and efficient front-end framework for PHP

Examples

<div>
    <Thumbnail blog="$blog" />
    <a href="{$blog->url}">
        <h3>{$blog->title}</h3>
        <p>{$blog->description}</p>
    </a>
    <LikeButton liked="{$blog->favorite}" (click)="like" />
</div>
class Blog extends BaseComponent
{
    public BlogModel $blog;

    public function like()
    {
        $this->blog->favorite = !$this->blog->favorite;
    }
}

Blog

Discover more at https://viewi.net.

Documentation

https://viewi.net/docs

Discussions (Forum)

PHP functions in the browser: every PHP function a component can call, and how closely its browser version matches PHP.

Editor support

VS Code extension: Viewi Components (source). Highlighting and autocomplete in templates, Go to Definition for components, props and global methods.

In production

Urlicer is branded short links, QR codes, team workspaces and click analytics. It runs its entire frontend on Viewi: server-rendered PHP components hydrated in the browser, with no JavaScript framework. Built and maintained by Viewi's author.

Testing

Run tests

Unit tests, including the PHP↔JS parity suite (needs node on the PATH):

composer test

All tests:

php vendor/bin/codecept run

Unit tests:

php vendor/bin/codecept run Unit

Specific test:

php vendor/bin/codecept run Unit JsTranspilerTest

After adding or changing a JS port in src/Viewi/PhpJsFunctions, add its cases to tests/Support/Data/parity/ and regenerate FUNCTIONS.md:

composer functions-doc

Create test

php vendor/bin/codecept generate:test Unit JsTranspiler

Support

Viewi is built in our free time. If you like it, here is how you can help:

  • Give us a star⭐.
  • Follow us on X.
  • Contribute by sending pull requests.
  • Any other ideas or proposals? Please mail me contact@viewi.net.
  • Feel welcome to share this project with your friends.

License

Copyright (c) 2020-present Ivan Voitovych

Please see MIT for license text

About

Unique and efficient front-end framework for PHP

Topics

Resources

Stars

608 stars

Watchers

15 watching

Forks

Releases

Used by

Contributors

Languages