Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .env.example

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:

- name: Update deployment image tag
run: |
DEPLOYMENT_FILE="flux-repo/dev/bricks/composable-ui/deployment.yaml"
DEPLOYMENT_FILE="flux-repo/dev/composables/composable-ui/deployment.yaml"
if [ -f "$DEPLOYMENT_FILE" ]; then
sed -i 's|image: kaiohz/pickpro:composable-ui-.*|image: kaiohz/pickpro:composable-ui-${{ steps.sha.outputs.result }}|g' "$DEPLOYMENT_FILE"
else
Expand All @@ -122,6 +122,6 @@ jobs:
cd flux-repo
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add dev/bricks/composable-ui/deployment.yaml
git add dev/composables/composable-ui/deployment.yaml
git commit -m "Update composable-ui image to ${{ steps.sha.outputs.result }}" || echo "No changes to commit"
git push https://x-access-token:${{ secrets.FLUX_REPO_TOKEN }}@github.com/SoluDevTech/flux.git main
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@ coverage
.env.local
.env.*.local
.scannerwork

# Config
public/config.json


trivy-report.json
39 changes: 34 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ React frontend for interacting with the [composable-agents](https://github.com/s
- **Real-time chat** -- Stream AI responses via SSE (Server-Sent Events)
- **Human-in-the-loop** -- Review and approve/reject tool calls before execution
- **Thread history** -- Conversation threads grouped by agent in a sidebar
- **RAG file browser** -- Browse MinIO folders and files with breadcrumb navigation and file metadata display
- **Material Design 3** -- Inspired design system with shadcn/ui components

## Tech Stack
Expand All @@ -25,6 +26,7 @@ React frontend for interacting with the [composable-agents](https://github.com/s

- [Bun](https://bun.sh/) >= 1.0
- [composable-agents](https://github.com/soludev/bricks/composable-agents) API running on port 8010
- [mcp-raganything](https://github.com/soludev/bricks/mcp-raganything) API running on port 8020

## Installation

Expand All @@ -34,12 +36,23 @@ bun install

## Configuration

| Variable | Default | Description |
Configuration is loaded at runtime from `public/config.json`. Copy the example file to get started:

```bash
cp public/config.example.json public/config.json
```

**`public/config.json`** - Application configuration:

| Field | Type | Description |
|---|---|---|
| `VITE_API_BASE_URL` | `http://localhost:8010` | composable-agents API URL |
| `VITE_WS_BASE_URL` | `ws://localhost:8010` | WebSocket URL for streaming |
| `apiBaseUrl` | `string` | composable-agents API URL (e.g., `http://localhost:8010`) |
| `ragApiBaseUrl` | `string` (optional) | RAG API URL for MinIO file browsing (e.g., `http://localhost:8020`). Defaults to `apiBaseUrl` if not set. |
| `wsBaseUrl` | `string` | WebSocket URL for streaming (e.g., `ws://localhost:8010`) |

The config is validated with Zod on startup. Invalid configuration will show an error toast.

The Vite dev server proxies `/api` requests to the API automatically (see `vite.config.ts`).
**Note:** `config.json` is gitignored. Use `config.example.json` as a template.

## Running

Expand Down Expand Up @@ -103,30 +116,45 @@ src/
entities/
agent/ # AgentConfig, AgentConfigMetadata, McpServerConfig
chat/ # Message, Thread, ChatRequest
config/ # AppConfig (Zod-validated)
rag/ # FileEntry, FolderEntry
ports/
agent/agentPort.ts # Agent repository interface
chat/chatPort.ts # Chat repository interface
config/configRepository.ts # Config repository interface
rag/ragFilePort.ts # RAG file port interface
infrastructure/ # External adapters (API clients, config)
api/
agent/agentApi.ts # Agent API adapter (axios)
chat/chatApi.ts # Chat API adapter (axios + SSE)
rag/ragApi.ts # RAG API adapter (axios)
axiosInstance.ts # Shared axios instance
config/envConfig.ts # Environment variables
ragAxiosInstance.ts # Separate axios client for RAG API
config/
configRepositoryInstance.ts # Singleton config repository
fileConfigRepository.ts # File-based config implementation
application/ # React UI layer
components/
agent/ # AgentCard, AgentGrid, CreateAgentDialog, AgentConfigViewer
chat/ # ChatInput, ChatMessage, HITLReviewPanel, MessageList
layout/ # MainLayout, ThreadSidebar, TopNav
rag/ # BreadcrumbBar, FileList, FileRow, FolderRow
shared/ # StatusBadge, ToolTag
ui/ # shadcn/ui primitives
hooks/
agent/ # useAgents, useCreateAgent, useDeleteAgent, useUpdateAgent, useAgentConfig
chat/ # useThreads, useCreateThread, useDeleteThread, useMessages, useSendMessage, useStreamChat
config/ # useConfig
rag/ # useFolders, useFiles
pages/
AgentsPage.tsx # /agents route
ChatPage.tsx # /chat/:threadId? route
RagPage.tsx # /rag route
stores/
useChatStore.ts # Zustand store for chat state
public/
config.example.json # Example config (committed)
config.json # Runtime config (gitignored)
tests/
unit/ # Mirrors src/ structure
fixtures/ # Test data
Expand All @@ -140,6 +168,7 @@ tests/
| `/` | -- | Redirects to `/chat` |
| `/agents` | AgentsPage | List, create, view, and delete agents |
| `/chat/:threadId?` | ChatPage | Chat with agents, streaming responses, HITL validation |
| `/rag` | RagPage | Browse MinIO folders and files with breadcrumb navigation |

## CI/CD

Expand Down
4 changes: 2 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@radix-ui/react-toggle-group": "^1.1.11",
"@radix-ui/react-tooltip": "^1.2.8",
"@tanstack/react-query": "^5.96.2",
"axios": "^1.14.0",
"axios": "^1.15.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
Expand Down
5 changes: 5 additions & 0 deletions public/config.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"apiBaseUrl": "http://localhost:8010",
"wsBaseUrl": "ws://localhost:8010",
"ragApiBaseUrl": "http://localhost:8020"
}
2 changes: 2 additions & 0 deletions src/application/App.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { Routes, Route, Navigate } from "react-router-dom";
import AgentsPage from "@/application/pages/AgentsPage";
import ChatPage from "@/application/pages/ChatPage";
import RagPage from "@/application/pages/RagPage";

function App() {
return (
<Routes>
<Route path="/" element={<Navigate to="/chat" replace />} />
<Route path="/agents" element={<AgentsPage />} />
<Route path="/chat/:threadId?" element={<ChatPage />} />
<Route path="/rag" element={<RagPage />} />
</Routes>
);
}
Expand Down
5 changes: 4 additions & 1 deletion src/application/components/agent/AgentCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ function getAgentIcon(name: string): string {
return AGENT_ICONS[firstLetter] ?? "smart_toy";
}

export default function AgentCard({ agent, onConfigure }: Readonly<AgentCardProps>) {
export default function AgentCard({
agent,
onConfigure,
}: Readonly<AgentCardProps>) {
return (
<div className="bg-surface-container-lowest rounded-xl p-8 ambient-shadow hover:translate-y-[-2px] transition-transform duration-300">
{/* Header: icon + status */}
Expand Down
Loading
Loading