aikit/
├── 📁 .storybook/ # Storybook configuration
│ ├── main.ts
│ └── preview.ts
│
├── 📁 docs/ # Documentation
│ ├── ARCHITECTURE.md # Library architecture
│ ├── GETTING_STARTED.md # Quick start guide
│ ├── TESTING.md # Testing guide
│ ├── PLAYWRIGHT.md # Playwright commands reference
│ └── PROJECT_STRUCTURE.md # This file
│
├── 📁 src/ # Library source code
│ ├── 📁 components/ # All components
│ │ │
│ │ ├── 📁 atoms/ # ⚛️ Atoms - basic elements
│ │ │ ├── 📁 Loader/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 ContextIndicator/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 ToolIndicator/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 MessageBalloon/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 SubmitButton/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 DiffStat/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 Shimmer/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 InlineCitation/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 ChatDate/
│ │ │ │ └── index.ts
│ │ │ └── index.ts
│ │ │
│ │ ├── 📁 molecules/ # 🧩 Molecules - groups of atoms
│ │ │ ├── 📁 ButtonGroup/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 Tabs/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 Suggestions/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 InputContext/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 BaseMessage/
│ │ │ │ └── index.ts
│ │ │ └── index.ts
│ │ │
│ │ ├── 📁 organisms/ # 🦠 Organisms - complex components
│ │ │ ├── 📁 Header/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 Footer/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 UserMessage/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 ThinkingMessage/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 ToolMessage/
│ │ │ │ ├── 📁 ToolHeader/
│ │ │ │ │ └── index.ts
│ │ │ │ ├── 📁 ToolFooter/
│ │ │ │ │ └── index.ts
│ │ │ │ └── index.ts
│ │ │ ├── 📁 PromptBox/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 MessageList/
│ │ │ │ └── index.ts
│ │ │ └── index.ts
│ │ │
│ │ ├── 📁 templates/ # 📄 Templates - complete layouts
│ │ │ ├── 📁 History/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 EmptyContainer/
│ │ │ │ └── index.ts
│ │ │ ├── 📁 ChatContent/
│ │ │ │ └── index.ts
│ │ │ └── index.ts
│ │ │
│ │ ├── 📁 pages/ # 📱 Pages - full integrations
│ │ │ ├── 📁 ChatContainer/
│ │ │ │ └── index.ts
│ │ │ └── index.ts
│ │ │
│ │ └── index.ts
│ │
│ ├── 📁 hooks/ # 🪝 General purpose hooks
│ │ └── index.ts
│ │
│ ├── 📁 types/ # 📝 TypeScript types
│ │ ├── index.ts
│ │ ├── messages.ts
│ │ ├── atoms.ts
│ │ ├── molecules.ts
│ │ ├── organisms.ts
│ │ ├── templates.ts
│ │ └── pages.ts
│ │
│ ├── 📁 utils/ # 🛠️ Utilities
│ │ ├── index.ts
│ │ ├── chatUtils.ts
│ │ ├── messageUtils.ts
│ │ └── validation.ts
│ │
│ ├── 📁 themes/ # 🎨 CSS themes and variables
│ │ ├── variables.css
│ │ ├── light.css
│ │ └── dark.css
│ │
│ ├── 📁 server/ # 🗄️ Server utilites for interacting with neural network services
│ │ └── openai
│ │
│ └── index.ts # Main export
│
├── 📄 .gitignore
├── 📄 commitlint.config.js
├── 📄 jest.config.js
├── 📄 package.json
├── 📄 tsconfig.json
├── 📄 playwright-ct.config.ts
├── 📄 README.md
├── 📄 CONTRIBUTING.md
├── 📄 LICENSE
└── 📄 plan.md # Full specification
Storybook configuration for interactive component documentation.
Project documentation:
ARCHITECTURE.md— architectural decisions and principlesGETTING_STARTED.md— quick start guideTESTING.md— testing guide with PlaywrightPLAYWRIGHT.md— Playwright commands quick referencePROJECT_STRUCTURE.md— this file
All library components organized by Atomic Design levels:
Basic indivisible UI elements without business logic:
- Loader — loading indicator
- ContextIndicator — context usage indicator
- ToolIndicator — tool execution status
- MessageBalloon — message wrapper
- SubmitButton — submit button
- DiffStat — code change statistics
- Shimmer — loading animation
- InlineCitation — text citations
- ChatDate — date formatting
Simple combinations of atoms:
- ButtonGroup — button group
- Tabs — navigation tabs
- Suggestions — input suggestions
- InputContext — input context management
- BaseMessage — base wrapper for all messages
Complex self-sufficient components with internal logic:
- Header — chat header with navigation
- Footer — footer with links
- UserMessage — user message
- ThinkingMessage — AI thinking process
- ToolMessage — tool execution
- ToolHeader — tool message header
- ToolFooter — footer with confirmation buttons
- PromptBox — message input field
- MessageList — message list
Complete layouts:
- History — chat history
- EmptyContainer — empty chat state
- ChatContent — main chat content
Full integrations with data:
- ChatContainer — fully assembled chat
General purpose hooks:
useChat— chat and message managementuseMessages— message operations
TypeScript types and interfaces:
messages.ts— message typesatoms.ts— atom typesmolecules.ts— molecule typesorganisms.ts— organism typestemplates.ts— template typespages.ts— page types
Utility functions:
chatUtils.ts— chat utilitiesmessageUtils.ts— message utilitiesvalidation.ts— validation functions
CSS themes and variables:
variables.css— base CSS variableslight.css— light themedark.css— dark theme
Each component has its own folder with an index.ts file for export.
Component/index.ts → atoms/index.ts → components/index.ts → src/index.ts
- Component folders:
PascalCase - Component files:
ComponentName.tsx - Style files:
ComponentName.scss - Type files:
camelCase.ts - Hooks:
useHookName.ts
ComponentName/
├── ComponentName.tsx # Main component
├── ComponentName.scss # Styles
├── ComponentName.test.tsx # Tests
├── ComponentName.stories.tsx # Storybook
├── useComponentName.ts # Hook (for organisms)
└── index.ts # Export
- Atom Implementation — start with the simplest components
- Molecule Creation — combine atoms
- Organism Development — add logic and hooks
- Template Assembly — create complete layouts
- Page Integration — bring everything together