feat: Claude Web UI POC with streaming and tool visualization
Initial implementation of a web-based Claude Code interface with: Backend (Node.js + Express + WebSocket): - Claude CLI spawning with JSON stream mode - Session management with resume support (--continue flag) - Session history API endpoint - Real-time WebSocket communication - --include-partial-messages for live streaming Frontend (React + Vite + Tailwind): - Modern dark theme UI (Discord/Slack style) - Live text streaming with content_block_delta handling - Markdown rendering with react-markdown + remark-gfm - Syntax highlighting with react-syntax-highlighter (One Dark) - Collapsible high-tech tool cards with: - Tool-specific icons and colors - Compact summaries (Read, Glob, Bash, Edit, etc.) - Expandable JSON details - Session history loading on resume - Project directory selection - Resume session toggle Docker: - Multi-container setup (backend + nginx frontend) - Isolated Claude config directory - Host network mode for backend Built collaboratively by Neko (VPS Claude) and Web-UI Claude, with Web-UI Claude implementing most frontend features while running inside the interface itself (meta-programming!). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
36
backend/Dockerfile
Normal file
36
backend/Dockerfile
Normal file
@@ -0,0 +1,36 @@
|
||||
FROM node:20-slim
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /app
|
||||
|
||||
# Create node user home structure for claude
|
||||
RUN mkdir -p /home/node/.local/bin && \
|
||||
mkdir -p /home/node/.local/share/claude && \
|
||||
mkdir -p /home/node/.claude && \
|
||||
mkdir -p /home/node/.config/claude && \
|
||||
chown -R node:node /home/node
|
||||
|
||||
# Create symlink for claude binary
|
||||
RUN ln -s /home/node/.local/share/claude/versions/2.0.67 /home/node/.local/bin/claude
|
||||
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install --production
|
||||
|
||||
# Copy app source
|
||||
COPY . .
|
||||
|
||||
# Set ownership
|
||||
RUN chown -R node:node /app
|
||||
|
||||
# Switch to node user
|
||||
USER node
|
||||
|
||||
# Set PATH to include claude
|
||||
ENV PATH="/home/node/.local/bin:${PATH}"
|
||||
|
||||
EXPOSE 3001
|
||||
|
||||
CMD ["node", "server.js"]
|
||||
Reference in New Issue
Block a user