Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
64ca1d4
Support hand-written quick checks per track
Oct 10, 2026
fb9d2aa
Python course: hand-written quick checks and lesson fixes
Oct 10, 2026
c646986
ML and computer vision: hand-written quick checks and lesson fixes
Oct 10, 2026
8fc808d
HTML/CSS and GitHub: hand-written quick checks and lesson fixes
Oct 10, 2026
0088665
Vibecoding and Roblox: hand-written quick checks and lesson fixes
Oct 10, 2026
79cf834
Financial literacy and health in tech: hand-written quick checks and …
Oct 10, 2026
f16208b
Merge remote-tracking branch 'origin/main' into courses-improvements
Oct 10, 2026
e67d566
Update src/components/html-css/HowCssAttachesLesson.tsx
samanyugoyal2010 Oct 10, 2026
8bba554
Update src/components/html-css/DisplayAndFlowLesson.tsx
samanyugoyal2010 Oct 10, 2026
8fbbc78
Update src/components/github/RepositoriesAndTheThreeTreesLesson.tsx
samanyugoyal2010 Oct 10, 2026
6994272
Update src/components/github/WhatABranchIsLesson.tsx
samanyugoyal2010 Oct 10, 2026
12a9ceb
Update src/components/vibecoding/PromptsLesson.tsx
samanyugoyal2010 Oct 10, 2026
33f7002
Merge branch 'main' into courses-improvements
samanyugoyal2010 Oct 10, 2026
326505e
Update src/components/roblox/PartsAndPropertiesLesson.tsx
samanyugoyal2010 Oct 10, 2026
ac3c2e5
Update src/components/roblox/OutputConsole.tsx
samanyugoyal2010 Oct 10, 2026
9cc0452
Update src/components/python/StringsLesson.tsx
samanyugoyal2010 Oct 10, 2026
a3918fc
Update src/components/ml/FeatureScalingLesson.tsx
samanyugoyal2010 Oct 10, 2026
c7b025d
Update src/components/computer-vision/ConvolutionLesson.tsx
samanyugoyal2010 Oct 10, 2026
429fa73
Merge branch 'main' into courses-improvements
samanyugoyal2010 Oct 11, 2026
4d49472
Merge branch 'main' into courses-improvements
samanyugoyal2010 Oct 11, 2026
d6323cd
Merge branch 'python-ml-playground' into courses-improvements
Oct 11, 2026
da10093
Merge remote-tracking branch 'origin/main' into courses-improvements
Oct 11, 2026
e599c0d
Type authored quiz questions as 3- or 4-option tuples
Oct 11, 2026
8414407
Playground: redesigned editor and a drag-and-drop ML builder
Oct 11, 2026
69cd98b
HTML/CSS live editor and hands-on lesson moments
Oct 11, 2026
69fa136
Python course: runnable 'Try it' moments in every chapter
Oct 11, 2026
726da6e
ML and computer vision: runnable 'try it and tweak it' snippets
Oct 11, 2026
71760a3
Remake the AI resources page
Oct 11, 2026
7c21177
Declutter the course pages and lighten the course header
Oct 11, 2026
8d4fe8e
Add guided projects
Oct 11, 2026
2dfcc83
Fix review comments in GitHub, Roblox, Vibecoding, finance and health…
Oct 11, 2026
41a8ec1
Merge remote-tracking branch 'fork/courses-improvements' into courses…
Oct 11, 2026
abd47a4
Escape an apostrophe flagged by lint
Oct 11, 2026
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
6 changes: 1 addition & 5 deletions src/app/courses/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { CoursesHero } from "@/components/courses/CoursesHero";
import {
CATALOG,
TOPICS,
formatDuration,
getTrackOutline,
getTrackStats,
} from "@/components/courses/catalog";
Expand Down Expand Up @@ -39,7 +38,6 @@ export default function CoursesPage() {
// Lessons lead on every card — they are ours and one click away, where
// enrolling leaves the site. Every figure below is counted, not typed.
const items: CatalogItem[] = CATALOG.map((course) => {
const stats = getTrackStats(course.track);
return {
track: course.track,
title: course.title,
Expand All @@ -49,14 +47,12 @@ export default function CoursesPage() {
topicLabel: TOPICS.find((topic) => topic.id === course.topic)?.label ?? "",
enrol: course.enrol,
href: TRACK_ROUTES[course.track].href,
stats,
duration: formatDuration(stats.minutes),
outline: getTrackOutline(course.track),
cover: <TopicCover variant={course.cover} />,
};
});

const totalChapters = items.reduce((sum, item) => sum + item.stats.chapters, 0);
const totalChapters = CATALOG.reduce((sum, course) => sum + getTrackStats(course.track).chapters, 0);
const totalEnrolments = CATALOG.reduce((sum, course) => sum + course.enrol.length, 0);
// Suggested to newcomers by the courses' own tags, not by a hand-picked list.
const startHere = CATALOG.filter((course) =>
Expand Down
2 changes: 1 addition & 1 deletion src/app/learn/financial-literacy/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function LearnFinancialLiteracyPage() {
<CourseHome
track="financial-literacy"
title="Money skills, from your first budget to your first plan"
description="CodeWithPurpose lessons that turn personal finance into a set of skills you actually use, not jargon you look up. Twenty-four chapters, no experience required."
description="CodeWithPurpose lessons that turn personal finance into a set of skills you actually use, not jargon you look up. No experience required."
udemy={{ href: FINANCIAL_LITERACY_COURSE_HREF, label: "Udemy Financial Literacy Course" }}
chapterMedia={(chapter) => <FinancialLiteracyLessonCover slug={chapter.slug} />}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/app/learn/github/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function LearnGithubPage() {
<CourseHome
track="github"
title="Git and GitHub, from your first commit to your first open-source pull request"
description="CodeWithPurpose lessons that teach the tool and the platform as one subject. Twenty-one chapters: commits, branches, conflicts, rebasing, pull requests, code review, Actions, and contributing to somebody else's project."
description="CodeWithPurpose lessons that teach the tool and the platform as one subject. Commits, branches, conflicts, rebasing, pull requests, code review, Actions, and contributing to somebody else's project."
udemy={{ href: GITHUB_COURSE_HREF, label: "Udemy GitHub Course" }}
chapterMedia={(chapter) => <GithubLessonCover slug={chapter.slug} />}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/app/learn/health-in-tech/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function LearnHealthInTechPage() {
<CourseHome
track="health-in-tech"
title="Where healthcare meets technology, chapter by chapter"
description="CodeWithPurpose lessons that turn health tech into a subject you actually understand, not headlines you half-follow. Twenty-four chapters, no medical or coding background required."
description="CodeWithPurpose lessons that turn health tech into a subject you actually understand, not headlines you half-follow. No medical or coding background required."
udemy={{ href: HEALTH_IN_TECH_COURSE_HREF, label: "Udemy Health in Tech Course" }}
chapterMedia={(chapter) => <HealthInTechLessonCover slug={chapter.slug} />}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/app/learn/html-css/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function LearnHtmlCssPage() {
<CourseHome
track="html-css"
title="HTML and CSS, from one file to a page you can send someone"
description="CodeWithPurpose lessons that build one real page by hand and explain the browser underneath it. Twenty-four chapters: elements, semantic markup, the cascade, the box model, flexbox, grid, accessibility, and publishing. No framework, no build step."
description="CodeWithPurpose lessons that build one real page by hand and explain the browser underneath it. Elements, semantic markup, the cascade, the box model, flexbox, grid, accessibility, and publishing. No framework, no build step."
udemy={{ href: HTML_CSS_COURSE_HREF, label: "Udemy HTML & CSS Course" }}
chapterMedia={(chapter) => <HtmlCssLessonCover slug={chapter.slug} />}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/app/learn/python/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function LearnPythonPage() {
<CourseHome
track="python"
title="Python, from your first line to your first library"
description="CodeWithPurpose lessons that turn Python into a language you actually think in, not one you look up. Thirty-one chapters, no setup required."
description="CodeWithPurpose lessons that turn Python into a language you actually think in, not one you look up. No setup required."
udemy={{ href: PYTHON_COURSE_HREF, label: "Udemy Python Course" }}
chapterMedia={(chapter) => <PythonLessonCover slug={chapter.slug} />}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/app/learn/roblox/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function LearnRobloxPage() {
<CourseHome
track="roblox"
title="Roblox Studio, from a blank baseplate to a published obby"
description="CodeWithPurpose lessons that build one real obstacle course in Luau, and explain the engine underneath it as you go. Fourteen chapters, and Studio is free."
description="CodeWithPurpose lessons that build one real obstacle course in Luau, and explain the engine underneath it as you go. Studio is free."
udemy={{ href: ROBLOX_COURSE_HREF, label: "Udemy Roblox Course" }}
chapterMedia={(chapter) => <RobloxLessonCover slug={chapter.slug} />}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/app/playground/opengraph-image.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { OG_CONTENT_TYPE, OG_SIZE, ogImage } from "@/lib/og-image";

export const alt = "CodeWithPurpose code playground: run Python in your browser";
export const alt = "CodeWithPurpose code playground: run Python and build ML models in your browser";
export const size = OG_SIZE;
export const contentType = OG_CONTENT_TYPE;

Expand Down
27 changes: 19 additions & 8 deletions src/app/playground/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { Reveal } from "@/components/Reveal";
import BlurText from "@/components/reactbits/BlurText";
import { PlaygroundIsland } from "@/components/playground/PlaygroundIsland";
import { PYODIDE_VERSION } from "@/components/playground/protocol";
import { LEARN_ML_HREF, LEARN_PYTHON_HREF } from "@/lib/links";
import { LEARN_ML_HREF, LEARN_PYTHON_HREF, PROJECTS_HREF } from "@/lib/links";

const DESCRIPTION =
"Write and run real Python, NumPy, pandas, scikit-learn and matplotlib in your browser. Free, no sign-up, and your code never leaves your device.";
"Write and run real Python, NumPy, pandas, scikit-learn and matplotlib in your browser, or drag blocks together to train a machine-learning model. Free, no sign-up, and your code never leaves your device.";

export const metadata: Metadata = {
title: "Code Playground",
Expand Down Expand Up @@ -37,12 +37,12 @@ const HOW_IT_WORKS = [
body: "There is no server and no account. Your code is saved in this browser only, and Share packs it into the link itself, after the #, which browsers never send to a server.",
},
{
title: "Libraries load when you import them",
body: "The first Run downloads Python (about 10 MB). Importing numpy, pandas, scikit-learn or matplotlib fetches that library the first time; after that your browser keeps a copy.",
title: "The ML builder writes real code",
body: "Each block you drag in becomes a commented section of ordinary scikit-learn code, shown beside the pipeline. Open it in the editor whenever you want to change it by hand.",
},
{
title: "A few honest limits",
body: "Runs stop after 30 seconds. input() reads from an answer box you fill in before running, because the page can't pause Python mid-run. There's no internet access or access to files on your computer from inside Python.",
title: "Good to know",
body: "The first Run downloads Python (about 10 MB), and big libraries load the first time you import them; after that your browser keeps a copy. Runs stop after 30 seconds, input() reads from an answer box you fill in first, and Python here has no internet access.",
},
] as const;

Expand All @@ -62,10 +62,21 @@ export default function PlaygroundPage() {
className="home-display mt-3 text-[2rem] leading-[1.05] tracking-[-0.02em] md:text-[2.75rem] lg:text-[3.25rem]"
/>
<p className="mt-4 max-w-2xl text-lg leading-[1.5] text-[var(--home-ink-soft)]">
Pick a starter or write your own, then press Run. Python, NumPy, pandas,
scikit-learn and matplotlib all work, for free, with no sign-up, and your
Pick a starter or write your own, then press Run. Or open the ML builder
and drag blocks together to train a real model. Free, no sign-up, and your
code never leaves this page.
</p>
<p className="mt-3 text-[0.9375rem] text-[var(--home-ink-soft)]">
Building a web page instead?{" "}
<Link href="/playground/web/" className="font-medium text-[var(--home-link-green)] underline underline-offset-2">
Open the HTML &amp; CSS editor
</Link>
, or pick a guided{" "}
<Link href={PROJECTS_HREF} className="font-medium text-[var(--home-link-green)] underline underline-offset-2">
project
</Link>
.
</p>
</Reveal>

<div className="mt-8 md:mt-10">
Expand Down
92 changes: 92 additions & 0 deletions src/app/playground/web/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
import type { Metadata } from "next";
import Link from "next/link";
import { PageShell } from "@/components/PageShell";
import { WebPlaygroundIsland } from "@/components/webplay/WebPlaygroundIsland";
import { LEARN_HTML_CSS_HREF, PLAYGROUND_HREF } from "@/lib/links";

const DESCRIPTION =
"Write HTML, CSS and JavaScript and watch the page update as you type. Free, no sign-up, and your code stays in your browser.";

export const metadata: Metadata = {
title: "Web Playground",
description: DESCRIPTION,
alternates: { canonical: "/playground/web/" },
openGraph: {
title: "Web Playground | CodeWithPurpose",
description: DESCRIPTION,
url: "/playground/web/",
type: "website",
},
twitter: {
card: "summary_large_image",
title: "Web Playground | CodeWithPurpose",
description: DESCRIPTION,
},
};

const NOTES = [
{
title: "It updates as you type",
body: "Pause for a moment and the preview redraws. Switch between the HTML, CSS and JS tabs; they all feed the same page.",
},
{
title: "Nothing leaves your browser",
body: "Your code is saved in this browser only. Share puts it in the link itself, after the #, which browsers never send to a server.",
},
{
title: "The preview is walled off",
body: "It runs in a sandboxed frame with no network access, so external images, fonts and scripts won't load. Inline code and data: URLs work.",
},
] as const;

export default function WebPlaygroundPage() {
return (
<PageShell>
<section className="border-b-[0.5px] border-[var(--home-hairline)] bg-[var(--home-page)] pt-10 pb-12 md:pt-14 md:pb-16">
<div className="mx-auto w-full max-w-[85rem] px-5 md:px-10">
<p className="font-[family-name:var(--learn-font-mono)] text-[0.8125rem] font-medium tracking-[0.12em] text-[var(--home-link-green)] uppercase">
Web playground
</p>
<h1 className="home-display mt-3 text-[2rem] leading-[1.05] tracking-[-0.02em] md:text-[2.75rem] lg:text-[3.25rem]">
Build a web page, live
</h1>
<p className="mt-4 max-w-2xl text-lg leading-[1.5] text-[var(--home-ink-soft)]">
Pick a starter or clear it out and write your own. Change one thing, watch the preview,
and keep going.
</p>

<div className="mt-8 md:mt-10">
<WebPlaygroundIsland />
</div>
</div>
</section>

<section aria-labelledby="web-playground-notes" className="py-12 md:py-20">
<div className="mx-auto w-full max-w-[85rem] px-5 md:px-10">
<h2 id="web-playground-notes" className="home-display text-[1.75rem] leading-[1.1] md:text-[2.25rem]">
Good to know
</h2>
<div className="mt-8 grid gap-x-10 gap-y-8 md:grid-cols-3">
{NOTES.map((item) => (
<div key={item.title} className="border-t-[0.5px] border-[var(--home-hairline-strong)] pt-5">
<h3 className="text-[1.0625rem] font-semibold text-[var(--home-ink)]">{item.title}</h3>
<p className="mt-2 text-[0.9375rem] leading-[1.6] text-[var(--home-ink-soft)]">{item.body}</p>
</div>
))}
</div>
<p className="mt-10 text-[0.9375rem] text-[var(--home-ink-soft)]">
New to all this? The{" "}
<Link href={LEARN_HTML_CSS_HREF} className="font-medium text-[var(--home-link-green)] underline underline-offset-2">
HTML and CSS track
</Link>{" "}
starts from what a web page is. Prefer Python? Try the{" "}
<Link href={PLAYGROUND_HREF} className="font-medium text-[var(--home-link-green)] underline underline-offset-2">
Python playground
</Link>
.
</p>
</div>
</section>
</PageShell>
);
}
19 changes: 19 additions & 0 deletions src/app/projects/[slug]/opengraph-image.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { OG_CONTENT_TYPE, OG_SIZE, ogImage } from "@/lib/og-image";
import { PROJECTS, getProject, trackLabel } from "@/lib/projects";

export const alt = "A guided project from CodeWithPurpose";
export const size = OG_SIZE;
export const contentType = OG_CONTENT_TYPE;

export function generateStaticParams() {
return PROJECTS.map((project) => ({ slug: project.slug }));
}

export default async function Image({ params }: { params: Promise<{ slug: string }> }) {
const { slug } = await params;
const project = getProject(slug);
return ogImage({
eyebrow: project ? `${trackLabel(project.track)} project` : "Projects",
title: project?.title ?? "Guided build projects",
});
}
Loading
Loading