Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Pegasus8/piworker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PiWorker

GitHub license

PiWorker is a free and open source tool that let you automate tasks easily on your Raspberry Pi (can be used on other devices too) without letting aside your privacy. In these times where your data is used as a payment on some "free" software/services, I think is good to remark that PiWorker does not use any external server for nothing (unless you explicity add an action to doing it), so everything is executed inside your device, under your control.

I'm working hard to make PiWorker stable and robust, but for now, it's not even an alpha, so there should be bugs everywhere (If you see one, can you let me know it please? that will be really helpful!) so don't use it on a device that contain something that you don't want to lose.


Disclaimer: I am not responsible for the misuse that may be given to this software, whether for legal purposes or not. Use it at your own risk.


Installation:

bash -c "$(curl -sSL https://github.com/Pegasus8/piworker/raw/master/install.sh)"

Installation from source:

  1. Make sure you have golang installed and configured. If not, check this.
  2. Make sure you have nodejs and npm installed. If you don't, install them from here or here (if you use linux maybe the last option will be more easy).
  3. Check if you have git installed. If not (again), get it from here.
  4. Install pkger in your GOPATH running go get github.com/markbates/pkger/cmd/pkger.
  5. Download the source code: git clone https://github.com/Pegasus8/piworker.
  6. Once downloaded, go inside the directory cd piworker/.
  7. Go to the dir of the frontend cd webui/frontend/, install the dependencies npm install, and compile it npm run build.
  8. Go back to the root PiWorker directory cd ../...
  9. Execute pkger to include the frontend inside the binary.
  10. Compile the entire project (output_dir is the path where the executable will be saved): go build -o <output_dir>. In my case, I prefer save the executable on the directory $HOME/piworker/, so I will run the command go build -o $HOME/piworker/. Note: the dir used must exist before the compiling.
  11. Go to the directory where you saved the executable: cd <output_dir>. In my case is $HOME/piworker/, so I execute: cd $HOME/piworker/.
  12. Install the service of P.W. running the following command: sudo ./piworker --service install. Why sudo? Because you need root privileges to add a new service to the system. The service must be installed? No, isn't something essential. If you prefer don't install it, remember that P.W. won't be executed when you reboot the system.
  13. IMPORTANT - Make a new user before start the service: ./piworker --new-user --username <your_username> --password <your_password> --admin. Replace <your_username> with the username you will use and <your_password> with the password. Also, the --admin flag can be avoided if you don't want to give admin privileges to the user. Note: you can add more users if you want.
  14. Optional (but recommended) - Generate a self-signed certificate for a secure connection (https) with the WebUI (Warning: don't use the WebUI/REST APIs from outside the LAN. As a software in early development, can contain vulnerabilities that can be exploited by more experienced people with malicious intentions):
openssl req \
        -subj '/O=PiWorker' \
        -new \
        -newkey \
        rsa:2048 \
        -sha256 \
        -days 365 \
        -nodes \
        -x509 \
        -keyout server.key \
        -out server.crt
  1. Start the service: sudo ./piworker --service start.

Built With

Thanks to all the developers who made each dependency used by PiWorker! They made the things much more easier for others devs like me, really.

Frontend (JS - VueJS)

Dependency License
VueJS GitHub license
Vuetify GitHub license
Vue-router GitHub license
Vuex GitHub license
Axios GitHub license
Vue.Draggable GitHub license
Vue-uuid GitHub license
Anime.js GitHub license
Chart.js GitHub license
Vue-chartjs GitHub license
typeface-roboto (Google Roboto) -
Material Design Icons -

Backend (Go)

Dependency License
Websocket by Gorilla GitHub license
Mux GitHub license
Go-sqlite3 GitHub license
Pkger GitHub license
Jwt-go GitHub license
Lumberjack GitHub license
UUID by Google GitHub license
Service GitHub license
Zerolog GitHub license
Gopsutil GitHub license
Testify GitHub license

Acknowledgments

To JetBrains, for providing me with their wonderful tools for free. Thank you guys!
If you have a little of time, please consider take a look to their website.