Debt - Additional Information (Details) | 1 Months Ended | 3 Months Ended | 6 Months Ended |
May 31, 2019USD ($)d$ / sharesshares | Mar. 31, 2019USD ($)$ / sharesshares | Aug. 31, 2018USD ($)$ / sharesshares | Jul. 31, 2018 | Apr. 30, 2018USD ($) | Nov. 30, 2017USD ($) | Oct. 31, 2017USD ($)$ / sharesshares | Jan. 31, 2017USD ($) | Jun. 30, 2019USD ($)$ / sharesshares | Jun. 30, 2018USD ($) | Jun. 30, 2019USD ($)$ / sharesshares | Jun. 30, 2018USD ($) |
Silicon Valley Bank | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Debt instrument, maturity date | | Mar. 1, 2023 | | | Jun. 1, 2020 | | | | | | | |
Interest rate, terms | | | | | | | | | | | the Company is to make interest-only payments through December 31, 2019 on Tranche 1 and Tranche 2 at a rate equal to the greater of the Prime Rate plus 1.00%, as defined in the 2019 Loan, or 6.5%, followed by an amortization period of 39 months of equal monthly payments of principal plus interest until paid in full. | |
Percentage of final payment on principal amount of refinanced advances | | 6.00% | | | | | | | | | | |
Silicon Valley Bank | Tranche B | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Line of credit facility, maximum borrowing capacity | | | | | $ 2,000,000 | | | | | | | |
Line of credit facility, extended period | | | | | Apr. 30, 2018 | | | | | | | |
Silicon Valley Bank | Tranche C | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Line of credit facility, maximum borrowing capacity | | | $ 2,000,000 | | | | | | | | | |
Interest only period extended | | | | Aug. 31, 2018 | | | | | | | | |
Line of credit facility, extended period | | | | Dec. 31, 2018 | Jul. 31, 2018 | | | | | | | |
Silicon Valley Bank | Prepayment Made Prior To First Anniversary | Loan and Security Agreement | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Prepayment fee percentage | | | | | | | 3.00% | | | | | |
Silicon Valley Bank | Prepayment Made By Second Anniversary | Loan and Security Agreement | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Prepayment fee percentage | | | | | | | 2.00% | | | | | |
Silicon Valley Bank | Prepayment Made After Second Anniversary | Loan and Security Agreement | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Prepayment fee percentage | | | | | | | 1.00% | | | | | |
Silicon Valley Bank | Tranche B and C | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Interest only period extended | | | | | Dec. 31, 2018 | | | | | | | |
Debt instrument, maturity date | | | | | Dec. 31, 2020 | | | | | | | |
Silicon Valley Bank | Tranche 3 | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Amortization period of payments of principal plus interest amounts | | 33 months | | | | | | | | | | |
Silicon Valley Bank | Tranche 1 and 2 | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Amortization period of payments of principal plus interest amounts | | 39 months | | | | | | | | | | |
Interest rate | | 6.50% | | | | | | | | | | |
Silicon Valley Bank | Tranche 1 and 2 | Prime Rate | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Interest rate, percentage point added to reference rate | | 1.00% | | | | | | | | | | |
SVB and WestRiver | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Line of credit facility, maximum borrowing capacity | | $ 15,000,000 | | | | | | | | | | |
Threshold trading days | d | 10 | | | | | | | | | | | |
Long-term Debt, Gross | | | | | | | | | $ 100,000 | | $ 100,000 | |
SVB and WestRiver | Tranche 1 | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Number of warrants issued | shares | | 37,606 | | | | | | | | | | |
Exercise price of warrant | $ / shares | | $ 4.73 | | | | | | | | | | |
Line of credit facility, maximum borrowing capacity | | $ 7,500,000 | | | | | | | | | | |
Proceeds from lines of credit | | 7,500,000 | | | | | | | | | | |
SVB and WestRiver | Tranche 2 | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Number of warrants issued | shares | 12,130 | | | | | | | | | | | |
Exercise price of warrant | $ / shares | $ 10.86 | | | | | | | | | | | |
Line of credit facility, maximum borrowing capacity | $ 2,500,000 | | | | | | | | | | | |
Proceeds from lines of credit | $ 2,500,000 | | | | | | | | | | | |
SVB and WestRiver | Tranche 3 | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Number of warrants issued | shares | 24,262 | | | | | | | | | | | |
Line of credit facility, maximum borrowing capacity | | $ 5,000,000 | | | | | | | | | | |
SVB and WestRiver | Tranche 1 and 2 | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Debt discount | | | | | | | | | 300,000 | | 300,000 | |
SVB, SVB and WestRiver | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Interest expense | | | | | | | | | 200,000 | $ 100,000 | 400,000 | $ 200,000 |
Term Loan | Silicon Valley Bank | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Number of warrants issued | shares | | | | | | | 49,713 | | | | | |
Exercise price of warrant | $ / shares | | | | | | | $ 9.659 | | | | | |
Warrants exercisable date | | | | | | | Oct. 18, 2027 | | | | | |
Line of credit facility, maximum borrowing capacity | | | | | | | $ 7,500,000 | | | | | |
Interest only period extended | | | | | | | Dec. 31, 2018 | | | | | |
Amortization period of payments of principal plus interest amounts | | | | | | | 24 months | | | | | |
Percentage of aggregate principal amount | | | | | | | 7.00% | | | | | |
Term Loan | Silicon Valley Bank | Tranche A | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Line of credit facility, maximum borrowing capacity | | | | | | | $ 3,500,000 | | | | | |
Proceeds from lines of credit | | | | | | $ 3,500,000 | | | | | | |
Term Loan | Silicon Valley Bank | Tranche B | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Line of credit facility, maximum borrowing capacity | | | | | | | 2,000,000 | | | | | |
Term Loan | Silicon Valley Bank | Tranche C | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Line of credit facility, maximum borrowing capacity | | | | | | | $ 2,000,000 | | | | | |
Series D Redeemable Preferred Stock | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Sale of stock | shares | | | 1,842,959 | | | | | | | | | |
Sale of stock price per share | $ / shares | | | $ 9.659 | | | | | | | | | |
Net proceeds from sale of shares | | | $ 17,700,000 | | | | | | | | | |
Debt converted into shares | shares | | | 2,080,209 | | | | | | | | | |
Warrants | Series C-1 | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Number of warrants issued | shares | | | 368,582 | | | | | | | | | |
Exercise price of warrant | $ / shares | | | $ 0.12 | | | | | | | | | |
2017 Notes | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Debt instrument principal amount | | | | | | | | $ 14,700,000 | | | | |
Interest rate | | | | | | | | 8.00% | | | | |
Proceeds from sale of equity | | | | | | | | $ 10,000,000 | | | | |
Debt instrument, Redemption price, percentage | | | | | | | | 80.00% | | | | |
Debt discount | | | | | | | | | 3,000,000 | | 3,000,000 | |
Interest expense | | | | | | | | | 0 | $ 1,300,000 | 0 | $ 2,600,000 |
2017 Notes | Warrants | | | | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | | | | |
Debt discount | | | | | | | | | $ 1,700,000 | | $ 1,700,000 | |
Number of warrants issued | shares | | | | | | | | | 304,397 | | 304,397 | |
Exercise price of warrant | $ / shares | | | | | | | | | $ 0.12 | | $ 0.12 | |
Warrants exercisable date | | | | | | | | | | | Jan. 31, 2024 | |