How learnacha/course-explainer-app works
1. Overall shape
- This is a small server-rendered Flask application written in Python.
- The architecture is simple: HTTP request → Flask route/view → course data/model → Jinja template → HTML/CSS response.
2. Application entry point
- src/app.py is the bootstrap layer that starts the Flask app and wires routes together.
- There is no evidence of a separate backend service, queue, or API layer; this is a single-process web app.
3. Request handling layer
- src/views.py contains the route handlers and page logic.
- It is the main boundary between the web framework and the app’s content, deciding which template to render and what data to pass in.
4. Data/content layer
- src/models.py holds the course data structures or course-related definitions.
- The repository tree does not show a database, ORM migrations, or persistence subsystem, so the app appears to rely on local/static in-memory data rather than external storage.
5. Presentation layer
- src/templates/ contains Jinja templates for the pages:
- layout.html is the shared base frame
- index.html is the course listing/home page
- course.html is the course detail page
- contact.html is an additional informational page
- This indicates a classic template inheritance setup, with page-specific content plugged into a common shell.
6. Static assets
- src/static/css/styles.css provides the styling.
- Static files are served directly by Flask, separate from the request/view/model path.
7. User-facing routes and pages
- The README describes a home page with a list of courses and a detailed course page.
- The presence of contact.html suggests a small additional route beyond the core course browsing flow.
8. Primary data flow
- The key flow is: browser requests a page → Flask route in views.py → course data from models.py → render Jinja template → return HTML.
- CSS is then loaded as a separate static request to style those rendered pages.
9. Testing boundary
- tests/test_app.py covers the app’s routes and view behavior, so tests are focused on HTTP-level correctness rather than internal business logic.
- test-output/take_screenshots.py suggests a visual verification step, likely for confirming rendered pages and layout.
10. Tooling/infrastructure
- requirements.txt captures the Python/Flask dependencies.
- .github/workflows/ indicates CI automation is present, but it supports the app rather than shaping runtime architecture.
- The .claude files are developer-assistant tooling and do not affect production behavior.
11. Diagram boundary guidance
- Draw this repo as a monolithic web app with three main internal boxes:
- Flask app/routing
- Course data/model
- Jinja templates + static CSS
- There are no visible external services, databases, or microservices to include in the main architecture diagram.
Main entry points: views.py Routes · app.py App bootstrap · layout.html Layout · test_app.py App tests
Components 14
Runtime
Flask app and request handling
- App bootstrap · Starts the Flask app and wires the web application together
src/app.py - Routes · Defines page routes and controls which views are rendered
src/views.py
Content
Course data and page templates
- Course data · Holds course-related data and definitions used by the views
src/models.py - Layout · Shared page shell used by the site templates
src/templates/layout.html - Home page · Renders the course listing landing page
src/templates/index.html - Course page · Renders the course detail page
src/templates/course.html - Contact page · Renders the additional contact or info page
src/templates/contact.html - Stylesheet · Provides the site styling for rendered pages
src/static/css/styles.css
Quality
Tests and verification tooling
- App tests · Exercises route behavior and HTTP-level correctness
tests/test_app.py - Screenshots · Runs page capture and verification for rendered UI
test-output/take_screenshots.py
Tooling
Repo automation and assistant helpers
- Dependencies · Declares Flask and other runtime dependencies
requirements.txt - CI workflows · GitHub Actions workflows for repository automation
.github/workflows/claude.yml - Review workflow · Automated code review workflow configuration
.github/workflows/claude-code-review.yml - Claude tools · Local assistant commands, skills, and support files
.claude
Connections 15
- App bootstrap → Routes: registers · The app bootstrap imports and wires the route handlers
- Routes → Course data: reads · Route handlers pull course data for page rendering
- Routes → Home page: renders · The home route renders the course listing template
- Routes → Course page: renders · The detail route renders the course page template
- Routes → Contact page: renders · The additional route renders the contact template
- Home page → Layout: extends · Home page inherits the shared page shell
- Course page → Layout: extends · Course page inherits the shared page shell
- Contact page → Layout: extends · Contact page inherits the shared page shell
- Layout → Stylesheet: links · The base template loads the shared stylesheet
- App tests → App bootstrap: exercises · HTTP tests validate the Flask application behavior
- Screenshots → App bootstrap: verifies · Visual checks capture and confirm rendered pages
- CI workflows → App tests: runs · CI automation executes the test suite
- Review workflow → App tests: checks · Review automation depends on test outcomes
- Dependencies → App bootstrap: supports · Python dependencies enable the Flask runtime
- Claude tools → Screenshots: supports · Assistant tooling includes UI verification helpers