Skip to content

Commit d0bae16

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/examples/dashboard/globals-16.2.0
2 parents 47d2c99 + 78afa91 commit d0bae16

File tree

20 files changed

+392
-542
lines changed

20 files changed

+392
-542
lines changed

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"access": "public",
88
"baseBranch": "main",
99
"updateInternalDependencies": "patch",
10-
"ignore": ["examples/**"]
10+
"ignore": ["frontend"]
1111
}

.github/workflows/docker-bake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
echo "TAG=$TAG" >> $GITHUB_OUTPUT
5454
5555
- name: Build
56-
uses: docker/bake-action@v4
56+
uses: docker/bake-action@v6
5757
with:
5858
files: |
5959
./docker-bake.hcl

CLAUDE.md

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
77
This is a monorepo containing a complete AI chat application framework with **worldclass documentation**:
88

99
- **examples/dashboard**: SvelteKit frontend with Flowbite UI integration and Socket.IO
10-
- **examples/langserve-backend**: Python FastAPI backend with LangServe and 5 AI agents
11-
- **packages/svelte-langserve**: Consolidated npm package with components, stores, and themes
10+
- **examples/langgraph-backend**: Python FastAPI backend with LangGraph and 5 AI agents
11+
- **packages/svelte-langgraph**: Consolidated npm package with components, stores, and themes
1212
- **docs/**: Comprehensive documentation covering everything from quickstart to production deployment
1313

1414
## Key Project Features
@@ -35,7 +35,7 @@ This is a monorepo containing a complete AI chat application framework with **wo
3535
pnpm install
3636

3737
# Start backend (in one terminal)
38-
cd examples/langserve-backend && uv run serve
38+
cd examples/langgraph-backend && uv run serve
3939

4040
# Start frontend (in another terminal)
4141
cd examples/dashboard && pnpm dev
@@ -132,7 +132,7 @@ docker-compose logs -f
132132

133133
# View specific service logs
134134
docker-compose logs -f svelte-frontend
135-
docker-compose logs -f langserve-backend
135+
docker-compose logs -f langgraph-backend
136136

137137
# Rebuild and restart services
138138
docker-compose up -d --build
@@ -174,6 +174,11 @@ cp .env.example .env
174174
OPENAI_API_KEY=sk-your-openai-key-here # Required for AI agents
175175
ANTHROPIC_API_KEY=sk-ant-your-anthropic-key # Required for Claude agents
176176
TAVILY_API_KEY=your-tavily-key-here # Optional, for research agent
177+
LANGSMITH_API_KEY=lsv2_pt_your-langsmith-key # Required for LangGraph
178+
179+
# Database configuration (LangGraph requirements)
180+
LANGGRAPH_DB_URL=postgresql://langgraph:langgraph@localhost:5432/langgraph
181+
REDIS_URL=redis://localhost:6379
177182

178183
# Authentication (change in production!)
179184
SECRET_KEY=your-super-secure-jwt-secret-key-at-least-32-chars
@@ -185,8 +190,8 @@ PORT=8000
185190
LOG_LEVEL=info
186191

187192
# Frontend configuration
188-
PUBLIC_API_URL=http://localhost:8000
189-
PUBLIC_SOCKET_URL=http://localhost:3000
193+
PUBLIC_LANGGRAPH_SERVER_URL=http://localhost:8000
194+
PUBLIC_SOCKET_IO_URL=http://localhost:3000
190195
```
191196

192197
## Architecture Overview
@@ -200,21 +205,21 @@ This project is a **production-ready monorepo** containing a complete AI chat ap
200205

201206
### Updated Monorepo Structure
202207
```
203-
svelte-langserve/
208+
svelte-langgraph/
204209
├── docs/ # 📚 Worldclass documentation
205210
│ ├── getting-started/ # Quick start + tutorial
206211
│ ├── guides/ # Themes, auth, deployment
207212
│ ├── reference/ # API docs + components
208213
│ └── advanced/ # Architecture + troubleshooting
209214
├── examples/ # 🚀 Example applications
210215
│ ├── dashboard/ # SvelteKit frontend with Flowbite
211-
│ └── langserve-backend/ # FastAPI backend with 5 AI agents
216+
│ └── langgraph-backend/ # FastAPI backend with 5 AI agents
212217
├── packages/ # 📦 Reusable packages
213-
│ └── svelte-langserve/ # Consolidated library
218+
│ └── svelte-langgraph/ # Consolidated library
214219
│ ├── components/ # Flowbite UI components
215220
│ ├── stores/ # Socket.IO & state management
216221
│ ├── themes/ # Flowbite theme system
217-
│ ├── client/ # LangServe client adapters
222+
│ ├── client/ # LangGraph client adapters
218223
│ └── types.ts # LangChain-compatible types
219224
├── nginx/ # 🌐 Production nginx config
220225
├── docker-compose.yml # 🐳 Development deployment
@@ -227,7 +232,7 @@ svelte-langserve/
227232
```
228233
┌─────────────────┐ WebSocket ┌─────────────────┐ HTTP/Streaming ┌─────────────────┐
229234
│ Browser │ ◄─────────────► │ SvelteKit │ ◄──────────────────► │ FastAPI │
230-
│ (Flowbite UI) │ │ Frontend │ │ LangServe
235+
│ (Flowbite UI) │ │ Frontend │ │ LangGraph
231236
└─────────────────┘ └─────────────────┘ └─────────────────┘
232237
│ │
233238
▼ ▼
@@ -253,19 +258,19 @@ svelte-langserve/
253258
- **Architecture Consideration**: Large file (~700 lines) - consider refactoring into services
254259
- JWT authentication middleware for WebSocket connections
255260

256-
3. **LangServe Backend - `examples/langserve-backend/`**
257-
- Implements 5 specialized AI agents via LangChain and LangServe:
261+
3. **LangGraph Backend - `examples/langgraph-backend/`**
262+
- Implements 5 specialized AI agents via LangChain and LangGraph:
258263
- General Chatbot
259264
- Code Assistant
260265
- Data Analyst
261266
- Creative Writer
262267
- Research Assistant (with web search)
263268
- Supports streaming responses for real-time interaction
264269
- FastAPI with JWT authentication and role-based access control
265-
- Module path: `src.svelte_langserve.*`
270+
- Module path: `src.svelte_langgraph.*`
266271

267-
4. **Consolidated Package - `packages/svelte-langserve/`**
268-
- **Complete Svelte integration** for LangServe with Socket.IO
272+
4. **Consolidated Package - `packages/svelte-langgraph/`**
273+
- **Complete Svelte integration** for LangGraph with Socket.IO
269274
- **Flowbite theme system** with runtime customization
270275
- **UI components** with accessibility and responsive design
271276
- **Reactive stores** for real-time state management
@@ -286,10 +291,10 @@ The theme system is a major architectural component:
286291

287292
```typescript
288293
// Theme usage examples
289-
import { ThemeProvider, flowbiteTheme, defaultTheme } from 'svelte-langserve';
294+
import { ThemeProvider, flowbiteTheme, defaultTheme } from 'svelte-langgraph';
290295

291296
// Automatic Flowbite integration
292-
<LangServeFrontend userId="user123" theme="flowbite" />
297+
<LangGraphFrontend userId="user123" theme="flowbite" />
293298

294299
// Custom theme variants
295300
<ThemeProvider theme={flowbiteTheme} variant="dark">
@@ -298,7 +303,7 @@ import { ThemeProvider, flowbiteTheme, defaultTheme } from 'svelte-langserve';
298303

299304
// Runtime customization
300305
<ThemeProvider theme={customTheme} override={brandOverrides}>
301-
<LangServeFrontend userId="user123" />
306+
<LangGraphFrontend userId="user123" />
302307
</ThemeProvider>
303308
```
304309

@@ -314,18 +319,18 @@ import { ThemeProvider, flowbiteTheme, defaultTheme } from 'svelte-langserve';
314319
The Socket.IO server integration is comprehensive:
315320
- **Client connections** with JWT authentication middleware
316321
- **Conversation management** with real-time updates
317-
- **Message routing** between clients and LangServe endpoints
322+
- **Message routing** between clients and LangGraph endpoints
318323
- **Streaming response handling** with chunk-by-chunk delivery
319324
- **Agent coordination** for multi-agent conversations
320325
- **Error handling** with proper client notification
321326
- **Memory management** for streaming messages and conversations
322327

323-
### LangServe Frontend Components
328+
### LangGraph Frontend Components
324329

325330
Component architecture with Flowbite integration:
326331

327332
**Core Components:**
328-
- `LangServeFrontend.svelte`: Main entry point with theme provider
333+
- `LangGraphFrontend.svelte`: Main entry point with theme provider
329334
- `ChatInterface.svelte`: Message display with streaming support
330335
- `ChatMessage.svelte`: Individual messages with role-based styling
331336
- `EndpointSelector.svelte`: Multi-select for AI agents
@@ -345,7 +350,7 @@ Advanced reactive patterns using Svelte 5 runes:
345350

346351
```typescript
347352
// Main store architecture
348-
interface LangServeState {
353+
interface LangGraphState {
349354
// Connection state
350355
socket: Socket | null;
351356
connected: boolean;
@@ -377,7 +382,7 @@ FastAPI backend with comprehensive features:
377382

378383
**AI Agent Architecture:**
379384
```python
380-
# Agent implementations in src/svelte_langserve/chains/
385+
# Agent implementations in src/svelte_langgraph/chains/
381386
- chatbot.py: General conversation agent
382387
- code_assistant.py: Programming help with tools
383388
- data_analyst.py: Data analysis with search
@@ -386,7 +391,7 @@ FastAPI backend with comprehensive features:
386391
```
387392

388393
**Key Features:**
389-
- **Streaming responses** via LangServe
394+
- **Streaming responses** via LangGraph
390395
- **Tool integration** for specialized agents
391396
- **JWT authentication** with role-based access
392397
- **Rate limiting** for API protection
@@ -398,20 +403,20 @@ FastAPI backend with comprehensive features:
398403
### Common Development Tasks
399404

400405
**Adding a new AI agent:**
401-
1. Create agent class in `examples/langserve-backend/src/svelte_langserve/chains/`
402-
2. Register in `app.py` with LangServe
406+
1. Create agent class in `examples/langgraph-backend/src/svelte_langgraph/chains/`
407+
2. Register in `app.py` with LangGraph
403408
3. Add to frontend endpoint list
404409
4. Test with Socket.IO integration
405410
5. Update documentation
406411

407412
**Customizing Flowbite theme:**
408-
1. Create theme variant in `packages/svelte-langserve/src/lib/themes/`
413+
1. Create theme variant in `packages/svelte-langgraph/src/lib/themes/`
409414
2. Test with all components
410415
3. Update theme documentation
411416
4. Add examples to demo routes
412417

413418
**Adding new UI components:**
414-
1. Create component in `packages/svelte-langserve/src/lib/components/`
419+
1. Create component in `packages/svelte-langgraph/src/lib/components/`
415420
2. Add Flowbite integration
416421
3. Include in component index
417422
4. Add to component documentation
@@ -426,7 +431,7 @@ FastAPI backend with comprehensive features:
426431
- **Theme tests**: All theme variants and overrides
427432

428433
**Backend Testing:**
429-
- **Unit tests**: Agent functionality and LangServe integration
434+
- **Unit tests**: Agent functionality and LangGraph integration
430435
- **API tests**: FastAPI endpoints and authentication
431436
- **Integration tests**: Real AI provider communication
432437
- **Performance tests**: Streaming and concurrent users
@@ -490,7 +495,7 @@ pnpm format # Fix formatting issues
490495
### Backend Issues
491496
- **No AI responses**: Check API keys in .env file
492497
- **Authentication failed**: Verify JWT secret configuration
493-
- **Import errors**: Use module path `src.svelte_langserve.*`
498+
- **Import errors**: Use module path `src.svelte_langgraph.*`
494499
- **Performance issues**: Monitor streaming message cleanup
495500

496501
### Docker Issues

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -173,25 +173,25 @@ Perfect for building:
173173

174174
### **Monorepo Organization**
175175
```
176-
svelte-langserve/
176+
svelte-langgraph/
177177
├── packages/
178-
│ └── svelte-langserve/ # 📦 Complete library package
178+
│ └── svelte-langgraph/ # 📦 Complete library package
179179
│ ├── components/ # Flowbite UI components
180180
│ ├── stores/ # Socket.IO & state management
181181
│ ├── themes/ # Flowbite theme system
182182
│ └── types.ts # LangChain-compatible types
183183
├── examples/
184184
│ ├── dashboard/ # 🎨 SvelteKit frontend example
185-
│ └── langserve-backend/ # 🚀 FastAPI backend example
185+
│ └── langgraph-backend/ # 🚀 FastAPI backend example
186186
├── docs/ # 📚 Comprehensive documentation
187187
├── nginx/ # 🌐 Production nginx config
188188
└── docker-compose.yml # 🐳 Full-stack deployment
189189
```
190190

191191
### **Key Features by Package**
192192

193-
**📦 `svelte-langserve` Package:**
194-
- Complete Svelte integration for LangServe
193+
**📦 `svelte-langgraph` Package:**
194+
- Complete Svelte integration for LangGraph
195195
- Socket.IO client with automatic reconnection
196196
- Flowbite theme system with dark mode
197197
- TypeScript definitions for LangChain compatibility
@@ -216,7 +216,7 @@ svelte-langserve/
216216
### **Professional Design System**
217217
```svelte
218218
<!-- Automatic Flowbite theming -->
219-
<LangServeFrontend userId="user123" theme="flowbite" />
219+
<LangGraphFrontend userId="user123" theme="flowbite" />
220220
221221
<!-- Custom theme variants -->
222222
<ThemeProvider theme={flowbiteTheme} variant="dark">
@@ -225,7 +225,7 @@ svelte-langserve/
225225
226226
<!-- Runtime theme customization -->
227227
<ThemeProvider theme={customTheme} override={brandColors}>
228-
<LangServeFrontend userId="user123" />
228+
<LangGraphFrontend userId="user123" />
229229
</ThemeProvider>
230230
```
231231

@@ -367,8 +367,8 @@ MIT © [Svelte LangServe Contributors](LICENSE)
367367
## 🆘 **Support**
368368

369369
- 📖 **Documentation**: [docs/](./docs/) - Complete guides and API reference
370-
- 🐛 **Issues**: [GitHub Issues](https://github.com/synergyai-nl/svelte-langserve/issues) - Bug reports and feature requests
371-
- 💬 **Discussions**: [GitHub Discussions](https://github.com/synergyai-nl/svelte-langserve/discussions) - Questions and community
370+
- 🐛 **Issues**: [GitHub Issues](https://github.com/synergyai-nl/svelte-langgraph/issues) - Bug reports and feature requests
371+
- 💬 **Discussions**: [GitHub Discussions](https://github.com/synergyai-nl/svelte-langgraph/discussions) - Questions and community
372372
- 🔧 **Troubleshooting**: [Troubleshooting Guide](./docs/advanced/troubleshooting.md) - Debug common issues
373373

374374
## 🎉 **What's Next?**
@@ -379,8 +379,8 @@ Ready to build amazing AI applications? **[Start with our 5-minute Quick Start G
379379

380380
<div align="center">
381381

382-
**Built with ❤️ using SvelteKit, Flowbite, and LangServe**
382+
**Built with ❤️ using SvelteKit, Flowbite, and LangGraph**
383383

384-
[Documentation](./docs/)[Quick Start](./docs/getting-started/quick-start.md)[Live Demo](http://localhost:3000)[GitHub](https://github.com/synergyai-nl/svelte-langserve)
384+
[Documentation](./docs/)[Quick Start](./docs/getting-started/quick-start.md)[Live Demo](http://localhost:3000)[GitHub](https://github.com/synergyai-nl/svelte-langgraph)
385385

386386
</div>

docs/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Svelte LangServe Documentation
1+
# Svelte LangGraph Documentation
22

3-
Welcome to the comprehensive documentation for Svelte LangServe - a complete solution for building real-time AI chat applications with SvelteKit, LangServe, and beautiful Flowbite UI components.
3+
Welcome to the comprehensive documentation for Svelte LangGraph - a complete solution for building real-time AI chat applications with SvelteKit, LangGraph, and beautiful Flowbite UI components.
44

55
## 🎨 What Makes This Special
66

@@ -25,7 +25,7 @@ Welcome to the comprehensive documentation for Svelte LangServe - a complete sol
2525

2626
### 📋 [Reference](./reference/)
2727
- **[API Reference](./reference/api/)** - Complete API documentation
28-
- **[Flowbite Components](./reference/components.md)** - LangServe + Flowbite component library
28+
- **[Flowbite Components](./reference/components.md)** - LangGraph + Flowbite component library
2929
- **[Stores & State](./reference/stores.md)** - Socket.IO stores and reactive state
3030
- **[Socket Events](./reference/socket-events.md)** - Real-time event reference
3131

@@ -62,10 +62,10 @@ Our Flowbite integration provides:
6262
```svelte
6363
<!-- Beautiful AI chat with one component -->
6464
<script>
65-
import { LangServeFrontend } from 'svelte-langserve';
65+
import { LangGraphFrontend } from 'svelte-langgraph';
6666
</script>
6767
68-
<LangServeFrontend
68+
<LangGraphFrontend
6969
userId="user123"
7070
theme="flowbite"
7171
darkMode={true}
@@ -79,7 +79,7 @@ Experience the Flowbite theme in action:
7979
```bash
8080
# Clone and run
8181
git clone <repository-url>
82-
cd svelte-langserve/examples/dashboard
82+
cd svelte-langgraph/examples/dashboard
8383
pnpm install && pnpm dev
8484

8585
# Visit http://localhost:5173/flowbite
@@ -89,8 +89,8 @@ pnpm install && pnpm dev
8989

9090
- 📖 [Troubleshooting Guide](./advanced/troubleshooting.md) - Common issues and fixes
9191
- 💡 [Examples Gallery](./getting-started/examples/) - Live code examples
92-
- 🐛 [Report Issues](https://github.com/synergyai-nl/svelte-langserve/issues)
93-
- 💬 [Discussions](https://github.com/synergyai-nl/svelte-langserve/discussions)
92+
- 🐛 [Report Issues](https://github.com/synergyai-nl/svelte-langgraph/issues)
93+
- 💬 [Discussions](https://github.com/synergyai-nl/svelte-langgraph/discussions)
9494

9595
---
9696

0 commit comments

Comments
 (0)