Skip to content

Commit 50d90b3

Browse files
committed
feat: Open Generative UI with CopilotKit + LangGraph
0 parents  commit 50d90b3

63 files changed

Lines changed: 20993 additions & 0 deletions

Some content is hidden

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

.dockerignore

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Dependencies
2+
node_modules
3+
.pnp
4+
.pnp.js
5+
6+
# Python
7+
__pycache__
8+
*.py[cod]
9+
*$py.class
10+
.Python
11+
env/
12+
venv/
13+
.venv
14+
pip-log.txt
15+
pip-delete-this-directory.txt
16+
.pytest_cache
17+
18+
# Testing
19+
coverage
20+
*.lcov
21+
.nyc_output
22+
23+
# Build outputs
24+
.next/
25+
out/
26+
dist/
27+
build/
28+
*.tsbuildinfo
29+
30+
# Environment
31+
.env
32+
.env*.local
33+
.env.production
34+
35+
# Logs
36+
logs
37+
*.log
38+
npm-debug.log*
39+
yarn-debug.log*
40+
yarn-error.log*
41+
lerna-debug.log*
42+
.pnpm-debug.log*
43+
44+
# OS
45+
.DS_Store
46+
*.pem
47+
Thumbs.db
48+
49+
# IDE
50+
.vscode
51+
.idea
52+
*.swp
53+
*.swo
54+
*~
55+
56+
# Git
57+
.git
58+
.gitignore
59+
.gitattributes
60+
61+
# Documentation
62+
*.md
63+
!README.md
64+
65+
# Turbo
66+
.turbo
67+
68+
# Misc
69+
.cache
70+
tmp
71+
temp

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
OPENAI_API_KEY=

.github/workflows/ci.yml

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: main
6+
pull_request:
7+
branches: main
8+
schedule:
9+
- cron: "0 0 * * *" # Run daily at midnight UTC
10+
11+
jobs:
12+
smoke:
13+
name: Smoke / ${{ matrix.os }} / Node ${{ matrix.node }} / Python ${{ matrix.python }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-latest, windows-latest]
19+
node: [22, 24]
20+
python: [3.12, 3.13]
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: ${{ matrix.node }}
30+
31+
- name: Setup Python
32+
uses: actions/setup-python@v4
33+
with:
34+
python-version: ${{ matrix.python }}
35+
36+
- name: Install pnpm
37+
uses: pnpm/action-setup@v4
38+
39+
- name: Install uv
40+
uses: astral-sh/setup-uv@v4
41+
with:
42+
enable-cache: true
43+
44+
- name: Configure uv to use matrix Python version
45+
run: echo "UV_PYTHON=python${{ matrix.python }}" >> $GITHUB_ENV
46+
47+
- name: Install dependencies (monorepo)
48+
run: pnpm install
49+
50+
- name: Build all apps
51+
run: pnpm build
52+
53+
- name: Create empty .env file
54+
run: touch .env
55+
56+
- name: Test frontend startup (Linux/macOS)
57+
if: runner.os != 'Windows'
58+
run: |
59+
# Start the Next.js frontend in background
60+
pnpm --filter app start &
61+
FRONTEND_PID=$!
62+
63+
# Wait for frontend to start (max 30 seconds)
64+
timeout=30
65+
elapsed=0
66+
started=false
67+
68+
while [ $elapsed -lt $timeout ] && [ "$started" = false ]; do
69+
if curl -s http://localhost:3000 > /dev/null 2>&1; then
70+
started=true
71+
echo "✅ Frontend started successfully"
72+
else
73+
sleep 1
74+
elapsed=$((elapsed + 1))
75+
fi
76+
done
77+
78+
# Clean up background process
79+
kill $FRONTEND_PID 2>/dev/null || true
80+
81+
if [ "$started" = false ]; then
82+
echo "❌ Frontend failed to start within 30 seconds"
83+
exit 1
84+
fi
85+
shell: bash
86+
87+
- name: Test frontend startup (Windows)
88+
if: runner.os == 'Windows'
89+
run: |
90+
# Start the Next.js frontend in background
91+
pnpm --filter app start &
92+
93+
# Wait for frontend to start (max 30 seconds)
94+
$timeout = 30
95+
$elapsed = 0
96+
$started = $false
97+
98+
while ($elapsed -lt $timeout -and -not $started) {
99+
try {
100+
$response = Invoke-WebRequest -Uri "http://localhost:3000" -TimeoutSec 1 -ErrorAction SilentlyContinue
101+
if ($response.StatusCode -eq 200) {
102+
$started = $true
103+
Write-Host "✅ Frontend started successfully"
104+
}
105+
} catch {
106+
Start-Sleep -Seconds 1
107+
$elapsed++
108+
}
109+
}
110+
111+
if (-not $started) {
112+
Write-Host "❌ Frontend failed to start within 30 seconds"
113+
exit 1
114+
}
115+
shell: pwsh
116+
117+
lint:
118+
name: Lint
119+
runs-on: ubuntu-latest
120+
121+
steps:
122+
- name: Checkout
123+
uses: actions/checkout@v4
124+
125+
- name: Setup Node.js
126+
uses: actions/setup-node@v4
127+
with:
128+
node-version: 22
129+
130+
- name: Setup Python
131+
uses: actions/setup-python@v4
132+
with:
133+
python-version: 3.12
134+
135+
- name: Install pnpm
136+
uses: pnpm/action-setup@v4
137+
138+
- name: Install uv
139+
uses: astral-sh/setup-uv@v4
140+
with:
141+
enable-cache: true
142+
143+
- name: Install dependencies
144+
run: pnpm install
145+
146+
- name: Run linting
147+
run: pnpm lint
148+
149+
notify-slack:
150+
name: Notify Slack on Failure
151+
runs-on: ubuntu-latest
152+
needs: [smoke, lint]
153+
if: |
154+
failure() &&
155+
github.event_name == 'schedule'
156+
steps:
157+
- name: Notify Slack
158+
uses: slackapi/slack-github-action@v2.1.0
159+
with:
160+
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
161+
webhook-type: incoming-webhook
162+
payload: |
163+
{
164+
"text": ":warning: *Smoke test failed for `with-langgraph-python` :warning:.*",
165+
"blocks": [
166+
{
167+
"type": "section",
168+
"text": {
169+
"type": "mrkdwn",
170+
"text": ":warning: *Smoke test failed for <https://github.com/copilotkit/with-langgraph-python|with-langgraph-python> :warning:*\n\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View run details>"
171+
}
172+
}
173+
]
174+
}

.gitignore

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
node_modules
5+
.pnp
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
12+
13+
# testing
14+
coverage
15+
16+
# next.js
17+
.next/
18+
out/
19+
20+
# production
21+
build
22+
23+
# misc
24+
.DS_Store
25+
*.pem
26+
27+
# debug
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
.pnpm-debug.log*
32+
33+
# env files (can opt-in for committing if needed)
34+
.env*
35+
!.env.example
36+
37+
# vercel
38+
.vercel
39+
40+
# typescript
41+
*.tsbuildinfo
42+
next-env.d.ts
43+
44+
# lock files
45+
package-lock.json
46+
yarn.lock
47+
bun.lockb
48+
49+
# LangGraph API
50+
.langgraph_api
51+
52+
# Git worktrees
53+
.worktrees
54+
55+
# Turbo
56+
.turbo
57+
58+
# Tools
59+
.claude
60+
61+
# Demos
62+
.demos

0 commit comments

Comments
 (0)