Skip to content

Commit e75bd70

Browse files
committed
chrome extension...
1 parent 2d6f2e4 commit e75bd70

File tree

1 file changed

+53
-1
lines changed

1 file changed

+53
-1
lines changed

showcase/code-analysis/knowledge.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,58 @@ A minimal Python CLI application template with modern Python features and type h
1212
## Verifying changes
1313
After every change, run:
1414
```bash
15-
mypy cli && black --check cli
15+
mypy cli app && black --check cli app
1616
```
1717
This will check for type errors and formatting issues.
18+
19+
## Project Structure
20+
- `cli/`: Command-line interface for git analysis
21+
- `app/`: FastAPI web service for git analysis
22+
- `extension/`: Chrome extension for GitHub integration
23+
24+
## Chrome Extension
25+
The extension activates on GitHub repository pages and provides:
26+
- Analysis popup accessible via toolbar icon
27+
- Direct integration with local FastAPI server
28+
- JSON visualization of repository metrics
29+
30+
### Architecture Constraints
31+
Git analysis requires a backend service because:
32+
- GitPython needs filesystem access
33+
- Git operations require system-level access
34+
- Cannot run Python directly in extension
35+
36+
### Alternative Approaches Investigated
37+
Client-side options have limitations:
38+
- Pyodide (WASM Python): No filesystem/git access
39+
- WebContainer API: Limited browser support, sandboxed
40+
- Requires 'wasm-unsafe-eval' in CSP
41+
- Must load from CDN or package
42+
- Resets on popup close
43+
- isomorphic-git: Requires fetching full repo data first
44+
45+
## Project Structure
46+
- `cli/`: Command-line interface for git analysis
47+
- `app/`: FastAPI web service for git analysis
48+
- `extension/`: Chrome extension for GitHub integration
49+
50+
## Chrome Extension
51+
The extension activates on GitHub repository pages and provides:
52+
- Analysis popup accessible via toolbar icon
53+
- Direct integration with local FastAPI server
54+
- JSON visualization of repository metrics
55+
56+
### Architecture Constraints
57+
Git analysis requires a backend service because:
58+
- GitPython needs filesystem access
59+
- Git operations require system-level access
60+
- Cannot run Python directly in extension
61+
62+
### Alternative Approaches Investigated
63+
Client-side options have limitations:
64+
- Pyodide (WASM Python): No filesystem/git access
65+
- WebContainer API: Limited browser support, sandboxed
66+
- Requires 'wasm-unsafe-eval' in CSP
67+
- Must load from CDN or package
68+
- Resets on popup close
69+
- isomorphic-git: Requires fetching full repo data first

0 commit comments

Comments
 (0)