We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Create custom App for OnionOS



  • Hi Community,

    I was wondering how to create custom apps for OnionOS. Except for some dead links here (https://onion.io/the-onion-app-sdk-is-here/), I haven't found any kind of documentation. I'd like to create a simple administration app on a browser available GUI. I'd like to use the OnionOS environnement. Else I'd have to build a full server in Django or something (don't know if Django even runs on the Omega).

    Thanks,

    MK



  • @MK Im not aware of any docmentation, could be wrong, but you can look at the source to ne of the existing apps on Github. Here's the source for the RFID app:

    https://github.com/OnionIoT/OOS-App-RFID/tree/master/Console-App-RFID



  • I actually figured this out about a month ago.

    1. Create web application. You can use vanillajs or any framework of your preferrence (react, vue, svelte, angular, etc).

    2. Make a production build of your project (dist files/static files).

    3. Make an app.json file, add it to the root of your project and use the following structure:

    {
      "id": "whack-a-mole-game",
      "name": "Whack A Mole",
      "icon": "imgs/mole.png",
      "description": "A Whack A Mole web game"
    }
    

    4. Drop your project folder (the production build) to /www/apps/. Also, I usually renamed it with the prefix oos-app-, I didn't look too much into it, so I can't tell if it's necessary or not to recognize the app.

    It is possible to run django on the omega, as the omega can run python 2 & 3.

    It is also possible to implement a webserver in your custom application. You just need to understand that the way custom applications are displayed is due to an HTML component called <iframe> which fetches and runs embedded web applications retrieved from the provided src attribute.

    Hint: The src component can be a server endpoint which serves static files. I have never tried it, but I'm almost positive it should work.

    Working Example



  • @SUPERMARINE98 Great! Thanks for this nice description!



Looks like your connection to Community was lost, please wait while we try to reconnect.