How pedscoffee/physicianpromptengineering works
Project type and purpose
• This is a documentation‐centric static website built with a static site generator (Jekyll).
• Purpose: host and maintain an open‐source library of clinical AI prompts, courses, blog posts, data‐driven pages, and interactive browser-based tools.
File structure
• Top-level “source” directories:
• _posts, _course_modules, _prompts, .md pages (index.md, about.md, etc.) – these are your content/data nodes.
• _layouts, _includes – HTML template layers.
• _data – YAML data that can drive content or exercises.
• assets/css, assets/js, images – static assets and client-side scripts for interactive prototypes and styling.
• Configuration and build: Gemfile, _config.yml, CNAME, README.md – Jekyll config, dependencies, and meta.
• No dynamic backend: all pages are precompiled into HTML/CSS/JS.
README for additional insights
• Confirms Jekyll‐style static site, driving real-world prompt engineering resources.
• References interactive browser AI tools (client-side JS), analytics, forms (hosted externally), and contribution workflows via GitHub.
a. Main components
1. Content Repository (GitHub)
– Markdown content (_posts, .md pages)
– YAML data (_data)
– Prompt text files (_prompts)
2. Static Site Generator (Jekyll)
– Reads content + data + templates
– Applies layouts (_layouts) and includes (_includes)
– Outputs static HTML/CSS/JS
3. Assets & Client-Side Tools
– CSS (style.scss → style.css)
– JS modules (course-exercise.js, dropdown.js, browser AI prototypes)
4. Hosting/CD Pipeline
– CI (GitHub Actions or Netlify) runs jekyll build on push
– Deploy to GitHub Pages or Netlify CDN
5. External Services
– Google Analytics (snippet in _includes)
– Mailing list/forms (newsletter-onboarding, external CTA)
– GitHub Issues/Discussions for contributions
b. Relationships & Interactions
– Developer pushes markdown/YAML to GitHub → CI triggers Jekyll build → generates site artifacts → deploy → CDN serves site.
– Browser fetches HTML → loads CSS for styling & JS for interactive course modules.
– JS may call external APIs (if any) for in-browser AI demos (marked beta).
– Google Analytics snippet collects usage metrics.
– Users navigate, fill forms (e.g., newsletter), which post to external form service.
c. Architectural patterns and principles
– Static site architecture (content-as-code, no server-side runtime)
– MVC analogy: Data (YAML, Markdown) + Views (layouts, includes) + Controller (Jekyll engine)
– Modular design: separate course modules, prompts library, interactive prototypes.
– Progressive enhancement: HTML first, CSS styling, JS for added interactivity.
d. Key technologies/frameworks
– Ruby & Jekyll (static site generator)
– SCSS (style preprocessing)
– Vanilla JS for interactive components
– GitHub CI/CD (Actions/Pages) or Netlify
– External analytics and form services
Elements
• Developer push → CI/CD → Build Engine
• Build Engine → Static Site Output → CDN
• Browser requests → CDN → serves HTML/CSS/JS
• Blue for static components (content, SSG)
• Green for build/deploy pipeline
• Orange for client-side interactivity
• Gray for external services