AI without spaghetti: Clean architecture in the age of AI
summary
A recipe site called Leo becomes a chatbot and then a refactored platform that separates domain, use cases and infrastructure so models change without breaking business logic. Live demos use Quarkus, PostgreSQL with Flyway migrations, OCR via Tess4J then LangChain for Java, and local inference (Ollama/Open LLM) with a 14B local model that proves too weak while Anthropic/OpenAI handle harder queries. CI checks like ArchUnit and SonarQube plus guardrails and a model gateway prevent token overuse and dependency rot.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 2:01Legacy app with AI
- 3:26AI code challenges
- 8:12Backend and database
- 11:29OCR and language support
- 13:34Replacing OCR with LangChain4j
- 18:11Clean architecture explained
- 22:05AI models and structure
- 25:43Local AI models
- 32:27Recipe chatbot
- 35:15AI chatbot guardrails
- 39:11Summary
related talks
43mAI w/o Spaghetti: Clean Architecture in the Age of AI
52mAI for Busy Java Developers
48mBuilding AI Powered Applications with Java
43mAI Has Entered The Chat: Humans, AI, and the Art of Collaboration
51mIntelligent Applications with Spring AI
51mJava Meets AI: Empowering Developers to Build Intelligent Apps
55mAI in Java? Meet LangChain4j and Build Intelligent Services
55m"You can't use AI directly in Java!" Hold my prompt...
