Use the bottom menu to navigate between the pages.
- Home = A list of listings that have been shared with you
- Favourites = A list of listings that have been favourited by you **
- Sell = You can create a listing and share it with your contacts
- Inbox = Incoming messages from other users of dbay **
- Me = A navigation menu to help you navigate to pages of your user
** denotes features yet to be developed
You're able to create a listing by using the "Sell" link in the bottom navbar menu. When you publish it, it is sent to all your contacts.
You can browse listings that have been shared with you. If you select a listing in the menu and click "I want it" the application will check if the item is available with the seller whilst checking your wallet balance. If the item is available and you can afford it, you will be given the option to buy it.
Because dbay is built on top of a commodity based blockchain which has its own currency (Minima), we are able to directly integrate private and secure payments. Buyers are able to send money directly to sellers over the Minima network. This all happens seamlessly and does not require the user to come out of dbay.
------------------------------------------------------------------------------------------------------------
- node.js https://nodejs.org/en/download/
- code Editor, we recommend Visual Studio code https://code.visualstudio.com/
- the latest minima.jar file from
https://github.com/minima-global/Minima/tree/master/jar - this repo (dbay) cloned to a folder on your computer;
dbay is a protocol (minidapp) which runs on the Minima blockchain. Minima is currently in testnet and will launch in Q1 2023. To run any minidapp, you must first be running a full Minima node. You can learn more about this on the Minima website. In order to play with and test the Minidapp that we are building, we must first set up and run two Minima nodes. If you have an android phone and would like to get a very quick understanding of Minima, you can search 'minima global' on the google play store and download the app. This is not a requirement for this task.
- Open a Terminal window and navigate to
dbay/react-ui/(your cloned repo) and create a folder called/minidapp. Move the minima.jar file which was downloaded in the prerequisites, into thedbay/react-ui/minidapp/folder. The structure should now look like thisdbay/react-ui/minidapp/minima.jar - From within the
minidappfolder runjava -jar minima.jar -data minidata1 -test -nop2p -genesis -mdsenable -clean - In a second terminal window navigate to the same folder
/minidappand runjava -jar minima.jar -data minidata2 -test -nop2p -clean -port 10001 -mdsenable -connect 127.0.0.1:9001 - Now you have two nodes connected on a private test network (this is quicker than being on the public network and means you start with lots of test tokens to play with).
- On node 1 (terminal 1) run
mdsto get the connection URL, it should have a similar form as ->https://10.64.25.151:9003but with a different IP - Below the URL is the password you'll need to access the MDS, something like
CAHC-RRGY-C0PU - Open the Url in a browser (if chrome doesn't let you access it type in
thisisunsafeand it should let you pass through) - Enter the password
- Do the same for node 2 (terminal 2)
Now you have 2 nodes running and visible in your broswer. You may have to log off and log on again at some point in the future. Just use the same password that you used in this stage.
- Using terminal in visual studio code (or other terminal)
- Run the following command in the
/react-uidirectory:npm iand then runnpm run build. - Once the app has been built, and still in the
/react-uidirectory, runnpm run zipwhich will create a MiniDapp .mds.zip file in the/minidappfolder. - Then in each node (terminal window) run
mds action:install file:<minidapp zip file> trust:write, where<minidapp zip file>is replaced by the actual destination of the zip file you just created in the step before. - Once run on both nodes you can now go to both of your browser tabs and refresh and the apps should appear - it is possible that when you refresh on browser, it asks you to log off and log on again - this is fine, just use the same password from before. You can access this password by running
MDSin the relevant terminal window. - Click on each app to open in another browser tab.
You're now running 2 nodes on one private network and each of them have an instance of the dbay protocol installed.
We have a solution that allows you to automate app updates without constantly reinstalling, by taking advantage of Create React App's automatic reloading on file changes.
- Ensure you have installed the app on at least one node using the instructions above, and that it is visible using your browser
- In your code editor, duplicate the
.env.examplefile and rename it to.env(this is your project root) - Configure the environment values, you can leave everything default unless you are running Minima on a custom port.
- Open your app on Desktop
- Your url will look something like:
https://localhost:9003/{APP_ID}/index.html?uid=YOUR_UID - Copy the value at the end where YOUR_UID is in the URL e.g.
0xD497A626EF65C24417D4F7AE0CC48289BCB1062FB9763D47A20326984E099299 - Replace
REACT_APP_DEBUG_UIDin the env file with the uid you copied - From your URL, copy the localhost part of the IP
https://10.10.10.66:9003"(the 10.10.10.66 part). - Replace the
REACT_APP_DEBUG_HOSTin theevn.file with the IP you've just copied - Run
npm run start - Now when you edit
/src/App.jsxthe browser window will automatically reload with those updates present