Skip to content

Commit be1433d

Browse files
committed
feat: Major codebase restructuring and enhancement
- Consolidated code structure into single app/ directory - Added comprehensive domain-driven architecture - Implemented Cloudflare AI Agents integration with MCP servers - Added authentication and authorization system - Enhanced configuration management and logging - Added Docker and Kubernetes deployment configurations - Implemented comprehensive API v1 with agents, tasks, communication - Added monitoring and metrics infrastructure - Enhanced documentation with architecture guides - Added VSCode development environment configuration - Implemented secure MCP client and server components - Added email integration and self-hosting capabilities - Enhanced agent-ui with improved store management - Added comprehensive test infrastructure and deployment scripts Files: 114 changed, 23245 insertions(+), 121 deletions(-)
1 parent 74683af commit be1433d

File tree

114 files changed

+23245
-121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+23245
-121
lines changed

.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,16 @@ node_modules/
116116

117117
# IDE files
118118
.idea/
119-
.vscode/
120119
*.swp
121120
*.swo
122121

123122
# OS files
124123
.DS_Storen
125124
Thumbs.db
126-
.augment-guidelines
125+
.augment-guidelines
126+
/.augment-guidelines
127+
/.env.production
128+
/.env.development
129+
/.env.example
130+
/.env.template
131+
/agent-ui/package-lock.json

.vscode/extensions.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"recommendations": [
3+
"ms-python.python",
4+
"ms-python.vscode-pylance",
5+
"charliermarsh.ruff",
6+
"ms-toolsai.jupyter",
7+
"github.copilot",
8+
"tamasfe.even-better-toml",
9+
"aaron-bond.better-comments",
10+
"github.vscode-github-actions",
11+
"bierner.markdown-mermaid",
12+
"postman.postman-for-vscode",
13+
"alexcvzz.vscode-sqlite",
14+
"ms-vscode-remote.remote-containers",
15+
]
16+
}

.vscode/launch.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
// Frontend configurations
8+
{
9+
"name": "frontend",
10+
"cwd": "frontend",
11+
"request": "launch",
12+
"type": "dart"
13+
},
14+
{
15+
"name": "frontend (profile mode)",
16+
"cwd": "frontend",
17+
"request": "launch",
18+
"type": "dart",
19+
"flutterMode": "profile"
20+
},
21+
{
22+
"name": "frontend (release mode)",
23+
"cwd": "frontend",
24+
"request": "launch",
25+
"type": "dart",
26+
"flutterMode": "release"
27+
},
28+
// Backend configurations
29+
{
30+
"name": "Go: Launch Backend",
31+
"type": "go",
32+
"request": "launch",
33+
"mode": "auto",
34+
"program": "${workspaceFolder}/backend/main.go",
35+
"cwd": "${workspaceFolder}/backend",
36+
"env": {},
37+
"args": []
38+
}
39+
]
40+
}

