How zmuhls/cuny-ai works
Project Type and Purpose
• This is a single-page interactive front-end guide (built with React + Vite + TypeScript) that teaches AI prompting techniques. It is a static site (deployed to GitHub Pages) but integrates at run time with external LLM/VLM APIs (via OpenRouter).
High-Level Components
a. Developer Workflow & CI/CD
• GitHub Repo (.github/workflows/ci-cd.yml)
• Vite build (vite.config.js, tsconfig.json, postcss.config.js, tailwind.config.js)
• GitHub Actions: builds dist/ and deploys to GitHub Pages (base URL /cuny-ai/).
b. Static Assets & Hosting
• dist/ – production build artifacts (index.html, JS bundles, pages, assets)
• public/ – public-facing static files (images, PDF resources)
• Hosted on GitHub Pages
c. Client-side Application
• React App entry (src/main.jsx ➔ src/App.jsx)
• UI Components (src/components & src/components/steps)
• Styles (src/styles/index.css, Tailwind CSS via PostCSS)
d. External Services
• OpenRouter API endpoint (https://openrouter.ai/api/v1/chat/completions)
• Various model providers (OpenAI, Anthropic, Google, Mistral)
Relationships & Data Flows
• Developer pushes code → GitHub Actions triggers → Vite builds → Artifacts (dist/) are deployed to GitHub Pages.
• End user (mobile/desktop browser) requests /cuny-ai/ → GitHub Pages serves static HTML/CSS/JS → React app hydrates in browser.
• User clicks through interactive steps → client JS may invoke fetch calls to the OpenRouter API (with API Key) → receives LLM/VLM responses → renders examples/comparisons/glossary.
Architectural Patterns & Principles
• Single-Page Application (SPA) with client-side routing (implicit via Vite & static page snapshots)
• Component-based UI (step modules under src/components/steps)
• Mobile-first, responsive design (Tailwind utility classes + PostCSS)
• Path aliasing (configured in tsconfig.json) for cleaner imports