codex-frontend/docs/requirements.md
2023-12-11 15:11:05 +01:00

3.3 KiB

Codex Frontend Requirements

Here's an attempt to structure the requirements for a Codex frontend application. For some of the requirements, Codex API may not be available yet. Feel free to contact core contributors.

Node status

Frontend should display basic node status information.

  1. Frontend displays node network information:
    1. Node ID
    2. Node SPR (signed peer record)
    3. Number of known peers
    4. Announce addresses
    5. Codex version information
  2. Frontend displays node storage information:
    1. Total storage quota
    2. Storage quota used
    3. Storage quota reserved
    4. (Bonus points) Frontend displays a warning in highlighted colors when the amount of available quota drops below 100MB.
  3. Frontend displays hosting information:
    1. Number of slots being hosted
    2. Per slot being hosted:
      1. Status of the contract
      2. Total size of the slot data
      3. Duration of the contract
      4. Amount of collateral posted
      5. Amount of contract reward
  4. Frontend displays its public payment account information.
  5. Frontend displays its own version information.
  6. (Bonus points) Frontend will periodically update the network, storage, and hosting information.

Local data exchange

Frontend allows users to upload and download data.

  1. Frontend displays datasets stored in the local node.
  2. For each dataset stored locally, frontend displays:
    1. CID of the dataset
    2. Size of the dataset
    3. Expiration timestamp of the dataset
  3. Frontend allows user to upload a file to the node.
  4. Frontend will provide user-feedback while an upload is in progress.
  5. Frontend will display the CID of the uploaded file when upload is finished.
  6. Frontend allows users to download a file given a CID.
  7. Frontend will provide user-feedback while a download is in progress.
  8. Frontend will display a clear error message when upload fails.
  9. Frontend will display a clear error message when download fails.

Marketplace - Hosting

Frontend allows the user to offer their local diskspace to the network. Such an offering is called an "Availability".

  1. Frontend displays current availabilities.
  2. Frontend displays per availablility:
    1. Size
    2. Maximum contract duration
    3. Maximum collateral
    4. Minimum price
    5. (Bonus points) Slots currently being served by this availability
  3. Frontend allows user to create new availabilities.
  4. Frontend allows user to remove availabilities.
  5. Frontend displays user-feedback when performing either of these operations.
  6. Frontend displays a clear error message when either of these operations fail.

Marketplace - Purchasing

Frontend allows the user to purchase storage space in the network.

  1. Frontend displays current purchases.
  2. Frontend displays per purchase:
    1. ID of the purchase
    2. Dataset CID
    3. Size
    4. Total contract duration + Contract end timestamp + remaining contract time
    5. Amount of Collateral posted
    6. Price paid for purchase
  3. (Bonus points) When a purchase remaining time drops below 8 hours, frontend will use highlight colors to passively alert user to approaching expirey.
  4. Frontend allows user to create a new purchase for a CID.
  5. (Bonus points) Frontend allows users to 'quickly' set up a new purchase from a single icon button in each element of the local-content overview list, pre-filling the CID.