AI-Powered Repository Intelligence & Architecture Visualization Platform
gitSdm transforms how developers understand unfamiliar codebases. Instead of spending hours reading through files and tracing dependencies, gitSdm provides instant, interactive architecture visualization powered by AI.
"The kind of deep insight that normally takes days of reading code β delivered in seconds."
| Problem | Solution |
|---|---|
| π Hours spent onboarding to new repos | β‘ Instant architecture overview |
| π Manual dependency tracing | πΈοΈ Interactive dependency graph |
| π Scattered documentation | π€ AI-generated code explanations |
| π§© Unclear module boundaries | π― Visual file classification |
gitSdm/
βββ π api/ # Vercel serverless functions
β βββ ai/ # AI endpoints (architecture, explain, suggest)
β βββ repo/ # Repository data endpoints
β βββ trending.ts # Trending repositories
βββ π server/ # Backend services
β βββ ai/ # AI provider & prompt management
β βββ cache/ # LRU caching layer
β βββ github/ # GitHub API integration
β βββ graph/ # Graph building & layout algorithms
β βββ parser/ # Dependency & file analysis
β βββ services/ # Business logic layer
β βββ utils/ # HTTP, logging utilities
βββ π src/ # Frontend application
β βββ app/ # App providers & routing
β βββ components/ # UI components
β β βββ contributors/ # Contributor analytics
β β βββ explorer/ # File explorer & code inspector
β β βββ home/ # Landing page components
β β βββ layout/ # Navigation & layout
β β βββ theme/ # Theme synchronization
β β βββ timeline/ # Repository timeline
β β βββ ui/ # Reusable UI primitives
β β βββ viz/ # Visualization components
β βββ features/ # Feature modules
β β βββ ai/ # AI integration hooks
β β βββ graph/ # Graph rendering engine
β βββ hooks/ # Custom React hooks
β βββ lib/ # Utilities & API client
β βββ pages/ # Route pages
β βββ stores/ # State management
β βββ styles/ # Global styles
β βββ types/ # TypeScript definitions
βββ π public/ # Static assets
βββ π assets/ # Screenshots & media
βββ π .agents/ # AI agent configurations
- Node.js β₯ 22 (Alpine)
- pnpm β₯ 9 (recommended) or npm/yarn
- GitHub Personal Access Token (for API access)
# Clone the repository
git clone https://github.com/bayue48/gitSdm.git
cd gitSdm
# Install dependencies
pnpm install
# Copy environment variables
cp .env.example .env| Variable | Description |
|---|---|
GITHUB_TOKEN |
Optional. Increases GitHub API rate limits for public repos |
AI_PROVIDER |
mock (default), gemini,openai, or anthropic |
OPENAI_API_KEY |
Required when AI_PROVIDER=openai |
ANTHROPIC_API_KEY |
Required when AI_PROVIDER=anthropic |
GEMINI_API_KEY |
Required when AI_PROVIDER=gemini |
GEMINI_MODEL |
Optional when AI_PROVIDER=gemini; defaults to gemini-1.5-flash |
GEMINI_API_VERSION |
Optional when AI_PROVIDER=gemini; defaults to v1alpha |
OPENAI_MODEL |
Optional when AI_PROVIDER=openai; defaults to gpt-4o-mini |
ANTHROPIC_MODEL |
Optional when AI_PROVIDER=anthropic; defaults to claude-3-5-haiku-latest |
# Start development server (frontend + backend)
pnpm dev
# Or run separately:
pnpm dev:frontend # Vite dev server on :5173
pnpm dev:backend # Express dev server on :3001# Build for production
pnpm build
# Preview production build
pnpm previewThe Docker image builds the Vite app, bundles a small Node server, serves static files from dist/, and handles /api/* using the same API router as development/Vercel.
# Build Docker image
docker build -t gitsdm .
# Run container
docker run -p 3000:3000 --env-file .env gitsdmFor minimal setup, GITHUB_TOKEN is optional but recommended. AI features use AI_PROVIDER=mock by default; set the matching API key when using gemini, openai, or anthropic.
# Deploy directly from source
gcloud run deploy gitsdm \
--source . \
--region asia-southeast1 \
--allow-unauthenticated \
--env-vars-file .env- Instant parsing of any public GitHub repository
- Dependency graph generation with
d3-forceanddagrelayout algorithms - File classification by type (component, utility, config, etc.)
- Module boundary detection for architectural insights
- Architecture summaries via Google Gemini, OpenAI, or Anthropic Claude
- Code explanations for specific files and modules in
StandardandELI5 (Explain It Like I'm 5)modes - Smart file suggestions based on context
- Learning paths for onboarding to new codebases
- Force-directed graphs with
@xyflow/react(React Flow) - Real-time filtering by file type, module, or dependency
- Branch comparison with visual diff
- Mermaid diagram export for documentation
- Contributor analytics with
rechartsvisualizations - Commit timeline and activity patterns
- Trending repositories discovery
- File explorer with syntax highlighting via
highlight.js
| Technology | Purpose |
|---|---|
| React 19 | UI framework |
| TypeScript 5.8 | Type safety |
| Vite 6 | Build tooling |
| @xyflow/react 12 | Graph visualization |
| Framer Motion 12 | Animations |
| TanStack React Query 5 | Data fetching |
| Tailwind CSS 3.4 | Styling |
| Recharts 2 | Charts & analytics |
| Mermaid 11 | Diagram generation |
| Lucide React | Icon library |
| Technology | Purpose |
|---|---|
| Node.js 22 | Runtime |
| Express (via Vercel) | API server |
| Octokit 21 | GitHub API client |
| LRU Cache 11 | Response caching |
| Google GenAI 2.6 | AI provider |
| OpenAI 4 | AI provider |
| Anthropic SDK 0.39 | AI provider |
| Technology | Purpose |
|---|---|
| Google Cloud Run | Deployment platform |
| Docker | Containerization |
| pnpm | Package management |
| Vitest | Testing framework |
| ESLint 9 | Code quality |
Enter a GitHub URL β gitSdm fetches & parses β Interactive graph appears
Click nodes β View file contents β Trace dependencies β Understand modules
Select "Explain Architecture" β AI analyzes structure β Natural language summary
Select branches β Visual diff β See architectural changes
# Run all tests
pnpm test
# Run with coverage
pnpm test:coverage
# Watch mode
pnpm test:watchTest files are co-located with source files:
server/parser/manifest-parsers/index.test.tsserver/github/parse-url.test.tsserver/graph/graph-builder.test.tsserver/graph/layout.test.tsserver/parser/dependency-analyzer.test.tsserver/parser/file-classifier.test.ts
- AI-generated architecture diagrams
- Commit History
- Private repository support
- Export to PDF / PNG
- Monorepo-aware dependency grouping
We welcome contributions! See our contributing guidelines for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Improve graph rendering performance
- Add new AI providers
- Improve parser accuracy
- Create better onboarding flows
- Enhance repository analytics
- API keys are never exposed to the client
- Environment variables are securely handled
- Rate limiting prevents abuse
- GitHub API access follows OAuth best practices
If you discover a vulnerability, please open a private security report.
This project is licensed under the MIT License.
See the LICENSE file for more information.
