|
| 1 | +# There are steps to get the software programm started: |
| 2 | + |
| 3 | +## For IPC: |
| 4 | +- To start IPC you need to install libcjson-dev by using command: |
| 5 | + ``` Terminal |
| 6 | + $sudo apt-get install libcjson-dev |
| 7 | + ``` |
| 8 | +- Then compile file server.c with command: |
| 9 | + ```Terminal |
| 10 | + $gcc -o server server.c -pthread -libcjson |
| 11 | + ``` |
| 12 | +- Start the IPC server by: |
| 13 | + ```Terminal |
| 14 | + $./server <ip address> <port number> |
| 15 | + ``` |
| 16 | +## For Backend: |
| 17 | +- To start Backend you need python 3.10 or higher |
| 18 | +- You need MySQL DBMS |
| 19 | +- Create .env file in Backend directory: |
| 20 | + ```.env |
| 21 | + DATABASE_URL=mysql://username:password@host/dbname |
| 22 | + ADMIN_PASSWORD=password |
| 23 | + ``` |
| 24 | +- Run the following command: |
| 25 | + ```Terminal |
| 26 | + pip install -r requirements.txt |
| 27 | + ``` |
| 28 | +- Run the following command: |
| 29 | + ```Terminal |
| 30 | + python ./env_loader.py |
| 31 | + ``` |
| 32 | +- Run the following command to get db migrataions: |
| 33 | + ```Terminal |
| 34 | + alembic upgrade head |
| 35 | + ``` |
| 36 | +- And run the file call_controller.py: |
| 37 | + ```Terminal |
| 38 | + python3 call_controller.py <ip address> <port number> |
| 39 | + ``` |
| 40 | + |
| 41 | + |
| 42 | +## For Frontend: |
| 43 | +- To start Frontend you need to install npm by entering following command: |
| 44 | + ```Terminal |
| 45 | + $sudo apt install npm |
| 46 | + $sudo npm install -g n |
| 47 | + $sudo n latest |
| 48 | + ``` |
| 49 | +- You need to instal libfuse2 and fuse libraries: |
| 50 | + ```Terminal |
| 51 | + $sudo apt-get install fuse libfuse2 |
| 52 | + ``` |
| 53 | +- You need to run command to install node modules by entering following command in side Frontend directory: |
| 54 | + ```Terminal |
| 55 | + $npm install |
| 56 | + ``` |
| 57 | +- As well you have to define the IP address and port number in .env file by using the following: |
| 58 | + ``` .env |
| 59 | + IP_IPC=<ip address of ipc> |
| 60 | + PORT_IPC=<port number> |
| 61 | + ``` |
| 62 | +- Sometimes it is needed to change owner of the directory, it would be easy to change ownership of all subdirectories recursively: |
| 63 | + ``` Terminal |
| 64 | + sudo chown -R user:group Frontend |
| 65 | + ``` |
| 66 | +- If you want to start application you have to run following command in Frontend directory: |
| 67 | + ```Terminal |
| 68 | + $npm start |
| 69 | + ``` |
| 70 | +- To build application for frontend you should run following command, your builded app will be in Frontend/release/build directory with the name 'ElectronReact-X.X.X.AppImage': |
| 71 | + ```Terminal |
| 72 | + $npm run package |
| 73 | + ``` |
| 74 | +- And add the same .env file into the build directory before starting it |
| 75 | +- And run the 'ElectronReact-X.X.X.AppImage' file in terminal: |
| 76 | + ``` Terminal |
| 77 | + ./ElectronReact-X.X.X.AppImage |
| 78 | + ``` |
0 commit comments