Skip to main content

Quickstart

This guide presents an end-to-end use case, demonstrating Debox's basic functionality and approach to sharing data between nodes. At its core, Debox consists of a daemon that listens to commands from a Debox client. In this example we will be using the Debox CLI client.

Step 1: Install Debox

See Installation section.

Step 2: Launch Debox

  1. Launch Debox daemon (accept the disclaimer when prompted)

    .\debox.exe

    Output:

    (truncated)
    Daemon | Debox v0.1.0
    Daemon | Listening on 127.0.0.1:35350
  2. Open up another terminal to execute the remaining commands

  3. Intialize IPFS to provision all necessary files for the IPFS daemon

    Run ipfs init only once after installation

    Running ipfs init command more than once will result in an error

    .\debox-cli.exe ipfs init

    Output:

    Success
  4. Start the IPFS daemon

    .\debox-cli.exe ipfs daemon start

    Output:

    Success
    Accept Windows security pop-up

    Click Allow for IPFS daemon to start

    Windows Security Pop-Up
  5. Start Debox Keeper

    .\debox-cli.exe keeper start

    Output:

    Success
    Accept Windows security pop-up

    Click Allow for Debox Keeper to start

    Windows Security Pop-Up

Step 3: Connect to Debox Community Share

In order to connect to a Debox Share, you need an Invite - a base58 encoded string containing all the information that you need to request to join by sending a Pass (a request for access).

Debox offers a community Share that automatically accepts all Passes for users to test out the sharing functionality.

Debox community Share Invite: 4jqgs5CSNLusSMDEaEsTcHvEsDdjvqC2oXEFmcXAQginurd4gDwhfL5UaHjNPs9sVBKeCcXaRmsNrcxit3uz4SWzpLazU1AToP7nKuw4CdMbTfkYpWtnM15z7F5VhqM2xXiEwWKBNf2nT7e4aAkLWWm67sDX6EiBEfMW9768m2gCoVzPoz9KoqYiuxLAGLe28NFAU3tUsx

  1. Use the Invite to request access to the Debox community Share

    .\debox-cli.exe pass create 4jqgs5CSNLusSMDEaEsTcHvEsDdjvqC2oXEFmcXAQginurd4gDwhfL5UaHjNPs9sVBKeCcXaRmsNrcxit3uz4SWzpLazU1AToP7nKuw4CdMbTfkYpWtnM15z7F5VhqM2xXiEwWKBNf2nT7e4aAkLWWm67sDX6EiBEfMW9768m2gCoVzPoz9KoqYiuxLAGLe28NFAU3tUsx

    Output:

    PassCreateOutput("Ed4eiQBSA3dnyxHuJwSrtGCRAwxJzAYQDTgRfxTcCL76")
    You will have a different Pass ID (pid) from the one above

    Each user has their own unique Pass ID

  2. List your pending Passes to confirm that the Pass was successfully sent

    .\debox-cli.exe pass pending

    Output:

    PassPendingOutput([PassPendingInfo { pid: "Ed4eiQBSA3dnyxHuJwSrtGCRAwxJzAYQDTgRfxTcCL76" }])
  3. The Debox community Share will automatically approve the Pass within a few seconds. Now, join the Share

    .\debox-cli.exe pass join Ed4eiQBSA3dnyxHuJwSrtGCRAwxJzAYQDTgRfxTcCL76

    Output:

    PassJoinOutput(ShareInfo { id: "8GmPkVqh8zYFiQgZVXjHFuNSg9VPUYmaygmMRLstJ7tQ", path: "/CommunityShare" })

Step 4: Retrieve Data

  1. Retrieve the contents of the Debox community Share

    .\debox-cli.exe files pull /CommunityShare

    Output:

    Success
  2. List the files in your local Debox fs to see what was retrieved from the Debox community Share

    .\debox-cli.exe files ls /CommunityShare

    Output:

    FilesLsOutput([FileInfo { name: "hello.txt", crtime: SystemTime { tv_sec: 1697054776, tv_nsec: 0 }, mtime: SystemTime { tv_sec: 1697054776, tv_nsec: 0 }, is_dir: false, size: 14 }, FileInfo { name: "debox.png", crtime: SystemTime { tv_sec: 1697054800, tv_nsec: 0 }, mtime: SystemTime { tv_sec: 1697054800, tv_nsec: 0 }, is_dir: false, size: 196284 }])
  3. Copy the retrieved hello.txt to your local fs from your local Debox fs

    .\debox-cli.exe files get /CommunityShare/hello.txt ~\Documents\hello.txt

    Output:

    Success
  4. Check the contents of hello.txt

    cat ~\Documents\hello.txt

    Output:

    Hello Debox!
  5. Congratulations! You have completed the Debox quickstart.

Next Steps

We are currently working on the following sections to offer users a deeper dive into Debox's functionality:

  • Guides (practical use cases of Debox)
  • Concepts (an indepth conceptual look into Debox's architecture)
  • API reference (a reference for building applications on top of Debox)

So, please, check back soon!