Skip to content

Commit ad1621c

Browse files
committed
chore: fix lint errors and prepare for release
1 parent 820fe32 commit ad1621c

115 files changed

Lines changed: 9429 additions & 1441 deletions

File tree

Some content is hidden

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

.claude/settings.local.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,20 @@
33
"allow": [
44
"Bash(pnpm install:*)",
55
"Bash(pnpm --filter=@glean/web typecheck:*)",
6-
"Bash(pnpm --filter=@glean/web build:*)"
6+
"Bash(pnpm --filter=@glean/web build:*)",
7+
"mcp__chrome-devtools__list_pages",
8+
"mcp__chrome-devtools__navigate_page",
9+
"mcp__chrome-devtools__take_screenshot",
10+
"mcp__chrome-devtools__take_snapshot",
11+
"mcp__chrome-devtools__fill_form",
12+
"mcp__chrome-devtools__click",
13+
"mcp__chrome-devtools__wait_for",
14+
"mcp__chrome-devtools__list_console_messages",
15+
"mcp__chrome-devtools__list_network_requests",
16+
"mcp__chrome-devtools__get_network_request",
17+
"mcp__chrome-devtools__fill",
18+
"mcp__chrome-devtools__evaluate_script",
19+
"Bash(docker exec:*)"
720
],
821
"deny": [],
922
"ask": []

.env.example

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,40 @@
1-
# ==================== Application ====================
2-
DEBUG=true
3-
SECRET_KEY=your-secret-key-change-in-production
1+
# Glean Environment Configuration
2+
# Copy this file to .env and customize for your environment
43

5-
# ==================== Database ====================
6-
DATABASE_URL=postgresql+asyncpg://glean:devpassword@localhost:5432/glean
4+
# ========================================
5+
# Database Configuration
6+
# ========================================
7+
POSTGRES_DB=glean
8+
POSTGRES_USER=glean
9+
POSTGRES_PASSWORD=glean
710

8-
# ==================== Redis ====================
9-
REDIS_URL=redis://localhost:6379/0
11+
# ========================================
12+
# Backend Configuration
13+
# ========================================
14+
# JWT secret key - CHANGE THIS IN PRODUCTION!
15+
# Generate with: openssl rand -hex 32
16+
SECRET_KEY=change-me-in-production-use-a-long-random-string
1017

11-
# ==================== JWT ====================
12-
JWT_ALGORITHM=HS256
13-
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=15
14-
JWT_REFRESH_TOKEN_EXPIRE_DAYS=7
18+
# Enable debug mode (shows API docs at /api/docs)
19+
DEBUG=false
1520

16-
# ==================== CORS ====================
17-
CORS_ORIGINS=["http://localhost:3000","http://localhost:3001"]
21+
# ========================================
22+
# Port Configuration
23+
# ========================================
24+
# Web interface port
25+
WEB_PORT=80
26+
27+
# Admin dashboard port (only for full deployment)
28+
ADMIN_PORT=3001
29+
30+
# ========================================
31+
# Development Configuration (optional)
32+
# ========================================
33+
# Full database URL (auto-generated from above if not set)
34+
# DATABASE_URL=postgresql+asyncpg://glean:glean@localhost:5432/glean
35+
36+
# Redis URL
37+
# REDIS_URL=redis://localhost:6379/0
38+
39+
# CORS origins (JSON array)
40+
# CORS_ORIGINS=["http://localhost", "http://localhost:3000"]

