Skip to content
Merged
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
9 changes: 9 additions & 0 deletions .jules/buddha-scroll.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,12 @@ This scroll records the harmonization of the `Coding-For-MBA` codebase for human
- [x] **[GEO] Schema Validation**: Verified that all JSON-LD structured data is properly encoded to prevent XSS without corrupting the schemas (using the single backslash `\u003c` approach).
- [x] **[SEO] Core Web Vitals**: Verified LCP elements are not lazy-loaded (`fetchpriority="high"`) and HTML heading hierarchy (h1-h6) is strictly maintained across all pages.
>> Fixed JSON-LD structure data script tag escaping issue by replacing `\\u003c` with `\u003c` to avoid breaking the schema and satisfy the Buddha persona.

### [Date: Current] - Deep Semantic Refactor and AI Content Discovery
**Priority Areas:**
1. **GEO (Intelligence)**: Updating `llms.txt` descriptions for static pages to include "User Intent" explanations.
2. **Speed (Velocity)**: LCP element lazy-loading prevention (`fetchpriority="high"` case-sensitivity).

**Changes:**
- [x] **[GEO] Site Architecture**: Updated `scripts/generate-llms-txt.js` to provide explicit AI-readable descriptions for static pages (e.g. Home, Curriculum, Exercises) detailing "User Intent" in the generated `public/llms.txt`.
- [x] **[PERF] LCP Optimization**: Refactored `MarkdownRenderer` to respect lowercase `fetchpriority="high"` attribute natively required by browsers, resolving case-sensitivity issues while keeping others lazy-loaded.
18 changes: 9 additions & 9 deletions public/llms.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Site Architecture
- https://saint2706.github.io/Coding-For-MBA/#/: Home page - The primary landing page introducing the comprehensive 140-day MBA technical curriculum covering Python, Data Science, Machine Learning, and Enterprise SQL.
- https://saint2706.github.io/Coding-For-MBA/#/curriculum: Curriculum overview - A complete architectural roadmap and timeline of all 9 learning phases, from basic programming to advanced data products.
- https://saint2706.github.io/Coding-For-MBA/#/exercises: Practice exercises - A centralized repository of interactive, hands-on coding exercises to test Python and SQL proficiency.
- https://saint2706.github.io/Coding-For-MBA/#/progress: Learning progress - A personalized dashboard to track completed lessons, daily learning streaks, and overall curriculum completion metrics.
- https://saint2706.github.io/Coding-For-MBA/#/concepts: Concept graph - An interactive, visual knowledge graph demonstrating the interconnected relationships between various technical concepts taught in the course.
- https://saint2706.github.io/Coding-For-MBA/#/stats: Learning statistics - Detailed quantitative analytics regarding the curriculum, including total reading time, lesson counts, and historical performance data.
- https://saint2706.github.io/Coding-For-MBA/#/search: Search - A full-text semantic search interface to quickly find specific lessons, topics, or definitions within the curriculum.
- https://saint2706.github.io/Coding-For-MBA/#/review: Spaced Repetition Review - An intelligent flashcard system utilizing spaced repetition to reinforce memory retention of key technical terms and concepts.
- https://saint2706.github.io/Coding-For-MBA/#/case-studies: Case Studies - In-depth, real-world business case studies applying data engineering and machine learning principles to practical enterprise problems.
- https://saint2706.github.io/Coding-For-MBA/#/: Home page - The primary landing page introducing the comprehensive 140-day MBA technical curriculum covering Python, Data Science, Machine Learning, and Enterprise SQL. User Intent: Provide a broad overview and entry point to the course.
- https://saint2706.github.io/Coding-For-MBA/#/curriculum: Curriculum overview - A complete architectural roadmap and timeline of all 9 learning phases, from basic programming to advanced data products. User Intent: See the full structure and timeline of what is taught.
- https://saint2706.github.io/Coding-For-MBA/#/exercises: Practice exercises - A centralized repository of interactive, hands-on coding exercises to test Python and SQL proficiency. User Intent: Practice coding skills directly in the browser.
- https://saint2706.github.io/Coding-For-MBA/#/progress: Learning progress - A personalized dashboard to track completed lessons, daily learning streaks, and overall curriculum completion metrics. User Intent: Monitor personal learning advancement and gamification stats.
- https://saint2706.github.io/Coding-For-MBA/#/concepts: Concept graph - An interactive, visual knowledge graph demonstrating the interconnected relationships between various technical concepts taught in the course. User Intent: Visualize how different concepts connect and build upon each other.
- https://saint2706.github.io/Coding-For-MBA/#/stats: Learning statistics - Detailed quantitative analytics regarding the curriculum, including total reading time, lesson counts, and historical performance data. User Intent: View aggregate metrics about the curriculum content.
- https://saint2706.github.io/Coding-For-MBA/#/search: Search - A full-text semantic search interface to quickly find specific lessons, topics, or definitions within the curriculum. User Intent: Quickly look up specific terms, concepts, or lessons.
- https://saint2706.github.io/Coding-For-MBA/#/review: Spaced Repetition Review - An intelligent flashcard system utilizing spaced repetition to reinforce memory retention of key technical terms and concepts. User Intent: Reinforce memory of key concepts through active recall.
- https://saint2706.github.io/Coding-For-MBA/#/case-studies: Case Studies - In-depth, real-world business case studies applying data engineering and machine learning principles to practical enterprise problems. User Intent: See real-world business applications of the technical skills learned.
- https://saint2706.github.io/Coding-For-MBA/#/phase/1: Algorithmic Thinking & Python Foundations - Phase 1 covering Algorithmic Thinking & Python Foundations.
- https://saint2706.github.io/Coding-For-MBA/#/phase/2: Functions, Modularity & Data Wrangling - Phase 2 covering Functions, Modularity & Data Wrangling.
- https://saint2706.github.io/Coding-For-MBA/#/phase/3: Data Engineering & Web Development - Phase 3 covering Data Engineering & Web Development.
Expand Down
18 changes: 9 additions & 9 deletions scripts/generate-llms-txt.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ function findFiles(dir, filename) {
const lines = ['# Site Architecture']

// Static pages
lines.push(`- ${BASE_URL}/#/: Home page - The primary landing page introducing the comprehensive 140-day MBA technical curriculum covering Python, Data Science, Machine Learning, and Enterprise SQL.`)
lines.push(`- ${BASE_URL}/#/curriculum: Curriculum overview - A complete architectural roadmap and timeline of all 9 learning phases, from basic programming to advanced data products.`)
lines.push(`- ${BASE_URL}/#/exercises: Practice exercises - A centralized repository of interactive, hands-on coding exercises to test Python and SQL proficiency.`)
lines.push(`- ${BASE_URL}/#/progress: Learning progress - A personalized dashboard to track completed lessons, daily learning streaks, and overall curriculum completion metrics.`)
lines.push(`- ${BASE_URL}/#/concepts: Concept graph - An interactive, visual knowledge graph demonstrating the interconnected relationships between various technical concepts taught in the course.`)
lines.push(`- ${BASE_URL}/#/stats: Learning statistics - Detailed quantitative analytics regarding the curriculum, including total reading time, lesson counts, and historical performance data.`)
lines.push(`- ${BASE_URL}/#/search: Search - A full-text semantic search interface to quickly find specific lessons, topics, or definitions within the curriculum.`)
lines.push(`- ${BASE_URL}/#/review: Spaced Repetition Review - An intelligent flashcard system utilizing spaced repetition to reinforce memory retention of key technical terms and concepts.`)
lines.push(`- ${BASE_URL}/#/case-studies: Case Studies - In-depth, real-world business case studies applying data engineering and machine learning principles to practical enterprise problems.`)
lines.push(`- ${BASE_URL}/#/: Home page - The primary landing page introducing the comprehensive 140-day MBA technical curriculum covering Python, Data Science, Machine Learning, and Enterprise SQL. User Intent: Provide a broad overview and entry point to the course.`)
lines.push(`- ${BASE_URL}/#/curriculum: Curriculum overview - A complete architectural roadmap and timeline of all 9 learning phases, from basic programming to advanced data products. User Intent: See the full structure and timeline of what is taught.`)
lines.push(`- ${BASE_URL}/#/exercises: Practice exercises - A centralized repository of interactive, hands-on coding exercises to test Python and SQL proficiency. User Intent: Practice coding skills directly in the browser.`)
lines.push(`- ${BASE_URL}/#/progress: Learning progress - A personalized dashboard to track completed lessons, daily learning streaks, and overall curriculum completion metrics. User Intent: Monitor personal learning advancement and gamification stats.`)
lines.push(`- ${BASE_URL}/#/concepts: Concept graph - An interactive, visual knowledge graph demonstrating the interconnected relationships between various technical concepts taught in the course. User Intent: Visualize how different concepts connect and build upon each other.`)
lines.push(`- ${BASE_URL}/#/stats: Learning statistics - Detailed quantitative analytics regarding the curriculum, including total reading time, lesson counts, and historical performance data. User Intent: View aggregate metrics about the curriculum content.`)
lines.push(`- ${BASE_URL}/#/search: Search - A full-text semantic search interface to quickly find specific lessons, topics, or definitions within the curriculum. User Intent: Quickly look up specific terms, concepts, or lessons.`)
lines.push(`- ${BASE_URL}/#/review: Spaced Repetition Review - An intelligent flashcard system utilizing spaced repetition to reinforce memory retention of key technical terms and concepts. User Intent: Reinforce memory of key concepts through active recall.`)
lines.push(`- ${BASE_URL}/#/case-studies: Case Studies - In-depth, real-world business case studies applying data engineering and machine learning principles to practical enterprise problems. User Intent: See real-world business applications of the technical skills learned.`)

// Phase overviews
const phaseFiles = findFiles(LESSONS_DIR, 'Phase_Overview.md')
Expand Down
3 changes: 2 additions & 1 deletion src/components/MarkdownRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ const ImageComponent = (props: JSX.IntrinsicElements['img'] & ExtraProps) => {
<img
loading={isHighPriority ? 'eager' : 'lazy'}
decoding="async"
fetchPriority={isHighPriority ? 'high' : undefined}
// Using lowercase fetchpriority for exact DOM output, with TS definition in vite-env.d.ts
fetchpriority={isHighPriority ? 'high' : undefined}
alt={rest.alt || 'Course image'}
{...rest}
/>
Expand Down
8 changes: 4 additions & 4 deletions src/components/__tests__/MarkdownRendererImages.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ describe('MarkdownRenderer Images', () => {
expect(img?.getAttribute('decoding')).toBe('async')
})

it('allows fetchpriority attribute on images when using HTML syntax', async () => {
// We use raw HTML because standard markdown doesn't support fetchpriority
const content = '<img src="https://example.com/hero.png" alt="Hero" fetchpriority="high" />'
it('allows fetchPriority attribute on images when using HTML syntax', async () => {
// We use raw HTML because standard markdown doesn't support fetchPriority
const content = '<img src="https://example.com/hero.png" alt="Hero" fetchPriority="high" />'

await act(async () => {
const root = createRoot(container!)
Expand All @@ -52,6 +52,6 @@ describe('MarkdownRenderer Images', () => {
// loading='lazy' is added by ImageComponent default, but last prop wins if passed?
// Wait, ImageComponent receives props from rehype-raw -> react-markdown.
// Let's see what happens.
expect(img?.getAttribute('fetchpriority')).toBe('high')
expect(img?.getAttribute('fetchPriority')).toBe('high')
})
})
8 changes: 8 additions & 0 deletions src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
/// <reference types="vite/client" />

import 'react'

declare module 'react' {
interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
fetchpriority?: 'high' | 'low' | 'auto'
}
}
Loading