How freygh1/frontend works
This is an Astro-based English-learning site organized around lesson content, course and lesson routes, and reusable browsing components. The principal user workflow is to browse the catalog, narrow lessons with search and filters, then open a course or lesson. The content schema defines lessons loaded from Markdown files; the client search code filters rendered lesson cards and uses a shared text normalizer. The README is empty and most UI source was not sampled, so UI connections below are dashed and unverified; the two solid edges are directly supported by excerpts.
Main entry points: search.client.ts Filter controller · index.astro Home route · content.config.ts Lesson schema · [course].astro Course route
Components 19
Lesson content
- Lesson Markdown
src/content/lessons - Lesson schema
src/content.config.ts
Site routes
- Home route
src/pages/index.astro - Course route
src/pages/courses/[course].astro - Lesson route
src/pages/lessons/[id].astro - Landing layout
src/layouts/LandingPageLayout.astro
Browsing interface
- Main view
src/components/Main.astro - Courses section
src/components/CoursesSection.astro - Lesson grid
src/components/LessonGrid.astro - Lesson card
src/components/LessonCard.astro - Search controls
src/components/SearchBar.astro - Course contents
src/components/TOC.astro - Header
src/components/Header.astro - Hero
src/components/Hero.astro - Footer
src/components/Footer.astro - Logo
src/components/Logo.astro
Search behavior
- Filter controller
src/scripts/search.client.ts - Text normalizer
src/utils/normalize.ts
Other components
- Learner
Connections 8
- Lesson schema → Lesson Markdown: loads lessons
src/content.config.ts - Filter controller → Text normalizer: normalizes query
src/scripts/search.client.ts - Learner → Home route: opens catalog
- Home route → Landing layout: renders with
- Course route → Lesson route: opens lesson
- Filter controller → Search controls: handles filters
- Filter controller → Lesson grid: filters cards
- Course contents → Filter controller: sets filters