.vscode/mcp.json

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
{
2+
"mcp": {
3+
"brave": {
4+
"command": "npx",
5+
"args": [
6+
"-y",
7+
"@modelcontextprotocol/server-brave-search"
8+
],
9+
"env": {
10+
"BRAVE_API_KEY": "$BSAJuPah0gzC7mCh62saJiUxINoWn90"
11+
},
12+
"disabled": false,
13+
"alwaysAllow": []
14+
},
15+
"redis": {
16+
"command": "npx",
17+
"args": [
18+
"-y",
19+
"@modelcontextprotocol/server-redis",
20+
"redis://localhost:6379"
21+
]
22+
},
23+
"desktop-commander": {
24+
"command": "npx",
25+
"args": [
26+
"-y",
27+
"@wonderwhy-er/desktop-commander"
28+
]
29+
},
30+
"filesystem": {
31+
"command": "npx",
32+
"args": [
33+
"-y",
34+
"@modelcontextprotocol/server-filesystem",
35+
"/home/"
36+
]
37+
},
38+
"fetch": {
39+
"command": "uv",
40+
"args": [
41+
"mcp-server-fetch"
42+
]
43+
},
44+
"everything": {
45+
"command": "npx",
46+
"args": [
47+
"-y",
48+
"@modelcontextprotocol/server-everything"
49+
],
50+
"disabled": false,
51+
"alwaysAllow": []
52+
},
53+
"memory": {
54+
"command": "npx",
55+
"args": [
56+
"-y",
57+
"@modelcontextprotocol/server-memory"
58+
]
59+
},
60+
"sequential-thinking": {
61+
"command": "npx",
62+
"args": [
63+
"-y",
64+
"@modelcontextprotocol/server-sequential-thinking"
65+
]
66+
},
67+
"puppeteer": {
68+
"command": "npx",
69+
"args": [
70+
"-y",
71+
"@modelcontextprotocol/server-puppeteer"
72+
]
73+
},
74+
"github.com/modelcontextprotocol/servers/tree/main/src/sentry": {
75+
"disabled": false,
76+
"timeout": 60,
77+
"command": "uvx",
78+
"args": [
79+
"mcp-server-sentry",
80+
"--auth-token",
81+
"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"
82+
],
83+
"env": {
84+
"SENTRY_AUTH_TOKEN": "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"
85+
},
86+
"transportType": "stdio",
87+
"autoApprove": []
88+
},
89+
"Context7": {
90+
"type": "stdio",
91+
"command": "npx",
92+
"args": [
93+
"-y",
94+
"@upstash/context7-mcp@latest"
95+
]
96+
},
97+
"playwright": {
98+
"command": "npx",
99+
"args": [
100+
"@playwright/mcp@latest"
101+
]
102+
},
103+
"postgres": {
104+
"command": "npx",
105+
"args": [
106+
"-y",
107+
"@modelcontextprotocol/server-postgres",
108+
"postgresql://localhost/mydb"
109+
]
110+
},
111+
"Comfy MCP Server": {
112+
"command": "/path/to/uvx",
113+
"args": [
114+
"comfy-mcp-server"
115+
],
116+
"env": {
117+
"COMFY_URL": "http://your-comfy-server-url:port",
118+
"COMFY_WORKFLOW_JSON_FILE": "/path/to/the/comfyui_workflow_export.json",
119+
"PROMPT_NODE_ID": "6",
120+
"OUTPUT_NODE_ID": "9",
121+
"OUTPUT_MODE": "file"
122+
}
123+
}
124+
}
125+
}

.vscode/settings.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"files.watcherExclude": {
3+
"**/.git/objects/**": true,
4+
"**/node_modules/**": true,
5+
"**/vendor/**": true,
6+
"**/build/**": true,
7+
"**/dist/**": true,
8+
"**/.output/**": true,
9+
"**/.nuxt/**": true,
10+
"**/.vscode/**": true
11+
},
12+
"python.analysis.autoSearchPaths": true,
13+
"python.analysis.diagnosticSeverityOverrides": {
14+
"reportMissingImports": "none"
15+
},
16+
"python.analysis.extraPaths": [
17+
"${workspaceFolder}/src"
18+
],
19+
"python.envFile": "${workspaceFolder}/.env",
20+
"python.terminal.activateEnvironment": true,
21+
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
22+
"python.testing.pytestEnabled": true,
23+
"python.testing.unittestEnabled": false,
24+
"python.testing.cwd": "${workspaceFolder}/tests",
25+
"python.testing.pytestPath": "${workspaceFolder}/.venv/bin/pytest",
26+
"python.testing.autoTestDiscoverOnSaveEnabled": true,
27+
"postman.settings.dotenv-detection-notification-visibility": false,
28+
"augment.nextEdit.enableGlobalBackgroundSuggestions": true,
29+
"augment.nextEdit.showDiffInHover": true,
30+
"augment.nextEdit.highlightSuggestionsInTheEditor": true,
31+
"cmake.sourceDirectory": "/home/dima/Desktop/Fun/dev/AI/food_delivery_app/linux",
32+
"editor.codeActions.triggerOnFocusChange": true
33+
}

