Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
1e0575b
fix: change secret name to GEMINI_KEY
swadhinbiswas Jul 10, 2026
5905356
feat: upgrade AI code reviewer to Gemini 3.5 Flash using official SDK
swadhinbiswas Jul 10, 2026
f1b954b
fix: use snake_case for thinking_level parameter
swadhinbiswas Jul 10, 2026
c3ad530
feat: switch AI reviewer from Gemini to Mistral Agent
swadhinbiswas Jul 10, 2026
35ec7c5
fix: add missing bun install step to AI reviewer workflow
swadhinbiswas Jul 10, 2026
0b857d5
fix: resolve AI review duplication and GenAI config issues
swadhinbiswas Jul 10, 2026
5b60c23
fix: require all CI jobs in branch protection and fix NPM provenance …
swadhinbiswas Jul 10, 2026
e00f76e
fix(ci): correct unresolved job dependency perf -> performance
swadhinbiswas Jul 10, 2026
e800281
fix(lint): resolve typescript strict typing errors and unused variables
swadhinbiswas Jul 10, 2026
9a407e5
fix(perf): respect SKIP_REDIS_CHECK and run baseline on built server
swadhinbiswas Jul 10, 2026
f6c4a97
fix(health): ensure storage directory exists before checking access
swadhinbiswas Jul 10, 2026
8786651
test: fix health route unit test mock for fs.mkdir
swadhinbiswas Jul 10, 2026
20ab9f4
fix(health): use proper getDatabase to fix 503 error on health endpoint
swadhinbiswas Jul 10, 2026
9364348
ci: add server warmup curls before running perf tests
swadhinbiswas Jul 10, 2026
a6268f5
ci: disable rate limiter during perf baseline check
swadhinbiswas Jul 10, 2026
2925d70
feat: add AI code reviewer using Gemini API (#68)
swadhinbiswas Jul 10, 2026
381467d
fix: comprehensive UI, docs, security, and deployment improvements
Jul 14, 2026
5fa5633
Merge remote-tracking branch 'origin/main' into feature/ai-code-reviewer
Jul 14, 2026
6ecf049
docs: rewrite README to be concise and professional
Jul 14, 2026
3116958
fix: resolve CI failures - lint errors, docs parity, type casts
Jul 14, 2026
a198b6b
Feature/ai code reviewer (#69)
swadhinbiswas Jul 14, 2026
068fffe
fix: update bun.lock and fix ThemeToggle type error
Jul 14, 2026
5913257
fix: resolve ThemeToggle merge conflict
Jul 14, 2026
f589e00
fix: resolve ThemeToggle merge conflict markers
Jul 14, 2026
ae29b3b
fix: resolve test failures - markdown, auth, admin-stats
Jul 14, 2026
4fff5fb
fix: resolve E2E test failures
Jul 15, 2026
d8121f4
fix: remove trailing garbage characters from full-flow.spec.ts
swadhinbiswas Jul 15, 2026
e00d21c
fix: resolve E2E test failures
swadhinbiswas Jul 15, 2026
270b795
Merge pull request #70 from swadhinbiswas/feature/ai-code-reviewer
swadhinbiswas Jul 15, 2026
e0b3681
ci: suppress Node 20 deprecation warning in docker publish
swadhinbiswas Jul 15, 2026
78e882e
fix: optimize Dockerfile - use --production for deps, slim base image
swadhinbiswas Jul 15, 2026
0d3c59c
docs: rich professional README with video placeholder and complete fe…
swadhinbiswas Jul 16, 2026
dc3b077
🤯fix: remove duplicate HTML structure from api-docs page causing buil…
swadhinbiswas Jul 16, 2026
bb98ea3
docs: add Docker Hub description with logo and setup instructions
swadhinbiswas Jul 16, 2026
e4e0855
fix:🥟 replace @apply with plain CSS in layout style blocks
swadhinbiswas Jul 16, 2026
2f3dec7
fix: move admin styles to globals.css, remove all is:global style blo…
swadhinbiswas Jul 16, 2026
ae6ebe8
Merge branch 'main' into feature/ai-code-reviewer
swadhinbiswas Jul 16, 2026
65baa16
fix: remove all CSS style blocks from pages causing Docker build failure
swadhinbiswas Jul 16, 2026
2f87bd7
fix: remove highlight.js CSS import causing Docker build failure
swadhinbiswas Jul 16, 2026
e60345c
fix: remove last style block from BaseLayout, move fonts/container to…
swadhinbiswas Jul 16, 2026
ebed9c1
fix: use postcss transformer to resolve vite:css build failure
swadhinbiswas Jul 17, 2026
159a3a5
fix: pin postcss to 8.4.x to fix Docker build failure
swadhinbiswas Jul 17, 2026
288fa63
fix: resolve docker build error and overhaul UI with premium github-l…
swadhinbiswas Jul 17, 2026
147c6fd
fix: resolve CSRF validation error when creating a repository
swadhinbiswas Jul 17, 2026
66af149
fix: implement global CSRF fetch interceptor
swadhinbiswas Jul 17, 2026
d29526a
fix: inject INTERNAL_HOOK_SECRET and REMOTE_USER for internal git pushes
swadhinbiswas Jul 17, 2026
c3acbd3
fix: use correct fallback port for internal git hooks
swadhinbiswas Jul 17, 2026
b899c67
fix: internal git hooks should always use 127.0.0.1 for local API calls
swadhinbiswas Jul 17, 2026
de6ba86
📦 chore: update .cron-lock
swadhinbiswas Jul 24, 2026
a5fc437
📝 docs: update README
swadhinbiswas Jul 24, 2026
a69922e
📝 docs: update notimplemented
swadhinbiswas Jul 24, 2026
00dd7f1
✨ feat: improve IssueDetail.tsx
swadhinbiswas Jul 24, 2026
8363805
✨ feat: update Header.astro page
swadhinbiswas Jul 24, 2026
9004b79
✨ feat: improve MilestonesList.tsx
swadhinbiswas Jul 24, 2026
9f9cf5d
✨ feat: improve NewMilestoneForm.tsx
swadhinbiswas Jul 24, 2026
9d59de7
✨ feat: improve CustomPRState.tsx
swadhinbiswas Jul 24, 2026
8a5ae62
✨ feat: improve InlineDiffReview.tsx
swadhinbiswas Jul 24, 2026
8dcbd4e
✨ feat: improve PullRequestsList.tsx
swadhinbiswas Jul 24, 2026
ed4f8fd
✨ feat: improve RepoSettings.tsx
swadhinbiswas Jul 24, 2026
aa542bc
✨ feat: improve WorkflowSettings.tsx
swadhinbiswas Jul 24, 2026
a8ef223
♻️ refactor: update index.ts
swadhinbiswas Jul 24, 2026
4647d12
♻️ refactor: update ci-gates.ts
swadhinbiswas Jul 24, 2026
2816e0e
♻️ refactor: update codeowners-enforcement.ts
swadhinbiswas Jul 24, 2026
c00e371
♻️ refactor: update git.ts
swadhinbiswas Jul 24, 2026
5c45620
♻️ refactor: update middleware.ts
swadhinbiswas Jul 24, 2026
8674de0
♻️ refactor: update csrf.ts
swadhinbiswas Jul 24, 2026
e27c69f
✨ feat: update [...path].astro page
swadhinbiswas Jul 24, 2026
173e539
✨ feat: update [sha].astro page
swadhinbiswas Jul 24, 2026
23b1011
✨ feat: update new.astro page
swadhinbiswas Jul 24, 2026
4c406a0
✨ feat: update [number].astro page
swadhinbiswas Jul 24, 2026
a2678d7
✨ feat: update deploy-keys.astro page
swadhinbiswas Jul 24, 2026
c3d05c4
✨ feat: update [...ref].astro page
swadhinbiswas Jul 24, 2026
5f99cf3
✨ feat: update [...path].astro page
swadhinbiswas Jul 24, 2026
d60ea80
✨ feat: update index.astro page
swadhinbiswas Jul 24, 2026
a198c73
♻️ refactor: update logout.ts
swadhinbiswas Jul 24, 2026
9989f4b
♻️ refactor: update register.ts
swadhinbiswas Jul 24, 2026
61d6e0c
♻️ refactor: update [branch].ts
swadhinbiswas Jul 24, 2026
1c8622f
♻️ refactor: update index.ts
swadhinbiswas Jul 24, 2026
6c3be43
♻️ refactor: update [userId].ts
swadhinbiswas Jul 24, 2026
5603996
♻️ refactor: update index.ts
swadhinbiswas Jul 24, 2026
32a023f
♻️ refactor: update push.ts
swadhinbiswas Jul 24, 2026
36377f7
♻️ refactor: update index.ts
swadhinbiswas Jul 24, 2026
962fa93
♻️ refactor: update [number].ts
swadhinbiswas Jul 24, 2026
855904e
♻️ refactor: update comments.ts
swadhinbiswas Jul 24, 2026
c68bdde
♻️ refactor: update index.ts
swadhinbiswas Jul 24, 2026
ec58f49
♻️ refactor: update [labelId].ts
swadhinbiswas Jul 24, 2026
5309f84
♻️ refactor: update index.ts
swadhinbiswas Jul 24, 2026
31ca9ff
♻️ refactor: update index.ts
swadhinbiswas Jul 24, 2026
ea46cef
♻️ refactor: update protection.ts
swadhinbiswas Jul 24, 2026
6d09753
♻️ refactor: update code-quality.ts
swadhinbiswas Jul 24, 2026
10229ec
♻️ refactor: update codeowner-enforcement.ts
swadhinbiswas Jul 24, 2026
c68c525
♻️ refactor: update comments.ts
swadhinbiswas Jul 24, 2026
eb43872
♻️ refactor: update file-approvals.ts
swadhinbiswas Jul 24, 2026
e541e04
♻️ refactor: update index.ts
swadhinbiswas Jul 24, 2026
9693b6f
♻️ refactor: update merge.ts
swadhinbiswas Jul 24, 2026
61297cb
♻️ refactor: update index.ts
swadhinbiswas Jul 24, 2026
8aac430
♻️ refactor: update issue-statuses.ts
swadhinbiswas Jul 24, 2026
56a9aff
♻️ refactor: update path-permissions.ts
swadhinbiswas Jul 24, 2026
84bfa47
♻️ refactor: update states.ts
swadhinbiswas Jul 24, 2026
3e37e83
♻️ refactor: update [id].ts
swadhinbiswas Jul 24, 2026
5688a8b
♻️ refactor: update test.ts
swadhinbiswas Jul 24, 2026
5c6ee97
♻️ refactor: update index.ts
swadhinbiswas Jul 24, 2026
9852399
♻️ refactor: update [slug].ts
swadhinbiswas Jul 24, 2026
e25f497
♻️ refactor: update [id].ts
swadhinbiswas Jul 24, 2026
c8223ec
♻️ refactor: update index.ts
swadhinbiswas Jul 24, 2026
8ccc4ba
♻️ refactor: update index.ts
swadhinbiswas Jul 24, 2026
15788e8
♻️ refactor: update [stackId].ts
swadhinbiswas Jul 24, 2026
3b3ab75
♻️ refactor: update sync.ts
swadhinbiswas Jul 24, 2026
413aaa1
♻️ refactor: update index.ts
swadhinbiswas Jul 24, 2026
d35e62d
♻️ refactor: update index.ts
swadhinbiswas Jul 24, 2026
67c4584
♻️ refactor: update user.ts
swadhinbiswas Jul 24, 2026
f9aba21
♻️ refactor: update [id].ts
swadhinbiswas Jul 24, 2026
8fd7f76
♻️ refactor: update index.ts
swadhinbiswas Jul 24, 2026
795e3da
♻️ refactor: update index.ts
swadhinbiswas Jul 24, 2026
f90bdd2
♻️ refactor: update metrics.ts
swadhinbiswas Jul 24, 2026
67283e9
♻️ refactor: update [id].ts
swadhinbiswas Jul 24, 2026
627260e
♻️ refactor: update metrics.ts
swadhinbiswas Jul 24, 2026
76746f9
✨ feat: update cli.astro page
swadhinbiswas Jul 24, 2026
45e0597
♻️ refactor: update refs.ts
swadhinbiswas Jul 24, 2026
ba5ff9f
✨ feat: update ai-review-rules.astro page
swadhinbiswas Jul 24, 2026
ce0ba87
✨ feat: update ssh-keys.astro page
swadhinbiswas Jul 24, 2026
641fef4
🎨 style: improve globals.css
swadhinbiswas Jul 24, 2026
9c385ab
♻️ refactor: update openapi-pulls-parity.test.ts
swadhinbiswas Jul 24, 2026
eddb415
📦 chore: update plans
swadhinbiswas Jul 24, 2026
ea811be
📝 docs: update cli
swadhinbiswas Jul 24, 2026
1938743
📝 docs: update ssh-keys
swadhinbiswas Jul 24, 2026
4fae0b9
📦 chore: update smartcommit.sh
swadhinbiswas Jul 24, 2026
d0e310a
✨ feat: improve CodeReviewPanel.tsx
swadhinbiswas Jul 24, 2026
0a09d9d
♻️ refactor: update review-analysis.ts
swadhinbiswas Jul 24, 2026
ccc338f
📦 chore: update review
swadhinbiswas Jul 24, 2026
70ffd48
📦 chore: update [id]
swadhinbiswas Jul 24, 2026
1435dfa
🚀 api: update milestones
swadhinbiswas Jul 24, 2026
9219247
♻️ refactor: update analysis.ts
swadhinbiswas Jul 24, 2026
0257552
feat(enterprise): add SAML 2.0, SCIM 2.0, OCI Registry, NPM package e…
swadhinbiswas Jul 30, 2026
f1c211c
fix(ci): resolve vite import issue in astro.config.mjs for GitHub Act…
swadhinbiswas Jul 30, 2026
3e11115
fix(security): update package overrides and known accepted vulnerabil…
swadhinbiswas Jul 30, 2026
3237dfc
fix(ci): update bun.lock to synchronize package.json and fix frozen-l…
swadhinbiswas Jul 30, 2026
eb28d38
fix(security): resolve EOVERRIDE conflict and add brace-expansion to …
swadhinbiswas Jul 30, 2026
ceffb76
feat: comprehensive UI overhaul, security hardening, docs, and deploy…
swadhinbiswas Jul 31, 2026
6f4e9a5
fix: resolve accessibility color contrast and theme toggle test failures
swadhinbiswas Jul 31, 2026
cf018e0
merge: resolve CSS conflicts with main (keep a11y primary/ring fix at…
swadhinbiswas Jul 31, 2026
b1978ff
fix: add retry loop and cache clearing to prod-deps Docker stage
swadhinbiswas Jul 31, 2026
277fe7b
ci: use BuildKit with GHA cache for container-scan Docker build
swadhinbiswas Jul 31, 2026
93d2afd
fix: harden production deployments (secrets, compose, migrations, met…
swadhinbiswas Aug 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .astro/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"_variables": {
"lastUpdateCheck": 1783539359887
"lastUpdateCheck": 1783961044818
}
}
10 changes: 10 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ SSH_PORT=2222
STORAGE_TYPE=local
STORAGE_PATH=./data/storage

# NAS / dedicated-disk deployments (docker-compose.nas.yml):
# Point every data directory at your NAS mount or dedicated disk.
# OCH_DATA_DIR=/mnt/nas/opencodehub
# STORAGE_PATH=./data/storage # or /mnt/nas/opencodehub/storage with local driver

# S3 Configuration (required when STORAGE_TYPE=s3)
# Works with AWS S3, MinIO, Cloudflare R2, Garage, SeaweedFS,
# Ceph RGW, Wasabi, Backblaze B2, etc.
Expand Down Expand Up @@ -159,6 +164,11 @@ BACKUP_DIR=./backups
AIR_GAPPED_MODE=false

# ── Observability (optional) ────────────────────────────────
# Bearer token protecting GET /api/metrics (Prometheus). Set a value in
# production; when empty, the endpoint is public and should be restricted
# at the reverse proxy.
METRICS_TOKEN=

# Grafana Cloud OTLP
GRAFANA_OTLP_ENDPOINT=
GRAFANA_INSTANCE_ID=
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ai-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ jobs:
with:
bun-version: latest

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Run AI Review
env:
# Use user's PAT to count towards their GitHub contribution graph, fallback to standard bot token
GITHUB_TOKEN: ${{ secrets.GH_PAT || secrets.GITHUB_TOKEN }}
GEMINI_API_KEY: ${{ secrets.GEMINIKEY }}
AGENT_API_KEY: ${{ secrets.AGENT_API_KEY }}
PR_NUMBER: ${{ github.event.pull_request.number }}
REPO: ${{ github.repository }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
Expand Down
29 changes: 22 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,18 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker image
run: docker build -t opencodehub:ci -f Dockerfile .
uses: docker/build-push-action@v5
with:
context: .
load: true
tags: opencodehub:ci
file: Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
Expand Down Expand Up @@ -347,9 +357,11 @@ jobs:
DATABASE_DRIVER: postgres
- name: Start server and run perf check
run: |
bun run dev &
HOST=127.0.0.1 PORT=4321 node ./dist/server/entry.mjs &
SERVER_PID=$!
sleep 8
sleep 5
curl -s http://127.0.0.1:4321/api/health > /dev/null || true
curl -s http://127.0.0.1:4321/api/metrics > /dev/null || true
bun run perf:baseline
kill $SERVER_PID 2>/dev/null || true
env:
Expand All @@ -360,6 +372,7 @@ jobs:
INTERNAL_HOOK_SECRET: "ci-perf-hook"
CSRF_SKIP_DEV: "true"
RATE_LIMIT_SKIP_DEV: "true"
RATE_LIMIT_ENABLED: "false"
SKIP_REDIS_CHECK: "1"
PERF_BASE_URL: http://127.0.0.1:4321
PERF_PATHS: /api/health,/api/metrics
Expand Down Expand Up @@ -460,6 +473,9 @@ jobs:
runs-on: ubuntu-latest
needs: [build, e2e]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4

Expand All @@ -482,7 +498,6 @@ jobs:
done
echo "::error::bun install failed after 3 attempts"
exit 1
working-directory: cli

- name: Build CLI
run: bun run build
Expand All @@ -500,7 +515,7 @@ jobs:
quality-gate:
name: Quality Gate
runs-on: ubuntu-latest
needs: [lint, docs-parity, security, test, e2e, container-scan, sast, perf, build]
needs: [lint, docs-parity, security, test, e2e, container-scan, sast, performance, build]
if: always()
steps:
- name: Check all gates
Expand All @@ -515,13 +530,13 @@ jobs:

echo "Docs Parity: ${{ needs.docs-parity.result }}"
echo "Security Gates: ${{ needs.security.result }}"
echo "Perf Gate: ${{ needs.perf.result }}"
echo "Perf Gate: ${{ needs.performance.result }}"

if [[ "${{ needs.lint.result }}" != "success" ]] || \
[[ "${{ needs.docs-parity.result }}" != "success" ]] || \
[[ "${{ needs.security.result }}" != "success" ]] || \
[[ "${{ needs.test.result }}" != "success" ]] || \
[[ "${{ needs.perf.result }}" != "success" ]] || \
[[ "${{ needs.performance.result }}" != "success" ]] || \
[[ "${{ needs.build.result }}" != "success" ]]; then
echo "::error::Quality gate FAILED — required checks did not pass"
exit 1
Expand Down
86 changes: 66 additions & 20 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:

env:
REGISTRY: docker.io
IMAGE_NAME: swadhinbiswas/opencodehub
IMAGE_NAME: opencodehub/opencodehub
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: "true"

jobs:
build-and-push:
Expand All @@ -21,6 +22,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand All @@ -30,8 +34,8 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Extract metadata
id: meta
- name: Extract Metadata (App)
id: meta-app
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
Expand All @@ -42,47 +46,89 @@ jobs:
type=sha,prefix=
type=raw,value=latest,enable={{is_default_branch}}
labels: |
org.opencontainers.image.title=OpenCodeHub
org.opencontainers.image.description=A modern, self-hosted Git platform for teams that want speed, control, and clean workflows.
org.opencontainers.image.title=OpenCodeHub Platform
org.opencontainers.image.description=A modern, self-hosted Git platform with stacked PRs, merge queue, CI/CD, and AI review.
org.opencontainers.image.url=https://github.com/swadhinbiswas/OpencodeHub
org.opencontainers.image.source=https://github.com/swadhinbiswas/OpencodeHub
org.opencontainers.image.licenses=MIT

- name: Extract Metadata (Worker)
id: meta-worker
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-worker
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=
type=raw,value=latest,enable={{is_default_branch}}
labels: |
org.opencontainers.image.title=OpenCodeHub Worker
org.opencontainers.image.description=Background task worker for OpenCodeHub (queues, webhooks, notifications).
org.opencontainers.image.url=https://github.com/swadhinbiswas/OpencodeHub
org.opencontainers.image.source=https://github.com/swadhinbiswas/OpencodeHub
org.opencontainers.image.licenses=MIT

- name: Build and push app image
- name: Extract Metadata (Runner)
id: meta-runner
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-runner
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=
type=raw,value=latest,enable={{is_default_branch}}
labels: |
org.opencontainers.image.title=OpenCodeHub Runner
org.opencontainers.image.description=Docker-in-Docker CI/CD runner for OpenCodeHub pipelines.
org.opencontainers.image.url=https://github.com/swadhinbiswas/OpencodeHub
org.opencontainers.image.source=https://github.com/swadhinbiswas/OpencodeHub
org.opencontainers.image.licenses=MIT

- name: Build and Push App Image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta-app.outputs.tags }}
labels: ${{ steps.meta-app.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64

- name: Build and push runner image
- name: Build and Push Worker Image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.worker
push: true
tags: ${{ steps.meta-worker.outputs.tags }}
labels: ${{ steps.meta-worker.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64

- name: Build and Push Runner Image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.runner
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-runner:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-runner:${{ github.sha }}
labels: |
org.opencontainers.image.title=OpenCodeHub Runner
org.opencontainers.image.description=CI/CD runner for OpenCodeHub
org.opencontainers.image.url=https://github.com/swadhinbiswas/OpencodeHub
org.opencontainers.image.source=https://github.com/swadhinbiswas/OpencodeHub
org.opencontainers.image.licenses=MIT
tags: ${{ steps.meta-runner.outputs.tags }}
labels: ${{ steps.meta-runner.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64

- name: Update Docker Hub Repository Description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
repository: ${{ env.IMAGE_NAME }}
readme-filepath: ./README.md
short-description: "A modern, self-hosted Git platform with stacked PRs, merge queue, CI/CD, and AI review."
readme-filepath: ./DOCKERHUB.md
short-description: "Self-hosted Git platform with stacked PRs, merge queue, CI/CD, and AI code review"
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ pci/
# Docker
.docker/

# Drizzle
drizzle/meta/
# Drizzle — migrations and the migration journal must be committed so that
# runtime containers can apply schema deterministically (scripts/migrate.ts)
# drizzle/

# Monaco Editor cache
.monaco/
Expand Down
1 change: 1 addition & 0 deletions .mimocode/.cron-lock
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"pid":8618,"startedAt":1784441536749}
57 changes: 57 additions & 0 deletions .mimocode/plans/1784309305424-sunny-pixel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# GitHub-like Profile Portfolio Page

## Current State
The profile page at `src/pages/[owner]/index.astro` already has:
- Avatar, display name, username, bio
- Details (company, location, email, website, join date)
- Followers/following
- Contribution graph
- Repository list
- Activity feed

## What Needs to Change

On GitHub, when you visit `github.com/username`, you see:
1. **Left sidebar**: Avatar (large), name, username, bio, details, followers/following, "Edit profile" button
2. **Main content**:
- "Read me" section rendered from `username/username` repository's README.md
- "Pinned" repositories section (6 repos max, customizable)
- Contribution graph
- Activity feed

The current OpenCodeHub page has this mostly but the layout and "Read me" section from the special repo are missing.

## Implementation Plan

### 1. Auto-create profile repository on user registration
- When a user registers, automatically create a `{username}/{username}` repository (like GitHub)
- Seed it with a default README.md containing the user's name and bio
- This repo should be private by default but its README is shown on the public profile

### 2. Update profile page layout
- Move to GitHub's 2-column layout: left sidebar (avatar + details) + main content
- Left sidebar: Large avatar, name, username, bio, details, followers/following
- Main content: Render README.md from profile repo, pinned repos, contribution graph, activity

### 3. Add "Read me" section
- Fetch `README.md` from `{username}/{username}` repository
- Render it as markdown in the profile page (like GitHub does)
- If no README exists, show the current default layout

### 4. Add pinned repositories section
- Allow users to pin up to 6 repositories to their profile
- Store pinned repo IDs in user settings or a separate table
- Show pinned repos in a grid below the README

### Files to Modify
- `src/pages/[owner]/index.astro` — Main profile page
- `src/pages/api/repos/index.ts` — Auto-create profile repo on registration
- `src/pages/register.astro` — Trigger profile repo creation
- `src/components/repo/ProfileREADME.tsx` — New component to render profile README
- `src/components/repo/PinnedRepos.tsx` — New component for pinned repos grid

### Verification
1. Register a new user → profile repo auto-created with README
2. Visit `/{username}` → shows GitHub-like profile with README, pinned repos, contribution graph
3. Edit profile repo README → profile page updates
4. Pin/unpin repositories → grid updates
8 changes: 5 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ Configured via `STORAGE_TYPE` env var (`local` or `s3`).
npm install -g opencodehub-cli

# Auth
och auth login --url http://localhost:3000
och auth login --url http://localhost:4321

# Stack workflow
och stack create feature/part-1 # Create stacked branch
Expand Down Expand Up @@ -343,7 +343,7 @@ npm run db:push
bun run scripts/seed-admin.ts # Create admin user

# Dev
npm run dev # Start dev server (port 3000)
npm run dev # Start dev server (port 4321)
npm run git:start # Start SSH git server (port 2222)
npm run worker:start # Start background worker
npm run runner:start # Start CI runner
Expand Down Expand Up @@ -392,7 +392,9 @@ docker-compose up -d # Full stack with postgres + redis + runner
4. Configure Redis for distributed locking
5. Enable rate limiting (`RATE_LIMIT_ENABLED=true`)
6. Set up email (SMTP) for notifications
7. Configure storage backend (S3/GCS recommended for multi-node)
7. Configure storage backend (`local` for single-host/NAS, S3-compatible for multi-node)
8. Set `METRICS_TOKEN` to protect `GET /api/metrics`
9. Apply committed migrations (`bun run migrate` — runs automatically in containers)

### Vercel/Edge
- Turso (LibSQL) recommended for edge deployment
Expand Down
Loading
Loading