.github/workflows/release.yml

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
env:
9+
REGISTRY: ghcr.io
10+
IMAGE_PREFIX: ${{ github.repository_owner }}/glean
11+
12+
jobs:
13+
build-backend:
14+
name: Build Backend Image
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
packages: write
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up QEMU
25+
uses: docker/setup-qemu-action@v3
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v3
29+
30+
- name: Log in to Container Registry
31+
uses: docker/login-action@v3
32+
with:
33+
registry: ${{ env.REGISTRY }}
34+
username: ${{ github.actor }}
35+
password: ${{ secrets.GITHUB_TOKEN }}
36+
37+
- name: Extract metadata
38+
id: meta
39+
uses: docker/metadata-action@v5
40+
with:
41+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-backend
42+
tags: |
43+
type=semver,pattern={{version}}
44+
type=semver,pattern={{major}}.{{minor}}
45+
type=semver,pattern={{major}}
46+
type=raw,value=latest,enable={{is_default_branch}}
47+
48+
- name: Build and push Backend image
49+
uses: docker/build-push-action@v5
50+
with:
51+
context: ./backend
52+
file: ./backend/Dockerfile
53+
platforms: linux/amd64,linux/arm64
54+
push: true
55+
tags: ${{ steps.meta.outputs.tags }}
56+
labels: ${{ steps.meta.outputs.labels }}
57+
cache-from: type=gha
58+
cache-to: type=gha,mode=max
59+
60+
build-web:
61+
name: Build Web Frontend Image
62+
runs-on: ubuntu-latest
63+
permissions:
64+
contents: read
65+
packages: write
66+
67+
steps:
68+
- name: Checkout repository
69+
uses: actions/checkout@v4
70+
71+
- name: Set up QEMU
72+
uses: docker/setup-qemu-action@v3
73+
74+
- name: Set up Docker Buildx
75+
uses: docker/setup-buildx-action@v3
76+
77+
- name: Log in to Container Registry
78+
uses: docker/login-action@v3
79+
with:
80+
registry: ${{ env.REGISTRY }}
81+
username: ${{ github.actor }}
82+
password: ${{ secrets.GITHUB_TOKEN }}
83+
84+
- name: Extract metadata
85+
id: meta
86+
uses: docker/metadata-action@v5
87+
with:
88+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-web
89+
tags: |
90+
type=semver,pattern={{version}}
91+
type=semver,pattern={{major}}.{{minor}}
92+
type=semver,pattern={{major}}
93+
type=raw,value=latest,enable={{is_default_branch}}
94+
95+
- name: Build and push Web image
96+
uses: docker/build-push-action@v5
97+
with:
98+
context: ./frontend
99+
file: ./frontend/apps/web/Dockerfile
100+
platforms: linux/amd64,linux/arm64
101+
push: true
102+
tags: ${{ steps.meta.outputs.tags }}
103+
labels: ${{ steps.meta.outputs.labels }}
104+
cache-from: type=gha
105+
cache-to: type=gha,mode=max
106+
107+
build-admin:
108+
name: Build Admin Dashboard Image
109+
runs-on: ubuntu-latest
110+
permissions:
111+
contents: read
112+
packages: write
113+
114+
steps:
115+
- name: Checkout repository
116+
uses: actions/checkout@v4
117+
118+
- name: Set up QEMU
119+
uses: docker/setup-qemu-action@v3
120+
121+
- name: Set up Docker Buildx
122+
uses: docker/setup-buildx-action@v3
123+
124+
- name: Log in to Container Registry
125+
uses: docker/login-action@v3
126+
with:
127+
registry: ${{ env.REGISTRY }}
128+
username: ${{ github.actor }}
129+
password: ${{ secrets.GITHUB_TOKEN }}
130+
131+
- name: Extract metadata
132+
id: meta
133+
uses: docker/metadata-action@v5
134+
with:
135+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-admin
136+
tags: |
137+
type=semver,pattern={{version}}
138+
type=semver,pattern={{major}}.{{minor}}
139+
type=semver,pattern={{major}}
140+
type=raw,value=latest,enable={{is_default_branch}}
141+
142+
- name: Build and push Admin image
143+
uses: docker/build-push-action@v5
144+
with:
145+
context: ./frontend
146+
file: ./frontend/apps/admin/Dockerfile
147+
platforms: linux/amd64,linux/arm64
148+
push: true
149+
tags: ${{ steps.meta.outputs.tags }}
150+
labels: ${{ steps.meta.outputs.labels }}
151+
cache-from: type=gha
152+
cache-to: type=gha,mode=max
153+
154+
create-release:
155+
name: Create GitHub Release
156+
needs: [build-backend, build-web, build-admin]
157+
runs-on: ubuntu-latest
158+
permissions:
159+
contents: write
160+
161+
steps:
162+
- name: Checkout repository
163+
uses: actions/checkout@v4
164+
165+
- name: Create Release
166+
uses: softprops/action-gh-release@v1
167+
with:
168+
generate_release_notes: true
169+
body: |
170+
## Docker Images
171+
172+
This release includes the following Docker images:
173+
174+
- `ghcr.io/${{ env.IMAGE_PREFIX }}-backend:${{ github.ref_name }}`
175+
- `ghcr.io/${{ env.IMAGE_PREFIX }}-web:${{ github.ref_name }}`
176+
- `ghcr.io/${{ env.IMAGE_PREFIX }}-admin:${{ github.ref_name }}`
177+
178+
## Quick Start
179+
180+
```bash
181+
# Download docker-compose.yml
182+
curl -fsSL https://raw.githubusercontent.com/${{ github.repository }}/main/docker-compose.yml -o docker-compose.yml
183+
184+
# Start Glean
185+
docker compose up -d
186+
187+
# Access at http://localhost
188+
```
189+
190+
See [README](https://github.com/${{ github.repository }}#quick-start) for full documentation.
191+
env:
192+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
193+

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ env/
3939
.project
4040
.classpath
4141
.settings/
42+
.claude
43+
.cursor
44+
.cursorrules
4245

4346
# Testing
4447
.coverage

0 commit comments

Comments
 (0)