.vscode/tasks.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Start Backend",
6+
"type": "shell",
7+
"command": "cd ${workspaceFolder}/backend && go run main.go",
8+
"group": "none",
9+
"presentation": {
10+
"reveal": "always",
11+
"panel": "new"
12+
},
13+
"problemMatcher": []
14+
},
15+
{
16+
"label": "Start Backend with Hot Reload",
17+
"type": "shell",
18+
"command": "cd ${workspaceFolder}/backend && air",
19+
"group": "none",
20+
"presentation": {
21+
"reveal": "always",
22+
"panel": "new"
23+
},
24+
"problemMatcher": []
25+
},
26+
{
27+
"label": "Start Frontend",
28+
"type": "shell",
29+
"command": "cd ${workspaceFolder}/frontend && flutter run",
30+
"group": "none",
31+
"presentation": {
32+
"reveal": "always",
33+
"panel": "new"
34+
},
35+
"problemMatcher": []
36+
},
37+
{
38+
"label": "Start Both: Frontend & Backend",
39+
"dependsOn": [
40+
"Start Backend",
41+
"Start Frontend"
42+
],
43+
"problemMatcher": []
44+
}
45+
]
46+
}

Dockerfile

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# DataMCPServerAgent Dockerfile
2+
# Multi-stage build for optimized production image
3+
4+
# Build stage
5+
FROM python:3.11-slim as builder
6+
7+
# Set environment variables
8+
ENV PYTHONUNBUFFERED=1 \
9+
PYTHONDONTWRITEBYTECODE=1 \
10+
PIP_NO_CACHE_DIR=1 \
11+
PIP_DISABLE_PIP_VERSION_CHECK=1
12+
13+
# Install system dependencies
14+
RUN apt-get update && apt-get install -y \
15+
build-essential \
16+
curl \
17+
git \
18+
&& rm -rf /var/lib/apt/lists/*
19+
20+
# Install uv for faster package management
21+
RUN pip install uv
22+
23+
# Set work directory
24+
WORKDIR /app
25+
26+
# Copy requirements first for better caching
27+
COPY requirements.txt .
28+
29+
# Install Python dependencies
30+
RUN uv pip install --system -r requirements.txt
31+
32+
# Production stage
33+
FROM python:3.11-slim as production
34+
35+
# Set environment variables
36+
ENV PYTHONUNBUFFERED=1 \
37+
PYTHONDONTWRITEBYTECODE=1 \
38+
ENVIRONMENT=production \
39+
API_HOST=0.0.0.0 \
40+
API_PORT=8002
41+
42+
# Install runtime dependencies
43+
RUN apt-get update && apt-get install -y \
44+
curl \
45+
&& rm -rf /var/lib/apt/lists/* \
46+
&& groupadd -r appuser \
47+
&& useradd -r -g appuser appuser
48+
49+
# Set work directory
50+
WORKDIR /app
51+
52+
# Copy Python packages from builder
53+
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
54+
COPY --from=builder /usr/local/bin /usr/local/bin
55+
56+
# Copy application code
57+
COPY app/ ./app/
58+
COPY docs/ ./docs/
59+
COPY tests/ ./tests/
60+
COPY *.py ./
61+
COPY *.md ./
62+
63+
# Create necessary directories
64+
RUN mkdir -p logs monitoring/prometheus monitoring/grafana monitoring/logs \
65+
&& chown -R appuser:appuser /app
66+
67+
# Switch to non-root user
68+
USER appuser
69+
70+
# Health check
71+
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
72+
CMD curl -f http://localhost:${API_PORT}/health || exit 1
73+
74+
# Expose port
75+
EXPOSE 8002
76+
77+
# Default command
78+
CMD ["python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8002"]

agent-ui/.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"editor.defaultFormatter": "esbenp.prettier-vscode",
3+
"editor.formatOnSave": true,
4+
"editor.codeActionsOnSave": {
5+
"source.fixAll.eslint": "explicit"
6+
}
7+
}

agent-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
6-
"dev": "next dev -p 3000",
6+
"dev": "next dev -p 3002",
77
"build": "next build",
88
"start": "next start",
99
"lint": "next lint",

agent-ui/src/store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const usePlaygroundStore = create<PlaygroundStore>()(
8888
hasStorage: false,
8989
setHasStorage: (hasStorage) => set(() => ({ hasStorage })),
9090
chatInputRef: { current: null },
91-
selectedEndpoint: 'http://localhost:7777',
91+
selectedEndpoint: 'http://localhost:8001',
9292
setSelectedEndpoint: (selectedEndpoint) =>
9393
set(() => ({ selectedEndpoint })),
9494
agents: [],

0 commit comments

Comments
 (0)