How rage/java-programming works
Project Type & Purpose
• This is a static site generator project built with Gatsby (React + GraphQL).
• It combines course content (Markdown files under data/) with React templates/plugins to produce a static course website.
• At runtime in the browser, some React components call out to external learning-platform services (e.g., moocfi, quiznator).
Core Architectural Layers
A. Content Layer
• Markdown & JSON in data/ (e.g. *.md, course-metadata.json)
• Static assets in static/ and data/img/
B. Build System
• Gatsby Core (gatsby-config.js, gatsby-node.js, gatsby-ssr.js, gatsby-browser.js)
• Plugins
• Official/third-party via package.json
• Custom under plugins/gatsby-plugin-top-layout and plugins/gatsby-transformer-moocfi-exercises
C. GraphQL Schema
• Auto-generated from filesystem, frontmatter, and transformer plugins
• Queried by page templates to fetch content and metadata
D. Rendering Layer
• Templates (src/templates/*.js): page layouts (e.g. CourseContentTemplate)
• React Components (src/components, src/partials): UI primitives & custom markdown components
• Context Providers (src/contexes): manage login state, pages, AB testing
• Services (src/services/*.js): client-side API wrappers (moocfi, quizzes, progress, etc.)
• Utility Modules (src/util/*.js)
E. Output
• Static HTML/CSS/JS assets in public/ (after npm run build)
• Deploy via Now/Netlify (see now.json) or Docker (see Dockerfile)
F. CI/CD Pipeline
• GitHub Actions (.github/workflows/main.yml) runs lint/tests/build/deploy
• Pre-commit/style checks (bin/check-code-style.sh)
External Dependencies & Runtime Interactions
• User’s Browser: loads static site + client JS bundles
• Authentication & Data APIs:
• moocfi (login, course progress)
• crowdsorcerer, abstudio (special course features)
• quiznator, quizzes (exercise execution)
• progress (points tracking)
Architectural Patterns & Principles
• Static Site Generation: separation of build and runtime
• Plugin Architecture: extensible data ingestion via Gatsby plugins
• Component-Based UI: React + Context API for state
• Data-Driven Pages: Markdown + Frontmatter → GraphQL → Templates
• Single Responsibility: services modules wrap one external API each