feat: integrate dynamic help center with runtime-configured knowledge base

This commit is contained in:
Ashwin Kumar 2026-04-06 03:33:29 +02:00
parent d008cd184d
commit 19a0850c49
5 changed files with 724 additions and 235 deletions

File diff suppressed because it is too large Load diff

View file

@ -78,3 +78,18 @@ export type OnboardingSubmission = {
submittedAt: string;
values: Record<string, unknown>;
};
export type RuntimeKBArticle = {
id: string;
title: string;
category: string;
content: string;
author: string;
isPublished: boolean;
viewCount: number;
lastUpdated: string;
};
export type RuntimeKBConfig = {
articles: RuntimeKBArticle[];
};

View file

@ -312,7 +312,7 @@ export default function LoginRoute() {
<div class="auth-footer-row">
<p class="footer-text">Secure login with email verification.</p>
<p class="note">New user? <A href="/users/choose-role">Sign Up</A></p>
<p class="note">New user? <A href="/signup">Sign Up</A></p>
</div>
<Show when={error()}>

View file

@ -57,9 +57,8 @@ export default function SignupRoute() {
const navigate = useNavigate();
const [search] = useSearchParams();
onMount(() => {
const intent = String(search.intent || '').trim();
const role = String(search.role || '').trim();
if (!intent && !role) navigate('/users/choose-role', { replace: true });
// Legacy redirect to choose-role removed for dashboard-first flow.
// If no intent/role provided, normalizeIntent will default to job_seeker.
});
const [step, setStep] = createSignal<'register' | 'verify'>('register');

View file

@ -1,84 +0,0 @@
import { A } from '@solidjs/router';
import { For } from 'solid-js';
import PublicBackground from '~/components/PublicBackground';
import PublicHeader from '~/components/PublicHeader';
type RoleChoice = {
title: string;
description: string;
cta: string;
href: string;
image: string;
};
const MAIN_ROLES: RoleChoice[] = [
{
title: 'Company',
description: 'Post verified jobs, manage applicants, and hire with trust.',
cta: 'Continue as Company',
href: '/signup?intent=company',
image: 'https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=400&auto=format&fit=crop',
},
{
title: 'Job Seeker',
description: 'Create your profile and apply to approved opportunities.',
cta: 'Continue as Job Seeker',
href: '/signup?intent=job_seeker',
image: 'https://images.unsplash.com/photo-1450101499163-c8848c66ca85?q=80&w=400&auto=format&fit=crop',
},
{
title: 'Customer',
description: 'Post requirements and receive responses from verified professionals.',
cta: 'Continue as Customer',
href: '/signup?intent=customer',
image: 'https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?q=80&w=400&auto=format&fit=crop',
},
{
title: 'Professional',
description: 'Join as a service provider and grow with quality leads.',
cta: 'Continue as Professional',
href: '/signup?intent=professional',
image: 'https://images.unsplash.com/photo-1498050108023-c5249f4df085?q=80&w=400&auto=format&fit=crop',
},
];
export default function ChooseRolePage() {
return (
<main class="choose-role-page">
<PublicBackground />
<PublicHeader />
<div class="choose-role-container">
<header class="choose-role-header">
<h1>Choose your role</h1>
<p>Select your path once and we will open the correct signup flow for you.</p>
</header>
<section class="choose-role-section">
<h2 class="section-title">Start here</h2>
<p class="section-subtitle">Pick the role that matches what you want to do on Nxtgauge.</p>
<div class="roles-grid main-roles-grid">
<For each={MAIN_ROLES}>
{(role) => (
<A class="role-card" href={role.href}>
<span class="role-media">
<img class="role-image" src={role.image} alt={role.title} loading="lazy" />
</span>
<h3 class="role-title">{role.title}</h3>
<p class="role-description">{role.description}</p>
<span class="role-cta">{role.cta}</span>
</A>
)}
</For>
</div>
</section>
<footer class="choose-role-footer">
<p class="footer-text">
Already have an account? <A href="/login">Login</A>
</p>
</footer>
</div>
</main>
);
}