Skip to content

Commit 0b5dee7

Browse files
shantanu patilshantanu patil
authored andcommitted
BetterCodeWiki - AI-powered code documentation platform
Enhanced fork of DeepWiki-Open with: - 3D landing page with Three.js hero - Redesigned UI with modern design system - Enhanced Mermaid diagrams with animated flows - Visual dependency graphs - Export to Markdown, JSON, Notion, Confluence, HTML - Global search (Cmd+K), reading mode (Alt+R) - Floating table of contents - Framer Motion page transitions Originally based on DeepWiki-Open by AsyncFuncAI (MIT License).
0 parents  commit 0b5dee7

136 files changed

Lines changed: 51011 additions & 0 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.

.dockerignore

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Git
2+
.git
3+
.gitignore
4+
.github
5+
6+
# Node.js
7+
node_modules
8+
npm-debug.log
9+
yarn-debug.log
10+
yarn-error.log
11+
12+
# Next.js
13+
.next
14+
out
15+
16+
# Python cache files (but keep api/ directory)
17+
__pycache__/
18+
*.py[cod]
19+
*$py.class
20+
*.so
21+
.Python
22+
env/
23+
build/
24+
develop-eggs/
25+
dist/
26+
downloads/
27+
eggs/
28+
.eggs/
29+
lib/
30+
lib64/
31+
parts/
32+
sdist/
33+
var/
34+
*.egg-info/
35+
.installed.cfg
36+
*.egg
37+
# Keep api/ directory but exclude cache
38+
api/__pycache__/
39+
api/*.pyc
40+
41+
# Environment variables
42+
# .env is now allowed to be included in the build
43+
.env.local
44+
.env.development.local
45+
.env.test.local
46+
.env.production.local
47+
48+
# Docker
49+
Dockerfile
50+
docker-compose.yml
51+
.dockerignore
52+
53+
# Misc
54+
.DS_Store
55+
*.pem
56+
README.md
57+
LICENSE
58+
screenshots/
59+
*.md
60+
!api/README.md
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
# Allow manual trigger
9+
workflow_dispatch:
10+
11+
env:
12+
REGISTRY: ghcr.io
13+
IMAGE_NAME: ${{ github.repository }}
14+
15+
concurrency:
16+
# This concurrency group ensures that only one job in the group runs at a time.
17+
# If a new job is triggered, the previous one will be canceled.
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
build-and-push:
23+
strategy:
24+
matrix:
25+
include:
26+
- os: ubuntu-latest
27+
platform: linux/amd64
28+
- os: ubuntu-24.04-arm
29+
platform: linux/arm64
30+
runs-on: ${{ matrix.os }}
31+
permissions:
32+
contents: read
33+
packages: write
34+
35+
steps:
36+
- name: Prepare environment for current platform
37+
id: prepare
38+
run: |
39+
platform=${{ matrix.platform }}
40+
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
41+
echo "GHCR_IMAGE=ghcr.io/${GITHUB_REPOSITORY@L}" >> $GITHUB_ENV
42+
43+
- name: Checkout repository
44+
uses: actions/checkout@v4
45+
46+
- name: Set up Docker Buildx
47+
uses: docker/setup-buildx-action@v3
48+
49+
- name: Log in to the Container registry
50+
if: github.event_name != 'pull_request'
51+
uses: docker/login-action@v3
52+
with:
53+
registry: ${{ env.REGISTRY }}
54+
username: ${{ github.actor }}
55+
password: ${{ secrets.GITHUB_TOKEN }}
56+
57+
- name: Extract metadata (tags, labels) for Docker
58+
id: meta
59+
uses: docker/metadata-action@v5
60+
with:
61+
images: ${{ env.GHCR_IMAGE }}
62+
63+
- name: Create empty .env file for build
64+
run: touch .env
65+
66+
- name: Build and push Docker image
67+
uses: docker/build-push-action@v6
68+
id: build
69+
with:
70+
context: .
71+
platforms: ${{ matrix.platform }}
72+
push: ${{ github.event_name != 'pull_request' }}
73+
annotations: ${{ steps.meta.outputs.annotations }}
74+
labels: ${{ steps.meta.outputs.labels }}
75+
outputs: type=image,name=${{ env.GHCR_IMAGE }},push-by-digest=true,name-canonical=true,push=${{ github.event_name != 'pull_request' }},oci-mediatypes=true
76+
cache-from: type=gha,scope=${{ github.repository }}-${{ github.ref_name }}-${{ matrix.platform }}
77+
cache-to: type=gha,mode=max,scope=${{ github.repository }}-${{ github.ref_name }}-${{ matrix.platform }}
78+
79+
- name: Export digest
80+
run: |
81+
mkdir -p /tmp/digests
82+
digest="${{ steps.build.outputs.digest }}"
83+
touch "/tmp/digests/${digest#sha256:}"
84+
85+
- name: Upload digest
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: digests-${{ env.PLATFORM_PAIR }}
89+
path: /tmp/digests/*
90+
if-no-files-found: error
91+
retention-days: 1
92+
93+
merge:
94+
name: merge Docker manifests
95+
runs-on: ubuntu-latest
96+
if: github.event_name != 'pull_request'
97+
permissions:
98+
contents: read
99+
packages: write
100+
101+
needs:
102+
- build-and-push
103+
steps:
104+
- name: Prepare environment
105+
id: prepare
106+
run: |
107+
echo "GHCR_IMAGE=ghcr.io/${GITHUB_REPOSITORY@L}" >> $GITHUB_ENV
108+
109+
- name: Download digests
110+
uses: actions/download-artifact@v4
111+
with:
112+
path: /tmp/digests
113+
pattern: digests-*
114+
merge-multiple: true
115+
116+
117+
- name: Docker meta
118+
id: meta
119+
uses: docker/metadata-action@v5
120+
with:
121+
images: ${{ env.GHCR_IMAGE }}
122+
annotations: |
123+
type=org.opencontainers.image.description,value=${{ github.event.repository.description || 'No description provided' }}
124+
tags: |
125+
type=semver,pattern={{version}}
126+
type=semver,pattern={{major}}.{{minor}}
127+
type=sha,format=short
128+
type=ref,event=branch
129+
type=ref,event=pr
130+
latest
131+
132+
- name: Set up Docker Buildx
133+
uses: docker/setup-buildx-action@v3
134+
with:
135+
driver-opts: |
136+
network=host
137+
138+
- name: Login to GitHub Container Registry
139+
uses: docker/login-action@v3
140+
with:
141+
registry: ${{ env.REGISTRY }}
142+
username: ${{ github.actor }}
143+
password: ${{ secrets.GITHUB_TOKEN }}
144+
145+
- name: Get execution timestamp with RFC3339 format
146+
id: timestamp
147+
run: |
148+
echo "timestamp=$(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_OUTPUT
149+
150+
- name: Create manifest list and pushs
151+
working-directory: /tmp/digests
152+
id: manifest-annotate
153+
continue-on-error: true
154+
run: |
155+
docker buildx imagetools create \
156+
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
157+
--annotation='index:org.opencontainers.image.description=${{ github.event.repository.description }}' \
158+
--annotation='index:org.opencontainers.image.created=${{ steps.timestamp.outputs.timestamp }}' \
159+
--annotation='index:org.opencontainers.image.url=${{ github.event.repository.url }}' \
160+
--annotation='index:org.opencontainers.image.source=${{ github.event.repository.url }}' \
161+
$(printf '${{ env.GHCR_IMAGE }}@sha256:%s ' *)
162+
163+
- name: Create manifest list and push without annotations
164+
if: steps.manifest-annotate.outcome == 'failure'
165+
working-directory: /tmp/digests
166+
run: |
167+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
168+
$(printf '${{ env.GHCR_IMAGE }}@sha256:%s ' *)
169+
170+
- name: Inspect image
171+
id: inspect
172+
run: |
173+
docker buildx imagetools inspect '${{ env.GHCR_IMAGE }}:${{ steps.meta.outputs.version }}'

.gitignore

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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+
# Python
14+
__pycache__/
15+
*.py[cod]
16+
*$py.class
17+
*.so
18+
.Python
19+
build/
20+
develop-eggs/
21+
dist/
22+
downloads/
23+
eggs/
24+
api/logs/
25+
.eggs/
26+
lib/
27+
lib64/
28+
parts/
29+
sdist/
30+
var/
31+
wheels/
32+
*.egg-info/
33+
.installed.cfg
34+
*.egg
35+
*.venv
36+
# testing
37+
/coverage
38+
39+
# next.js
40+
/.next/
41+
/out/
42+
43+
# production
44+
/build
45+
46+
# misc
47+
.DS_Store
48+
*.pem
49+
50+
# debug
51+
npm-debug.log*
52+
yarn-debug.log*
53+
yarn-error.log*
54+
.pnpm-debug.log*
55+
56+
# env files (can opt-in for committing if needed)
57+
.env*
58+
59+
# vercel
60+
.vercel
61+
62+
# typescript
63+
*.tsbuildinfo
64+
next-env.d.ts
65+
66+
.idea/
67+
68+
# ignore adding self-signed certs
69+
certs/

.python-version

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

.vscode/launch.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Deepwiki-Open",
6+
"type": "python",
7+
"request": "launch",
8+
"module": "uvicorn",
9+
"args": [
10+
"api.api:app",
11+
"--reload",
12+
"--port",
13+
"8001"
14+
],
15+
"jinja": true,
16+
"justMyCode": true
17+
}
18+
]
19+
}

0 commit comments

Comments
 (0)