Coder Social home page Coder Social logo

ledoneo-simple-server's Introduction

Simple screen builder with multi-user data

This is a very simple screen builder with ability for users to live edit content.

This does not have any database and is to be used for very simple purposes.

Install and run

  1. Unzip the demo database in knauf-insulation.zip (it should create a database folder with multiple .json in it)

  2. docker compose up -d

(Alternatively you can also directly run docker compose up, then go to http://localhost:8000/install.php and finally use the import feature inside the application)

Backoffice documentation

What is in the initial database

The initial database contains:

  • 2 screens with different layout
  • 4 different variables input forms (called "Groupes de variables")
  • 5 users (1 for each individual input form and one is the admin, each user's password is the same as the username)

See it in action

  1. Click on "Écrans"
  2. Click on the link looking like /screen.php?id=X
  3. The url you just opened will be the url to use in the screens using for instance this tool https://github.com/RomaricMourgues/simple-electron-display

Update the screen content

  1. Click on any of the first 4 menu items, for instance "Sécurité"
  2. Edit the empty field and put "Incendie"
  3. Press "Envoyer la mise à jour"
  4. The screen will update and display a general message

Users and access restriction

So we saw that there is two sides: the displays "Écrans" and the inputs.

The inputs forms structures are defined by what is in "Groupes de variables".

As admin you can access everything but you'll notice that if you log in as "chargement:chargement" you will only see the chargement input form. This access restrictions are configured in the "Utilisateurs" section.

Use the API (programmatic access) to update variables

With any application that can do POST:

POST http://localhost:8000/api.php
{
    "group": 5,
    "username": "admin",
    "password": "admin",
    "data": {
        "securite_message": "Incendie !"
    }
}

For instance with CURL:

curl -XPOST -H 'content-type: application/json' http://localhost:8000/api.php -d '{"group": 5, "username": "admin", "password": "admin", "data": {"securite_message": "Incendie !"}}'

Update the software

  1. git pull

  2. docker system prune -af --volumes

  3. docker compose up -d --build

Run it as developer

  1. In a terminal cd web/; php -S localhost:8000

  2. Go on localhost:8000, the initial user is admin:admin.

ledoneo-simple-server's People

Contributors

romaricmourgues 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.