Git Product home page Git Product logo

pglet's Introduction

Build status

Pglet - Web UI framework for backend developers

Build web apps like a frontend pro in the language you already know. No knowledge of HTML, CSS or JavaScript required.

What is Pglet

Pglet ("piglet") is a rich user interface (UI) framework for scripts and programs written in any language. Python, Bash, PowerShell and Node.js are already supported and other languages can be easily added via Pglet protocol.

Pglet renders web UI, so you can easily build web apps with your favorite language. Knowledge of HTML/CSS/JavaScript is not required as you build UI with controls. Pglet controls are built with Fluent UI React to ensure your programs look cool and professional.

Hello world in Bash

Install Pglet helper functions:

curl -O https://pglet.io/pglet.sh

Create hello.sh with the following contents:

. pglet.sh
pglet_page
pglet_add "text value='Hello, world!'"

Run sh hello.sh and in a new browser window you'll get:

Here is a page served by a local instance of Pglet server started in the background on your computer.

Now, add PGLET_WEB=true before pglet_page:

. pglet.sh
PGLET_WEB=true pglet_page
pglet_add "text value='Hello, world!'"

and instantly make your app available on the web!

Tutorials

How it works

Pglet UI does not become embedded into your program, but is being served by an out-of-process Pglet server. Application state and control flow logic lives in your persistent-process program while UI changes and events are communicated to Pglet server via IPC-based protocol. It allows writing web app as a standalone monolith without any knowledge of request/response model, routing, templating or state management. Pglet server can be run locally, self-hosted in your local network or used as a hosted service.

In a classic client-server architecture front-end communicates to a one or more back-end services. Pglet implements an opposite approach where multiple back-end services scattered across internal network behind a firewall and communicate to a centralized Pglet web server, i.e. front-end service, installed in DMZ or hosted as a service. This design gives a number of advantages:

  • Secure by design - your internal services and critical data stay behind the firewall and not accessible from the outside world.
  • Apps running next to services and data they process - faster/cheaper access and maximum security.
  • Zero deployment - run apps on any server in your network or your development machine, no need to deploy apps to a web server.

Use cases

  • Progress visualization for CI/CD workflows, batch jobs and cron tasks
  • Admin interfaces for internal services
  • Web dashboards and monitoring
  • Status pages
  • Executive reporting
  • Registration forms and questionnaires
  • Intranet self-service kiosks
  • Prototype and throw-away apps

pglet's People

Contributors

c-nv-s avatar dependabot[bot] avatar feodorfitsner avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.