feat(onboarding): add connect-POS step (Verifone edge activation)#31
Open
Nirpat3 wants to merge 4 commits into
Open
feat(onboarding): add connect-POS step (Verifone edge activation)#31Nirpat3 wants to merge 4 commits into
Nirpat3 wants to merge 4 commits into
Conversation
Completes the signup journey: sign up → verify → plan → business setup →
CONNECT POS → done. Reuses the existing aros edge control plane — no new backend
provisioning (that already exists: /api/edge/activation-codes + /api/edge/
onboarding/status).
Backend (src/server.ts): handleOnboardingComplete now ensures the tenant has a
default 'stores' row and returns its id, so the connect-POS step has a storeId to
bind an activation code to (createActivationCode requires storeExists). Reuses an
existing store if present; non-fatal if creation fails.
Frontend (OnboardingPage.tsx): new skippable 'connect-pos' step after business
setup. Pick a POS:
• Verifone (edge) → POST /api/edge/activation-codes → show the activation code
+ Win/Mac/Linux installer links + Commander-IP instructions + a managed-hosting
note; poll /api/edge/onboarding/status every 5s → 'Store connected ✓'.
• RapidRMS (cloud) → note to finish from the dashboard Connectors page.
Always skippable ('Skip for now' → complete) so POS connection never blocks signup.
Both changed files typecheck clean (pre-existing errors elsewhere in the monorepo
are unrelated). Not deploying — this touches the live signup flow, so review +
deploy is the owner's call.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…-config paths
Rework the connect-POS step for non-technical store owners. No IPs, no codes to
paste, no config — everything is auto-created server-side.
Frontend (OnboardingPage.tsx):
- Auto-provision the activation token the instant Verifone is picked (no button,
no visible code). The token is embedded in the download URL / device, so the
user never types or pastes anything.
- Two zero-config paths, presented as friendly cards:
• 📦 Ship me a plug-in device (easiest) — POST /api/edge/request-device; ops
mails a pre-configured appliance that auto-connects. Plug in + power = done.
• ⬇️ Install on a store computer (instant) — personalized installer download
(token baked in via ?token=); the app auto-discovers the Commander on the LAN,
so there is no IP or credential entry.
- Prominent live status that polls /api/edge/onboarding/status → 'You're live!'
automatically for both paths. Still fully skippable.
Backend (src/server.ts):
- handleRequestDevice: records the appliance request on the store (metadata +
audit) so ops can fulfill; token is already provisioned so the device
auto-connects. Extends the onboarding auto-provision (store already created in
the prior commit) toward 'register → live with zero technical steps'.
Both changed files typecheck clean. Not deployed (live signup flow — owner review).
Follow-ups: personalized-installer endpoint (serves the token-stamped binary) and
LAN auto-discovery in the edge agent; installer artifacts must be hosted at
download.shreai.com for the download links to resolve.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…I connector
When a store owner adds AROS to Claude/ChatGPT/Gemini, the connector's
/oauth/authorize should land them in the SAME AROS experience as the web app —
not a separate connector UI. This makes the whole product feel like one thing
regardless of entry point (web signup, AI assistant, or white-label domain).
- New /authorize route (App.tsx), wrapped in <ProtectedRoute> so an
unauthenticated user is sent through the SAME login as the web app — unified
identity, zero separate connector login. No onboarding gate (you can authorize
before finishing setup).
- ConnectorConsent.tsx — AROS-branded consent screen matching the onboarding
card styling: '{App} wants to connect', human-readable scope list (read
sales/inventory/margins, etc.), signed-in-as, 'your POS credentials never leave
your store', Allow/Deny. Allow POSTs the OAuth params + session bearer to the
connector OAuth authorize endpoint and follows its redirect (code+state) back to
the AI assistant; Deny returns access_denied.
Backend contract (grant minting) is owned by the connector OAuth service
(mib007 connector-oauth.ts) + the engineer's in-flight AROS OIDC/central-identity
work — this is the UI half. Wire the connector's /oauth/authorize to redirect to
aros.live/authorize?client_id=&redirect_uri=&scope=&state=&client_name=&connector=.
Typecheck clean. Part of the dummy-proof, one-consistent-flow onboarding (PR #31).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nsolidation plans
Three coordinated pieces for the AI-connector consistent-UX, each designed to
REMOVE duplication, not add it:
(a) White-label consent theming — ConnectorConsent now consumes the EXISTING
WhitelabelProvider (useWhitelabel): brand name, logo wordmark, and primary
button color come from the same config the rest of the app uses. A
custom-domain connector auto-brands with the customer's identity — zero new
theming system.
(b) docs/AI-CONNECTOR-CONSENT-WIRING.md — the one backend change to make the UI
live: point the connector /oauth/authorize → aros.live/authorize (reusing the
existing connector-oauth.ts grant minter + PKCE, only swapping the session
source to the AROS/shre-id bearer and returning {redirectUrl}). Retires
mib007's separate /connect consent page. Not a new flow.
(c) docs/AI-CONNECTOR-UI-CONSOLIDATION.md — resolves the aros.live-vs-mib007
user-facing-UI duplication: DECISION = aros.live React app owns ALL
user-facing UI (login/consent/connect/dashboard) for every entry point
(web, AI connector, white-label); mib007 = backend + gateway + connectors;
shre-rapidrms = canonical data. 4-step migration where each step removes a
duplicate surface; sequenced to compose with the engineer's in-flight AROS
OIDC work (feat/aros-central-identity), not collide.
Typecheck clean. Builds on the /authorize consent screen (PR #31).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes the signup journey: sign up → verify → plan → business setup → connect POS → done. Reuses the existing aros edge control plane — no new provisioning backend (
/api/edge/activation-codes+/api/edge/onboarding/statusalready exist).Backend (
src/server.ts):handleOnboardingCompletenow ensures the tenant has a defaultstoresrow and returns its id, so the step has astoreIdto bind an activation code to (createActivationCoderequiresstoreExists). Reuses an existing store; non-fatal on failure.Frontend (
OnboardingPage.tsx): new skippableconnect-posstep after business setup:POST /api/edge/activation-codes→ shows the activation code + Win/Mac/Linux installer links + Commander-IP instructions + a managed-hosting note; polls/api/edge/onboarding/statusevery 5s → 'Store connected ✓'.Both changed files typecheck clean (other monorepo errors are pre-existing/unrelated).
Not deploying — this changes the live signup flow, so review + deploy is the owner's call. Free-plan path still goes straight to dashboard (connects later); wiring it through this step too is a follow-up.
🤖 Generated with Claude Code