Add self-serve sign-up + Stripe Checkout (#31) (#34)
Unit Tests / test (push) Successful in 11s

## Summary
- Closes #31
- Public `/signup/` page (Sign In–matched UI): register → JWT → `POST /api/finance/checkout/` → redirect to Stripe hosted Checkout
- `/billing/success` and `/billing/cancel` return URLs
- Sign In ↔ Sign Up links; Sign Up link only when backend `enable_account_registration` is true

Depends on backend PR: registration flag + public settings + gated `/user/create/`

## Test plan
- [ ] `cd llm-fe && CI=true npm run test:ci -- --testPathPattern='SignIn|SignUp'`
- [ ] With registration disabled: `/signup/` shows unavailable; Sign In has no Sign up link
- [ ] With registration enabled: form validates, happy path redirects to Checkout URL
- [ ] Cancel return explains retry; success prompts continue / sign-inReviewed-on: #34
This commit was merged in pull request #34.
This commit is contained in:
2026-07-27 04:20:20 -07:00
parent a4a28ef13e
commit 1e660c56a8
7 changed files with 785 additions and 2 deletions
+6
View File
@@ -2,6 +2,9 @@ import React, { Component, useContext } from 'react';
import './App.css';
import { Routes, Route, Outlet, Navigate } from 'react-router-dom';
import SignIn from './llm-fe/pages/SignIn/SignIn';
import SignUp from './llm-fe/pages/SignUp/SignUp';
import BillingSuccess from './llm-fe/pages/BillingSuccess/BillingSuccess';
import BillingCancel from './llm-fe/pages/BillingCancel/BillingCancel';
import PasswordReset from './llm-fe/pages/PasswordReset/PasswordReset';
import NotFound from './llm-fe/pages/NotFound/NotFound';
import { AuthContext } from './llm-fe/contexts/AuthContext';
@@ -46,6 +49,9 @@ class App extends Component {
<Route path='*' element={<NotFound />} />
<Route path={"/signin/"} Component={SignIn} />
<Route path={"/signup/"} Component={SignUp} />
<Route path={"/billing/success"} Component={BillingSuccess} />
<Route path={"/billing/cancel"} Component={BillingCancel} />
<Route path={"/password_reset/"} Component={PasswordReset} />
<Route path={"/password_reset_confirmation/"} Component={PasswordResetConfirmation} />
<Route path={'/set_password/'} Component={SetPassword} />