Add computer vision lesson to the ML track, and verify the Supabase layer - #22
Open
samanyugoyal2010 wants to merge 1 commit into
Open
Add computer vision lesson to the ML track, and verify the Supabase layer#22samanyugoyal2010 wants to merge 1 commit into
samanyugoyal2010 wants to merge 1 commit into
Conversation
New chapter in the ML track (order 22, after Neural Networks) teaching convolution as the core operation of computer vision: - src/lib/ml/computer-vision-data.ts: seeded 14x14 image + pure convolution - src/components/ml/ConvolutionExplorer.tsx: hero interactive (filter + strength) - src/components/ml/ComputerVisionLesson.tsx: prose in the house voice - MlLessonCover.tsx: hand-drawn SVG cover - registered the body, published, and regenerated supabase/chapters.sql (190 chapters) so completions of the lesson are allowlisted for XP Co-authored-by: samanyugoyal2010 <samanyugoyal2010@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
samanyugoyal2010
marked this pull request as ready for review
August 22, 2026 06:45
Contributor
Author
|
@735meis can you please take it from here i need db sync as well as some additional features as discussed integrated ASAP |
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.
Summary
Adds and publishes a new Machine Learning chapter, "How a Computer Sees" (
/learn/ml/computer-vision/), and wires it through to the Supabase leaderboard allowlist.The lesson teaches convolution as the core operation of computer vision: an image is a grid of brightness numbers, and a 3×3 filter slid over every pixel turns those numbers into edges, blur, and texture. Its hero interactive lets the reader pick a filter and drag a strength slider, watching the filtered image redraw in real time.
New/changed files:
src/lib/ml/computer-vision-data.ts— seeded 14×14 image (module scope,mulberry32) plus a purefilteredImage()convolution. NoMath.random/Date; notoLocaleString/Intl.src/components/ml/ConvolutionExplorer.tsx— the"use client"hero interactive: hand-written SVG grids, aSegmentedControlfor the filter, and a strength slider.src/components/ml/ComputerVisionLesson.tsx— prose composed from the shared primitives, in the house voice.src/components/ml/MlLessonCover.tsx— a hand-drawn SVG cover (miniature of the interactive).src/lib/ml-lessons.ts— chapter entry at order 22 (right after Neural Networks;from-notebook-to-productionshifts to 23), published.src/app/learn/ml/(chapters)/[slug]/page.tsx— registered the body.supabase/chapters.sql— regenerated vianpm run learn:sql(now 190 published chapters, includingcomputer-vision)."Set up Supabase"
There is no Docker, Supabase CLI, or reachable hosted project in the agent VM (the Supabase MCP needs auth), and live keys must be supplied through the Secrets panel per
docs/SUPABASE_SETUP.md. To verify the database layer regardless, I stood up a local PostgreSQL 16, added small shims forauth.jwt()and theanon/authenticatedroles, and applied the repo's realsupabase/chapters.sqlthensupabase/schema.sql— both applied cleanly. The leaderboard logic then behaved exactly as designed:computer-visionis present in the regenerated allowlist.progress_known_chapters_onlytrigger silently dropped a made-up slug (2 of 3 inserted rows survived).refresh_profile_statsrecomputed XP = 40 (20 × 2 real completions).Walkthrough
Browser demo of the published lesson and its interactive (track card → lesson → switching filters → dragging the strength slider on the Edges filter → takeaways + pager):
computer_vision_lesson_demo.mp4
Local Supabase schema + allowlist verification output:
Supabase verification log
Related Issue
No proposal issue exists — this lesson was added per direct request. A maintainer should confirm the ML-track slot before merge, per
CONTRIBUTING.md.Type of Change
Checklist
npm run checkpasses (lint + typecheck + lesson validator + build)If this touches
/learnnpm run learn:checkpassesheadingshas a matchingid="..."in the body componentMath.random(),Date.now(), ornew Date()toLocaleStringorIntl.NumberFormatsrc/components/learn/primitives/, no hand-rolled styled blocksTo show artifacts inline, enable in settings.