Skip to content

fix: email sending on onboarding & start of new flow #586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ NEXT_PRIVATE_OPEN_AI_ORG=
# Keys used to connect to Claude (only needed for ai development)
ANTHROPIC_API_KEY=

# already preset.
NEXT_PUBLIC_ENV=development

# secret used to authenticate cron jobs, not needed for dev
CRON_SECRET=

Expand Down
3 changes: 0 additions & 3 deletions src/actions/user/account/create-coupon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ import { getUser } from '../authed/get-user';
* Upon user signup, we create a 60% off their first 3 three
* months of TechBlitz premium.
* Eligible for 72 hours after signup.
*
* We are only hitting this action from within other actions,
* so we can pass the userUid as a parameter.
*/
export const createCouponOnSignup = async () => {
const user = await getUser();
Expand Down
2 changes: 1 addition & 1 deletion src/actions/user/authed/get-user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { UserRecord } from '@/types';
import { revalidateTag } from 'next/cache';

/**
* Get the user from the server - used in api routes, server componets & server actions
* Get the user from the server - used in api routes, server components & server actions
*
* @returns User | null
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export default async function RoadmapPage({ params }: { params: { slug: string }
chip={<HeroChip />}
/>
<div className="flex flex-col lg:flex-row gap-12 xl:gap-24">
<div className="w-full lg:w-[55%] flex-1">
<div id="roadmap-list" className="w-full lg:w-[55%] flex-1">
<Suspense fallback={<StudyPathsListSkeleton />}>
<StudyPathSections
studyPathSections={studyPathSectionData}
Expand Down
85 changes: 57 additions & 28 deletions src/app/(app)/(default_layout)/(roadmaps)/roadmaps/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip
import { createMetadata } from '@/utils/seo';
import { getStudyPathsAndGroupByCategory } from '@/utils/data/study-paths/get';
import { getBaseUrl } from '@/utils';
import { roadmapPageSteps } from '@/lib/onborda';

// types
import { WebPageJsonLd } from '@/types';
import { Onborda, OnbordaProvider } from 'onborda';
import { TourCard } from '@/components/app/shared/question/tour-card';
import TourStartModal from '@/components/app/shared/question/tour-start-modal';
import { useUserServer } from '@/hooks/use-user-server';

export async function generateMetadata() {
return createMetadata({
Expand Down Expand Up @@ -58,7 +63,15 @@ const heroDescription = (
</div>
);

export default async function ExploreQuestionsPage() {
export default async function ExploreQuestionsPage({
searchParams,
}: {
searchParams: { [key: string]: string | string[] | undefined };
}) {
const user = await useUserServer();
// used to determine if the onboarding tour guide needs to be shown.
const { onboarding } = searchParams;

// create json ld
const jsonLd: WebPageJsonLd = {
'@context': 'https://schema.org',
Expand Down Expand Up @@ -109,35 +122,51 @@ export default async function ExploreQuestionsPage() {
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
/>
<div className="flex flex-col gap-y-12 max-w-7xl mx-auto">
<Hero heading="Library" subheading={heroDescription} container={true} />
<div className="lg:container flex flex-col lg:flex-row mt-5 gap-16">
<div className="w-full flex flex-col gap-12">
{categories.map((category) => (
<div key={category} className="space-y-6">
<div className="flex items-center gap-x-2">
<h2 className="text-2xl font-bold text-white">{category}</h2>
{studyPathsByCategory[category][0].categoryToolTip && (
<Tooltip>
<TooltipTrigger asChild>
<InfoIcon className="size-4" />
</TooltipTrigger>
<TooltipContent>
{studyPathsByCategory[category][0].categoryToolTip}
</TooltipContent>
</Tooltip>
)}
</div>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{studyPathsByCategory[category].map((studyPath) => (
<StudyPathCard key={studyPath.uid} studyPath={studyPath} />
))}
</div>
<OnbordaProvider>
<Onborda
steps={roadmapPageSteps('/roadmaps/javascript-fundamentals', '/roadmaps')}
showOnborda={true}
shadowRgb="0,0,0"
shadowOpacity="0.8"
cardComponent={TourCard}
cardTransition={{ duration: 0.3, type: 'tween' }}
>
<TourStartModal user={user} tourName="roadmap-tour" queryParam="onboarding=true" />
<div className="flex flex-col gap-y-12 max-w-7xl mx-auto">
<Hero heading="Library" subheading={heroDescription} container={true} />
<div className="lg:container flex flex-col lg:flex-row mt-5 gap-16">
<div className="w-full flex flex-col gap-12">
{categories.map((category) => (
<div
key={category}
className="space-y-6"
id={category === 'Full-stack Development' ? 'first-roadmap-category' : ''}
>
<div className="flex items-center gap-x-2">
<h2 className="text-2xl font-bold text-white">{category}</h2>
{studyPathsByCategory[category][0].categoryToolTip && (
<Tooltip>
<TooltipTrigger asChild>
<InfoIcon className="size-4" />
</TooltipTrigger>
<TooltipContent>
{studyPathsByCategory[category][0].categoryToolTip}
</TooltipContent>
</Tooltip>
)}
</div>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{studyPathsByCategory[category].map((studyPath) => (
<StudyPathCard key={studyPath.uid} studyPath={studyPath} />
))}
</div>
</div>
))}
</div>
))}
</div>
</div>
</div>
</div>
</Onborda>
</OnbordaProvider>
</>
);
}
4 changes: 2 additions & 2 deletions src/app/(app)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { getSuggestions } from '@/utils/data/questions/get-suggestions';
// onboarding
import { Onborda, OnbordaProvider } from 'onborda';
import { TourCard } from '@/components/app/shared/question/tour-card';
import { steps } from '@/lib/onborda';
import { questionPageSteps } from '@/lib/onborda';

export async function generateMetadata() {
return createMetadata({
Expand All @@ -39,7 +39,7 @@ export default async function RootLayout({ children }: { children: React.ReactNo
<body>
<OnbordaProvider>
<Onborda
steps={steps()}
steps={questionPageSteps()}
showOnborda={true}
shadowRgb="0,0,0"
shadowOpacity="0.8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ export default async function JavascriptArrayCheatSheet({ params }: BlogPostPara
<CallToActionBlock
title="Learn to code, faster"
description={`Join ${userCount}+ developers who are accelerating their coding skills with TechBlitz.`}
leftCta={{
title: 'Begin Your Journey',
href: '/signup',
}}
/>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ export default async function JavascriptRegularExpressionCheatSheet({ params }:
<CallToActionBlock
title="Learn to code, faster"
description={`Join ${userCount}+ developers who are accelerating their coding skills with TechBlitz.`}
leftCta={{
title: 'Begin Your Journey',
href: '/signup',
}}
/>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ export default async function JavascriptCodingTest({ params }: BlogPostParams) {
<CallToActionBlock
title="Learn to code, faster"
description={`Join ${userCount}+ developers who are accelerating their coding skills with TechBlitz.`}
leftCta={{
title: 'Begin Your Journey',
href: '/signup',
}}
/>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ export default async function JavascriptInterviewQuestionsForSeniorDevelopers({
<CallToActionBlock
title="Learn to code, faster"
description={`Join ${userCount}+ developers who are accelerating their coding skills with TechBlitz.`}
leftCta={{
title: 'Begin Your Journey',
href: '/signup',
}}
/>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ export default async function HowDoesJavascriptWork({ params }: BlogPostParams)
<CallToActionBlock
title="Learn to code, faster"
description={`Join ${userCount}+ developers who are accelerating their coding skills with TechBlitz.`}
leftCta={{
title: 'Begin Your Journey',
href: '/signup',
}}
/>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ export default async function HowToWriteAFunctionInJavascript({ params }: BlogPo
<CallToActionBlock
title="Learn to code, faster"
description={`Join ${userCount}+ developers who are accelerating their coding skills with TechBlitz.`}
leftCta={{
title: 'Begin Your Journey',
href: '/signup',
}}
/>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ export default async function HowToWriteJavascript({ params }: BlogPostParams) {
<CallToActionBlock
title="Learn to code, faster"
description={`Join ${userCount}+ developers who are accelerating their coding skills with TechBlitz.`}
leftCta={{
title: 'Begin Your Journey',
href: '/signup',
}}
/>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ export default async function HtmlConditionalStatement({ params }: BlogPostParam
<CallToActionBlock
title="Learn to code, faster"
description={`Join ${userCount}+ developers who are accelerating their coding skills with TechBlitz.`}
leftCta={{
title: 'Begin Your Journey',
href: '/signup',
}}
/>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ export default async function JavaScriptConditionals({ params }: BlogPostParams)
<CallToActionBlock
title="Learn to code, faster"
description={`Join ${userCount}+ developers who are accelerating their coding skills with TechBlitz.`}
leftCta={{
title: 'Begin Your Journey',
href: '/signup',
}}
/>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ export default async function JavaScriptFormatStringsWithVariables({ params }: B
<CallToActionBlock
title="Learn to code, faster"
description={`Join ${userCount}+ developers who are accelerating their coding skills with TechBlitz.`}
leftCta={{
title: 'Begin Your Journey',
href: '/signup',
}}
/>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ export default async function JavaScriptNamingConventions({ params }: BlogPostPa
<CallToActionBlock
title="Learn to code, faster"
description={`Join ${userCount}+ developers who are accelerating their coding skills with TechBlitz.`}
leftCta={{
title: 'Begin Your Journey',
href: '/signup',
}}
/>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ export default async function JavaScriptNestedConditionals({ params }: BlogPostP
<CallToActionBlock
title="Learn to code, faster"
description={`Join ${userCount}+ developers who are accelerating their coding skills with TechBlitz.`}
leftCta={{
title: 'Begin Your Journey',
href: '/signup',
}}
/>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ export default async function LooseVsStrictEqualityInJavascript({ params }: Blog
<CallToActionBlock
title="Learn to code, faster"
description={`Join ${userCount}+ developers who are accelerating their coding skills with TechBlitz.`}
leftCta={{
title: 'Begin Your Journey',
href: '/signup',
}}
/>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ export default async function PrimitiveTypesInJavascript({ params }: BlogPostPar
<CallToActionBlock
title="Learn to code, faster"
description={`Join ${userCount}+ developers who are accelerating their coding skills with TechBlitz.`}
leftCta={{
title: 'Begin Your Journey',
href: '/signup',
}}
/>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@ export default async function JavascriptProgrammingChallengesForBeginners({
<CallToActionBlock
title="Learn to code, faster"
description={`Join ${userCount}+ developers who are accelerating their coding skills with TechBlitz.`}
leftCta={{
title: 'Begin Your Journey',
href: '/signup',
}}
/>
</div>

Expand Down
4 changes: 0 additions & 4 deletions src/app/(marketing)/(landing-pages)/coding-roadmap/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,6 @@ export default function CodingRoadmapPage() {
<CallToActionBlock
title="A personalized approach to learning to code."
description="Create your own progression path with our personalized roadmaps, designed to help you grow as a developer."
leftCta={{
title: 'Create Your Roadmap',
href: '/signup',
}}
/>
</div>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,6 @@ export default function JavascriptCodingQuestionsPage() {
<CallToActionBlock
title="A personalized approach to learning JavaScript."
description="Learn JavaScript with ease and get the skills you need to land your dream job."
leftCta={{
title: 'Sign up for free',
href: '/signup',
}}
/>
</div>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,6 @@ export default function JavascriptForBeginnersPage() {
<CallToActionBlock
title="Begin Your Coding Adventure"
description="Learn JavaScript from scratch with guidance every step of the way. Join thousands of beginners who started their coding journey with TechBlitz."
leftCta={{
title: 'Start Learning for Free',
href: '/signup',
}}
/>
</div>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,6 @@ export default function JavascriptRoadmapPage() {
<CallToActionBlock
title="A personalized approach to learning JavaScript."
description="Create your own progression path with our personalized roadmaps, designed to help you grow as a JavaScript developer."
leftCta={{
title: 'Create Your JavaScript Roadmap',
href: '/signup',
}}
/>
</div>
</>
Expand Down
4 changes: 0 additions & 4 deletions src/app/(marketing)/(landing-pages)/react-roadmap/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,6 @@ export default function ReactRoadmapPage() {
<CallToActionBlock
title="Your Personalized Path to React Mastery"
description="Build your custom learning roadmap with our adaptive platform, designed to help you become a proficient React developer."
leftCta={{
title: 'Start Your React Journey',
href: '/signup',
}}
/>
</div>
</>
Expand Down
4 changes: 0 additions & 4 deletions src/app/(marketing)/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,6 @@ export default async function BlogPost({ params }: BlogPostParams) {
<CallToActionBlock
title="Learning to code made easier"
description={`Join ${userCount}+ developers who are accelerating their coding skills with TechBlitz.`}
leftCta={{
title: 'Begin Your Journey',
href: '/signup',
}}
/>
</div>
</div>
Expand Down
Loading