# Host Console UX Requirements for Beta
###### tags: `requirements` `Holo` `design doc` `UX`
**===> Replaces HP Admin**
## Use Cases in Scope
**These represent at a high level the actions a Host should be able to take or the questions they should be able to answer within the Host Console at Beta.**
1. Log in to the Host Console
* First Time Login is a distinct use case
2. View Default Dashboard on Host Console
* View KYC status, and if action is required, this is a link to perform required verification
* View My Aggregate Hosting Stats with link to Hosting Settings
* View My Aggregate Earnings & Stats with link to Earnings & Payments
* View my top ~3 Apps Hosted (in terms of earnings) and link to view all my hosted hApps
* View my last ~3 payments received (with link to view more)
3. View All hApps that I Host (card view)
* View usage and earning summaries all individual hApps on cards
* Link from cards to hApp Details
* Do we want to display icons that warn of imminent auto pause or auto delete
* Display paused hApps at the top ??
4. View Individual hApp and change hApp specific settins
* See hApp earnings and hApp usage details
* Set override pricing for the app
* Stop Hosting a hApp
* Do we want to show any icons for overdue or exception invoices?
* Do we want to show warning for pause or delete that is automatic
5. Configure My Preferences for Hosting
* Configure Pricing
* Configure Invoice and Payment Terms
* Frequency of Invoicing
* Payment Receipt Terms
* Configure hApp selection preferences
6. View My Earnings Dashboard
* See my HoloFuel Available Balance and link to HF app to transact
* See my KYC Status and link if there is any action required
* Show chart with weekly earnings
* Identify if I have any recent payments and link to view
* Identify if I have any invoices that have exceptions or that have been rejected and link to view
* Identify if I have any unpaid late invoices and link to view
* HoloFuel Redemption (section of Earnings Dashboard )
* See my redeemable HF balance ()
* Link to configure my HoloFuel redemption preferences
* Redeem HoloFuel via a Reserve
* Link to see my redemption history
## Out of Scope
1. Host completes KYC
2. HoloPort registration and updates requirements are not included in this document but will be required for arriving to Login
3. Setting Persona is currently out of scope
4. Changing Persona after it is set with first time login
5. Changing connected HoloFuel Account
6. View hApps that I do not host automatically - will be wanted soon after beta
7. Host a specific hApp not selected through the auto-hosting algorithm
## Dependencies
1. HPOS
2. HoloFuel DNA/Account
3. Joining Code from Holo.host
4. Verifiable Claims DNA/Account
5. HHA and Service Logger DNAs
## Detailed Use Cases
### Login to Host Console
* First Time log in will be different
* requires email validation/whitelisting with joining code
* User will acquire self validating Joining Code for Holo apps at https://register.Holo.host
* requires a connection made between the keys that generate the address for the port (ie the email in zero tier to the keys that are the agent keys in HHA) -- use of the same joining code
* Requires install and registration of HoloFuel (install HF hApp with the joining code in the conductor)
* ~~Requires registration of verifiable claims (can use the same joining code as HF to make things simple)~~
### Host Console Dashboard
**[My rough imagining of a dashboard](https://www.dropbox.com/s/ul6wgdh3pxdm349/HostMainDashboard.jpg?dl=0)**
1. Log into Host Console
2. View My Aggregate Hosting Stats with link to Hosting Preferences
**Usage views for hosts is different than that of publisher. The usage here is based on what has occured on the host device whether or not it has been invoiced.**
* How many Apps am I hosting
* Number of total source chains hosted (current/daily snapshot)
* % CPU (average in past day)
* Total Bandwidth (used in past day)
* GB Storage consumed (current/daily snapshot)
3. View My Aggregate Earnings & Stats with link to Earnings & Payments dashboard
* Total HoloFuel Earned in past 7 days (**based on what has been paid**)
* Average Weekly HF earned
* Trending up/down icon?
4. View my top ~3 Apps Hosted (in terms of earnings) and link to view all my hosted hApps
5. View my last ~3 payments received (with link to earnings dashboard)
6. View Icon for Invoice Exceptions (link to exceptions view directly?)
7. Maybe view Redeemable HF? (link to Earnings Dashboard)
### View all Hosted hApps
NOTE: By default, until we have the tranching and matching algorithms setup, all apps available are selected to host.
1. Navigate to Hosted hApps view
2. Paused hApps should sort to display at the top with some marker that they are paused
* NOTE: Paused hApps can be set to this status by 2 mechanisms. If they are actively paused by a publisher, then the hApp is paused on all hosting instances. A hApp may be paused automatically on an individual HoloPort if invoices remain unpaid beyond the settings (see below)
*
4. Order of hApps should default to the ones who have earned the most in the last 7 days
* Order should be changeable to Alphabetical (within each group)
5. Each hApp card should display:
* hApp Name
* Earnings last 7 days
* Days hosted
* CPU usage in MS last 7 days
* Storage snapshot
* Bandwidth usage in MB last 7 days
* Link to see details
### View an individual Hosted hApp
1. Navigate to an individual hApp view from the all hosted hApps view.
2. If a hApp is paused by a publisher, it should have a marker.
* If the pause is automatic due to non-payment, the marker should be slightly different
* If paused, the host should not be able to activate - that is only the purview of the Publisher, either by direct action or by payment.
* Paused hApps still charge for storage.
3. View days hosted
* if the app is paused, instead show n/a
4. View Lifetime Earnings
5. View earned HF in last 7 days (cash basis) (show an arrow up or arrow down icon next to it to indicate if this is higher or lower than average)
6. View average weekly earnings (cash basis)
7. View total # sourcechains hosted
8. View usage consumed by the hApp
* CPU
* Bandwidth
* Storage
9. View pricing for the hApp
* CPU
* Bandwidth
* Storage
10. View option to edit pricing for the hApp
* Provide warning that this change will only apply to this hApp and that if they want to change pricing for all hApps they should go to the hosting preferences.
* Pricing changes should use the range selector like airbnb
11. View option to stop hosting the hApp
* When Stop Hosting is clicked, a confirmation notice is displayed
* "This app will be removed from your HoloPort and will not be available for you to host again for at least X days. All invoices, logs and payments associated will remain available to you."
* Should user have a way to say "Never host this hApp again." ??
* User must click button for Yes, I want to Stop the hApp Hosting
* Return user to view all Hosted hApps view
12. View category tags for the hApp
### Set My Hosting Preferences
* Price Configuration
* Holo presets a default, host can change default based on a selector control that displays frequency of pricing (think Airbnb host price setting)
* Payment Terms/Options
* Set default frequency of invoicing
* Default by Holo is set to 1 week amount
* Host can change frequency default from 1 day to 30 days
* Host can add an override maximum HF amount that will override the frequency and invoice the publisher when that target is hit
* If max HF override is used, it resets the frequency clock to begin counting days and amounts again
* Set acceptable payment terms
* Default by Holo should be Net7
* Host can change the terms from Net 1 to Net 30
* user should be warned that setting it too strictly will limit which apps they will be able to host as the settings need to match up with the publisher settings
* View other defaults set by Holo for hosting
* Apps will be paused if payment terms are exceeded by 2x payment terms
* Apps will be removed if payment terms are exceeded by 4x payment terms
* Please note that when an app is removed from hosting whether automatically for non-payment or by the choice of a host, none of the invoice and payment data is removed from the Earnings and Payments area.
* App Selection Terms/Option
* Jurisdiction Exclusion
* Multi select control gives the host the ability to say what jurisdiction (based on publisher KYC) they will not host because they cannot accept payment from that jurisdiction.
* Category Tags
* EXCLUDE: Set app categories you will NOT host using same tag control as publisher (tagging not limited to whitelist, allows creation of new)
* INCLUDE: Set app categories you PREFER to host using tag control
### Earnings Dashboard
**[My imagining of the Earnings Dashboard](https://www.dropbox.com/s/w98oo87hf1zmwfi/IMG_20200920_120217~2.jpg?dl=0)**
1. Host should see their available HF balance
2. Navigate to the Earnings and Payment Dashboard
3. Host should see visible KYC status, and if action is required, this is a link to perform required verification
4. Host should see an Icon/Badge should display for payments and link to detail view of paid invoices.
5. Host should see an Icon/Badge (with dot notification if new records exist) with a link to the invoice view that shows invoices that have been marked as exceptions by Holo or a Publisher.
6. Host should see an Icon/Badge should display (only if any exist) for late and unpaid invoices
**Separating Bar**
7. Hosts should see their Redeemable HF Earnings Balance
* Definition: Redeemable HF Balance is equal to the lesser of:
a) Their available HF Balance, or
b) All hosting earnings less all redeemed earnings.
8. Host should see link to Redemption Settings
9. Host should see a button to Redeem HF if they have a positive balance of Redeemable HF Earnings
10. Hosts should see an icon link to Redemption History
### Invoice Views
**All should be varients of the same view**
* Invoices should display in a data table like [this](https://vuetifyjs.com/en/components/data-tables/)
* Filter and sort functionality
* Invoice Number
* Date Created
* Amount
* Date Due
* Publisher
* App (this is a link to the individual hApp view for this hApp )
* Exception Status (Exception, Accepted, Rejected, null or none)
* Payment Status
* Pagination of records
* Links back to Earnings and Payments as well as to Main Dashboard for the Host Console
**Other Possible Features:**
* Simple way to select certain basic Filters (buttons or checkboxes):
* View All Paid Invoices
* View All Unpaid Invoices
* View All Invoices
* View All Late Invoices
* user should link to hApp details using name link and pause the hApp--
### Redeem HoloFuel via Reserve
**[Redemption (2nd) Flow on this Miro](https://miro.com/app/board/o9J_kpHBES8=/)
Only includes the actions through submit on the Host Console swimlane**
1. Click Redeem HF
2. Enter HF amount
* At Beta, HOT will be the only reserve account currency available
3. Enter HOT address and press continue (save HOT address is not in scope at this time)
4. Display pricing data
* If there are not sufficient funds available in the reserve, display messaging that communicates that first.
* If there are funds available in the reserve, display the **current projected** price available now from reserve for the amount requested in the redemption. (make it clear that this price is not constant but changing)
* Display current purchase price at the reserve (to indicate if the prices have been going up or down, may want to show a small arrow up if this price is higher than the estimated price or arrow down if this price is lower than the estimated price)
* Give user the option to cancel their redemption request
* Give user the option to continue with purchase at best price available now
5. If hosts proceeds with redemption, display a confirmation that they have entered the order with details and then offer link to redemption history, earnings dashboard or main hosting console.
### See my redemption history
* Use data table
* Show total HF redeemed (This is important because the total earnings, less the total HF redeemed should equal the total redeemable HF balance )
* Show date submitted, HF Amount, Other Currency Type, *Other Currency Amount, HF transaction status (pending, complete)
* Other Currency Amount cannot be shown until the HF transaction is complete - we could show the estimate from the submitted request
## Other Requirements & Related Infrastructure
### Filter Matching
Further details about Tranching and filters based on Price and Quality of Service can be found in the [Host Selection Algorithms requirements](https://hackmd.io/CrrgIW4IS_u7DQLO8DDb3g?view).
We use the following user defined data to filter-match a host with a published hApp:
1. Host Data
* Excluded Jurisdictions (publisher must not have jurisdiction = to any excluded)
* Acceptable Payment Terms (default NET7) (publisher must have autopay frequency less than or equal to this)
* Excluded Categories of Apps (hApp must not be tagged with any category here)
* Included/Preferred Categories of Apps (This may be about Tranching, not filters)
* Removal from Hosting by Host - never host again by putting on the exclude list
* Auto-removal from Hosting due to non-payment - add to the exclude list
* No KYC flags for host
2. Publisher Data
* Included Jurisdicstions -OR- Excluded Jurisdictions
* AutoPay Frequency (default NET7)
* No KYC flags for publisher
## Links
1. [Service Logger](https://github.com/Holo-Host/rfcs/blob/master/teams/holo-hosting/decision_logs/DL-H0003-reevaluate-servicelogger-dna-for-rsm.md)
## Post-Beta Functionality & Estimated Timing
1. per Mary: 'We will eventually need a control to turn on auto-pilot for setting default pricing (likely about **1 month or so after the beta release**, but we will want to test during our full feature phase). This will should be an on/off selector that when changed to on or when edited displays a slider that allows the user to see the distribution of pricing and to pick a percentile they want to charge from 1% to 99%. This will need a simple description and a link to the FAQs about it. "Auto Pilot allows you to set your prices in relation to the other hosts who manually manage default pricing.'