mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-25 08:55:58 +03:00
[GH-ISSUE #261] [BUG] Create missing landing and clerk signin page. #518
Labels
No labels
AI Content Agents
AI Content Strategy
AI Content planning
AI Marketing Tools
AI SEO
AI personalization
AI writer
ALwrity Copi-lot
Alwrity web search
Anthropic
DeepSeek
Gemini AI
Integration
LLM
OnBoarding
OnBoarding
RAG knowledgebase Memory
bug
documentation
enhancement
good first issue
help wanted
invalid
openai
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ALwrity#518
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AJaySi on GitHub (Sep 27, 2025).
Original GitHub issue: https://github.com/AJaySi/ALwrity/issues/261
Originally assigned to: @AJaySi on GitHub.
I'll scan the codebase to locate the landing page, Clerk auth integration, onboarding flow logic, and backend endpoints or middleware that support onboarding and auth. Then I'll dive into the key files those searches reveal.
[5 tools called]
I'll gather the key frontend and backend files in parallel to map the current routing, auth headers, and onboarding endpoints before outlining gaps.
[5 tools called]
I scanned the frontend routing, auth usage, onboarding flows, and backend endpoints involved. I’ll summarize what’s present and what’s missing to support your desired UX.
Landing page
Gaps vs goal:
SignedOutUX or “Get Started Free - BYOK” CTA that triggers Clerk sign-in.Needed implementation:
Landingcomponent with “Get Started Free - BYOK” using ClerkSignInButton(social logins).LandingInitialRouteHandlerClerk authentication usage
SignedIn/SignedOutrouting and no sign-in page/buttons in app shell.Gaps vs goal:
Needed implementation:
Authorization: Bearer <token>.SignedIn/SignedOutblocks for “/”, and updateProtectedRouteto check Clerk auth before onboarding.Depends(get_current_user)on onboarding and dashboard-critical endpoints.Onboarding flow
get_onboarding_statusis mocked to always completed (blocks onboarding entirely):Gaps vs goal:
Needed implementation:
get_onboarding_statusand return user-specific data.OnboardingSessionkeyed by Clerk user id).Depends(get_current_user)and readuser_idfrom token to scope progress.ProtectedRouteto:/onboardingWizardreads and writes per-user progress and completes onboarding for that specific user.End-to-end flow alignment with desired UX
/onboarding./dashboard./dashboard.Concrete implementation tasks
Landingcomponent with CTA usingSignInButton(setafterSignInUrlto/or/onboarding).SignedOut→Landing;SignedIn→InitialRouteHandler.ProtectedRouteto check Clerk auth first; if signed-out → redirect to/.Authorization: Bearer <ClerkToken>on all API requests.get_onboarding_status.Depends(get_current_user)on onboarding endpoints (status, progress, start, complete, step operations).user_idand persist onboarding per user:OnboardingSessionor extendOnboardingProgressto be user-scoped.get_onboarding_statusreturn per-user completion.implement:
Landingcomponent + routing changes.apiClient.subasuser_id).Summary
@AJaySi commented on GitHub (Sep 27, 2025):
Quick status:
Changes of note
New file frontend/src/components/Landing/Landing.tsx with a minimal marketing hero and a “Get Started Free - BYOK” button that redirects to / post sign-in.
Root route in frontend/src/App.tsx now wraps / with SignedOut → Landing and SignedIn → InitialRouteHandler.
@AJaySi commented on GitHub (Sep 27, 2025):
Next steps to implement
Add axios auth header interceptor to send Clerk token on all API calls, so onboarding status is user-specific:
In frontend/src/api/client.ts, set up a request interceptor that retrieves getToken() from Clerk and sets Authorization: Bearer .
Protect backend onboarding endpoints with auth and scope progress by user:
Add Depends(get_current_user) to /api/onboarding/status, /api/onboarding/*.
Use Clerk user id from token to read/write per-user onboarding state.
Remove the temporary mock in backend/api/onboarding.py#get_onboarding_status so the frontend routing works correctly for new vs returning users.
Update ProtectedRoute to also respect sign-in:
If not signed in, redirect to /.
If signed in and onboarding incomplete, redirect to /onboarding; else render the child.
@AJaySi commented on GitHub (Oct 9, 2025):
@Om-Singh1808 @uniqueumesh @DikshaDisciplines
I am closing this ticket as you all have verified it.