This repository contains all the code examples, demos, and hands-on projects from "A Developer's Guide to Integrating Generative AI into Applications" by Chris Minnick, published by Wiley Publishing in 2026.
The book provides practical guidance for software developers who want to integrate AI capabilities into their applications, covering everything from basic API integration to advanced techniques like RAG (Retrieval-Augmented Generation), vector search, and production-ready AI systems.
- Title: A Developer's Guide to Integrating Generative AI into Applications
- Author: Chris Minnick
- Publisher: Wiley Publishing
- Publication Year: 2026
- ISBN: 9781394373130
This repository is organized by chapter and contains working examples of:
- AI API Integration - OpenAI, Anthropic, and Google Gemini integrations
- Interactive Games - 20 Questions, Choose Your Adventure, and Hangman powered by AI
- Chat Applications - Full-stack chat implementations with streaming
- Content Generation - Structured output and template-based generation
- Code Optimization - AI-assisted coding environments and optimization techniques
- Production Tools - SPOT (Structured Prompt Output Toolkit) for enterprise AI content
- Vector Search - Embedding-based search and recommendation systems
- RAG Systems - Retrieval-Augmented Generation implementations
βββ chapter-02/ # RAG (Retrieval-Augmented Generation) concepts
βββ chapter-03/ # Interactive AI games and demos
β βββ 20-questions/ # AI-powered 20 Questions game
β βββ choose-your-adventure/ # Interactive story game
β βββ hangman/ # AI word guessing game
βββ chapter-04/ # Structured content generation
βββ chapter-05/ # Recipe generator with Node.js
βββ chapter-07/ # AI optimization examples and techniques
βββ chapter-08/ # Chat applications
β βββ simple-chat-python/ # Flask-based chat server
β βββ chat-client-react-*/ # React chat clients
β βββ simple-chat-server-*/ # Node.js chat servers
βββ chapter-09/ # Production AI tools
β βββ spot-toolkit/ # Enterprise content generation system
βββ chapter-10/ # AI-assisted coding
β βββ pace/ # Prompt-Augmented Coding Environment
βββ chapter-11/ # Vector search and recommendations
βββ vector-search-demo/ # Embedding-based search
βββ recommender-demo/ # AI recommendation system
βββ fuse/ # Advanced search implementation
- Languages: Python, JavaScript/Node.js, TypeScript
- Frameworks: Flask, Express.js, React, Vite
- AI Providers: OpenAI GPT, Anthropic Claude, Google Gemini
- Databases: Vector databases, JSON storage
- Tools: CodeMirror, various AI SDKs
Chapter 9
A production-ready content generation system featuring:
- Multi-provider AI support with automatic failover
- Brand voice enforcement and style governance
- Golden set testing and evaluation
- Circuit breakers and health monitoring
- Template management with versioning
Chapter 10
An AI-enhanced code editor that combines CodeMirror with customizable AI prompt templates for developer productivity.
Chapter 3
- 20 Questions: AI acts as the answerer in the classic guessing game
- Choose Your Adventure: AI-generated interactive stories with branching narratives
- Hangman: AI provides words and hints for the classic word game
Chapter 8
Complete implementations showing:
- Real-time streaming responses
- Session management
- Full-stack architecture (Python Flask + React)
- WebSocket integration
Chapter 11
- Embedding-based search systems
- User profile-driven recommendations
- Advanced search with the Fuse.js library
- Node.js 18+
- Python 3.8+
- API keys for at least one AI provider:
-
Clone the repository:
git clone https://github.com/chrisminnick/ai-integration.git cd ai-integration
-
Set up environment variables:
# Copy the example environment file (if available in specific chapters) export OPENAI_API_KEY="your-openai-api-key" export ANTHROPIC_API_KEY="your-anthropic-api-key" export GOOGLE_AI_API_KEY="your-google-ai-api-key"
-
Run a demo (example - 20 Questions game):
cd chapter-03/20-questions pip install -r requirements.txt python server.py
-
Visit
http://localhost:5000
to try the demo
Each chapter folder contains its own README.md
with specific setup instructions. Most Python projects include a requirements.txt
file, and Node.js projects include a package.json
file for dependency management.
If you're new to AI integration, we recommend following this order:
- Chapter 3 - Start with the interactive games to understand basic AI API calls
- Chapter 4 - Learn structured output and content generation
- Chapter 5 - Explore Node.js integration patterns
- Chapter 8 - Build full-stack chat applications
- Chapter 7 - Optimize performance and implement caching
- Chapter 9 - Scale to production with SPOT
- Chapter 10 - Enhance development workflow with PACE
- Chapter 11 - Implement advanced search and recommendations
This repository primarily serves as companion code for the book, but we welcome:
- Bug reports and fixes
- Documentation improvements
- Additional examples or variations
- Performance optimizations
Please see individual project READMEs for specific contribution guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
- Book Support: Contact Wiley Publishing for book-related questions
- Code Issues: Open an issue in this GitHub repository
- Author Contact: Chris Minnick
"A Developer's Guide to Integrating Generative AI into Applications"
Β© 2026 Wiley Publishing. All rights reserved.
The code examples and demonstrations in this repository are open source and licensed under the MIT License. See the LICENSE file for full details.
The book and its content are protected by copyright. The code examples are provided for educational purposes to accompany the book and may be used, modified, and distributed under the terms of the MIT License.
Happy Coding! π€β¨
Built with β€οΈ for developers integrating AI into their applications