Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation (#26) #27

Merged
merged 1 commit into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion Client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,31 @@ by entering the Client account.

If the book and payment are accepted by the server, the server will send the client an NFT signed by the server.
By presenting this NFT to the server you can open the locker.
To do this, this application sends the NFT to a server address but with expiration time in the past, so you continue owning the NFT
To do this, this application sends the NFT to a server address but with an expiration time in the past, so you continue owning the NFT
and can reuse it as many times as you want.


## Getting the Client app

### From source code
```
git clone https://github.com/EddyTheCo/DLockers.git

mkdir build
cd build
qt-cmake -G Ninja -DCMAKE_INSTALL_PREFIX=installDir -DCMAKE_BUILD_TYPE=Release -DQTDEPLOY=ON -DUSE_THREADS=ON -DBUILD_SERVER=OFF ../Dlockers

cmake --build .

cmake --install .
```
where `installDir` is the installation path, `QTDEPLOY` install Qt dependencies(To be used only if compiling the desktop app).
The use of multithreading is controlled by the `USE_THREADS` variable.
The `-DBUILD_SERVER=OFF` has to be set if compiling for Android, because the server is not meant to run on Android.

The application major dependencies are the [Qt](https://doc.qt.io/), [OpenCV](https://github.com/opencv/opencv) and [openssl](https://github.com/openssl/openssl) libraries.

For more information on how to compile for the different platforms refer to the GitHub workflows of the repo.
### From GitHub releases
Download the releases from this repo.

12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# DLockers

This repo produces a [server](https://github.com/EddyTheCo/DLockers/tree/main/Server/) and a [client](https://github.com/EddyTheCo/DLockers/tree/main/Client/) applications that communicate peer-to-peer using the IOTA network.
We are not interested in crypto's speculative side and are not associated with the Iota Foundation.
We discourage investing in Shimmer and IOTA because that will be investing in the Iota Foundation and its pursuit of centralizing the development and protocol.
This repo produces a [server](Server/) and a [client](Client/) applications that communicate peer-to-peer using the IOTA network.
We are not interested in crypto's speculative side.


Use the [web client](https://eddytheco.github.io/DLockers/Client/) or set a [MockUpServer](https://eddytheco.github.io/DLockers/MockupServer/).

Watch the [showcase video](https://youtu.be/JoLe93Gzwho?si=A9S8vM_HUYCxYcHv)
Read how the [Dedicated Post](https://eddytheco.github.io/Shimmerpp/posts/NFT_as_Ticket_in_IoT/) and contribute!

## The bigger picture

* Any person can start renting physical space for lockers.
* You do not depend on centralized company servers to store your business data or to process payments.
* As long as you maintain a node(blockchain), your gainings and business data are cryptographically secured.
* The open source code grants you certain rights and responsibilities to respect other people's rights.
* By using NFTs the client can pass the right to open a box to other clients.




51 changes: 0 additions & 51 deletions Server/.github/workflows/build-test-install.yml

This file was deleted.

17 changes: 0 additions & 17 deletions Server/.github/workflows/build-wasm.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions Server/.gitignore

This file was deleted.

48 changes: 45 additions & 3 deletions Server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ If using the mainnet **you are the ONLY responsible for the eventual loss of you

To book a box one can use the [client](https://eddytheco.github.io/DLockers/Client).
The communication between server and client relies on creating outputs on the ledger.
Because of that, the server needs an initial amount of funds to be able to publish its state on the ledger.
Because of that, the server needs an initial amount of funds to publish its state on the ledger.
These initial funds are always owned by the server.


Expand All @@ -25,9 +25,51 @@ The signed NFT has immutable metadata that references certain time intervals of
## Platforms

The server is configured to run on a raspberry-pi, with a 4g and GPS module by using the [evt yocto Layer](https://github.com/EddyTheCo/meta-evt)
The server will set the pin 17(this can be configured) up when a valid NFT is received.
The server will set the pin `17`(this can be configured) up when a valid NFT is received.
The latter will open the electrical locker.
If using the GPS, the geographical position of the server will be public.

The GPS is configured to communicate using the serial port `/dev/ttyUSB1`.
One can also set up a [mock-up Server](https://eddytheco.github.io/DLockers/MockupServer) for testing just by using the browser.
The releases from this repo are also a mock-up Server.


## Getting the Server app

### From source code

```
git clone https://github.com/EddyTheCo/DLockers.git

mkdir build
cd build
qt-cmake -G Ninja -DCMAKE_INSTALL_PREFIX=installDir -DCMAKE_BUILD_TYPE=Release -DQTDEPLOY=ON -DVAULT_PASS="EstervDlockers" -DRPI_SERIAL_PN="serial:/dev/ttyUSB1" -DRPI_SERVER_GPIO=17 -DRPI_SERVER=ON -DBUILD_SHARED_LIBS=ON -DBUILD_CLIENT=OFF ../Dlockers

cmake --build .

cmake --install .
```
where `installDir` is the installation path, `QTDEPLOY` install Qt dependencies(To be used only if compiling the desktop app).
The `-DBUILD_CLIENT=OFF` does not configure the Client app.
The `RPI_SERVER` variable controls configuring a real Server(ON) or a MockupServer(OFF).
The Server App creates a vault to store the random seed when is first created.
The `VAULT_PASS` variable sets the value of the password, by default `EstervDlockers` is used.
The serial port for GPS is set by the `RPI_SERIAL_PN`, by default `serial:/dev/ttyUSB1` is used.
The pin `17` is used by default to open the locker, but this can be configured by the `RPI_SERIAL_PN` variable.

The application's major dependencies are the [Qt](https://doc.qt.io/) and [openssl](https://github.com/openssl/openssl) libraries.

For more information on how to compile for the different platforms refer to the GitHub workflows of the repo and the [evt yocto Layer](https://github.com/EddyTheCo/meta-evt/releases/tag/DlockersImageV0.0.1).

### From GitHub releases

Download the releases from this repo.
The releases of the Server app from this repo are mock-up servers.
### Yocto image

One can get the image I used for a Raspberry Pi3 in the [showcase video](https://www.youtube.com/watch?v=JoLe93Gzwho).
The image was created using this tag of the [evt yocto Layer](https://github.com/EddyTheCo/meta-evt/releases/tag/DlockersImageV0.0.1).
The image can be downloaded from this [link](https://drive.google.com/file/d/1xcjNCxDmNiy2UezKV6mg3VdZ25qZXl_1/view?usp=drive_link).
Please check the different licenses of the components used on the image.



Loading