- SRP(Single Responsibility Principle)
- OCP(Open/Closed Principle)
- DIP(Dependency Inversion Principle)
// Logic for holding order data
public class Order {
private String orderId;
| --- | |
| name: Neon Tokyo — Daybreak | |
| colors: | |
| surface: '#fcf8ff' | |
| surface-dim: '#d9d7f4' | |
| surface-bright: '#fcf8ff' | |
| surface-container-lowest: '#ffffff' | |
| surface-container-low: '#f5f2ff' | |
| surface-container: '#efecff' | |
| surface-container-high: '#e8e5ff' |
| @AnalyzeClasses(packages = "com.example.demoarch") | |
| public class ArchitectureTest { | |
| @ArchTest | |
| static final ArchRule layer_dependencies = layeredArchitecture() | |
| .consideringAllDependencies() | |
| .layer("Controller").definedBy("..controller..") | |
| .layer("Service").definedBy("..service..") | |
| .layer("Repository").definedBy("..repository..") |
| $brew install openai/tools/openai | |
| $openai -v | |
| openai version 1.1.2 | |
| //MAC or Linux | |
| $export OPENAI_API_KEY=<your key> | |
| // Windows | |
| $set OPENAI_API_KEY=<your key> |
| # Upgrade | |
| $bun upgrade | |
| $bun -version | |
| 1.3.13 | |
| # Create a new project | |
| $bun init demo | |
| ✓ Select a project template: Blank |
| // เรียกใช้งานผ่าน LiteLLM Proxy | |
| $curl -X POST 'http://127.0.0.1:4000/chat/completions' \ | |
| -H 'Content-Type: application/json' \ | |
| -H 'Authorization: Bearer dummy' \ | |
| -d '{ | |
| "model": "openthaigpt", | |
| "messages": [ | |
| {"role": "user", "content": "สวัสดี"} | |
| ] | |
| }' |
| // Version 1 : role | |
| await page.getByRole('button', { name: 'OK' }).click(); | |
| // Version 2 : role | |
| await page.getByRole('button', { name: 'Submit' }).click(); | |
| // Version 3 : role | |
| await page.getByRole('button', { name: 'Login' }).click(); | |
| $npm install -g mmx-cli | |
| $mmx | |
| ███╗ ███╗███╗ ███╗██╗ ██╗ | |
| ████╗ ████║████╗ ████║╚██╗██╔╝ | |
| ██╔████╔██║██╔████╔██║ ╚███╔╝ | |
| ██║╚██╔╝██║██║╚██╔╝██║ ██╔██╗ | |
| ██║ ╚═╝ ██║██║ ╚═╝ ██║██╔╝ ██╗ | |
| ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ |
| # ติดตั้ง และ ทำการ setup ผ่าน wizard แบบ step-by-step | |
| $pip install obsidian-llm-wiki | |
| $olw setup | |
| ╭────────────────────────────────────────────────────╮ | |
| │ obsidian-llm-wiki v0.2.0 · first run setup │ | |
| ╰────────────────────────────────────────────────────╯ | |
| Step 1/4 Ollama connection | |
| Warning: Could not reach http://localhost:11434 |
A pattern for building personal knowledge bases using LLMs.
This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.
Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.