{"id":50711202,"url":"https://github.com/iamsr/devlok","last_synced_at":"2026-06-09T15:30:39.111Z","repository":{"id":358716564,"uuid":"924007475","full_name":"iamsr/devlok","owner":"iamsr","description":"tool designed to help you deeply understand your codebase. ","archived":false,"fork":false,"pushed_at":"2026-03-10T07:21:52.000Z","size":2062,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-18T20:37:27.048Z","etag":null,"topics":["ast","chromadb","electron","fastapi","langchain","react"],"latest_commit_sha":null,"homepage":"https://devlok.devss.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamsr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"docs/roadmap.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-29T08:44:57.000Z","updated_at":"2026-03-10T07:21:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/iamsr/devlok","commit_stats":null,"previous_names":["iamsr/devlok"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/iamsr/devlok","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamsr%2Fdevlok","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamsr%2Fdevlok/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamsr%2Fdevlok/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamsr%2Fdevlok/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamsr","download_url":"https://codeload.github.com/iamsr/devlok/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamsr%2Fdevlok/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34114426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","chromadb","electron","fastapi","langchain","react"],"created_at":"2026-06-09T15:30:38.073Z","updated_at":"2026-06-09T15:30:39.103Z","avatar_url":"https://github.com/iamsr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DevLok - Your AI Codebase Explainer\n\nDevLok is an AI-powered developer tool designed to help you deeply understand your codebase. It combines a modern interface with a powerful local Python backend capable of leveraging Large Language Models (LLMs) to analyze, explain, and visualize your project's architecture and logic.\n\n## 🚀 Key Features\n\n- **Deep Codebase Understanding**: Uses Tree-sitter and LangChain to parse and semantically index your entire project.\n- **AI-Powered Explanations**: Ask questions about your code, data flow, or architecture and get context-aware answers from local LLMs (via Ollama).\n- **Interactive Visualizations**: Visualize dependencies, call graphs, and module structures to grasp complex systems quickly.\n- **Local-First Privacy**: All analysis and AI processing happens locally on your machine, ensuring your code never leaves your environment.\n\n## 🛠 Tech Stack\n\n### Frontend (Client)\n\n- **Framework**: [Electron](https://www.electronjs.org/) with [React](https://react.dev/) \u0026 [TypeScript](https://www.typescriptlang.org/)\n- **Visualization**: [React Flow](https://reactflow.dev/) / [D3.js](https://d3js.org/) (Planned)\n- **Styling**: [Tailwind CSS](https://tailwindcss.com/)\n- **State Management**: [Zustand](https://github.com/pmndrs/zustand)\n- **Code Viewer**: [Monaco Editor](https://microsoft.github.io/monaco-editor/) (Read-only mode)\n\n### Backend (Server)\n\n- **Framework**: [FastAPI](https://fastapi.tiangolo.com/)\n- **Language**: Python 3.12+\n- **AI/ML**: [LangChain](https://www.langchain.com/), [Ollama](https://ollama.com/), [ChromaDB](https://www.trychroma.com/)\n- **Analysis**: [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) for parsing\n\n## 📦 Prerequisites\n\nBefore getting started, ensure you have the following installed:\n\n- **Node.js**: v18 or later ([Download](https://nodejs.org/))\n- **pnpm**: Package manager for Node.js (`npm install -g pnpm`)\n- **Python**: 3.12 (not 3.13+) ([Download](https://www.python.org/downloads/))\n- **Poetry**: Python dependency manager (`pip install poetry` or see [docs](https://python-poetry.org/docs/#installation))\n- **Ollama**: For running local LLMs ([Download](https://ollama.com/download))\n- **Make**: Build automation tool (usually pre-installed on macOS/Linux)\n\n## 🏁 Getting Started\n\n### Quick Start with Makefile\n\nThe easiest way to get started is using the provided Makefile:\n\n```bash\n# Clone the repository\ngit clone https://github.com/yourusername/devlok.git\ncd devlok\n\n# Install all dependencies (backend + frontend)\nmake install\n\n# Start both backend and frontend in development mode\nmake dev\n```\n\nThat's it! The application should now be running.\n\n### Manual Setup\n\nIf you prefer to set up manually or want more control:\n\n#### 1. Clone the repository\n\n```bash\ngit clone https://github.com/yourusername/devlok.git\ncd devlok\n```\n\n#### 2. Backend Setup\n\nNavigate to the backend directory and install dependencies:\n\n```bash\ncd apps/backend\npoetry install\n```\n\nStart the backend server:\n\n```bash\npoetry run dev\n```\n\nThe backend API will be available at `http://localhost:4000`\n\n#### 3. Frontend Setup\n\nIn a new terminal, navigate to the client directory and install dependencies:\n\n```bash\ncd apps/client\npnpm install\n```\n\nStart the Electron application:\n\n```bash\npnpm dev\n```\n\nThe Electron app will launch automatically.\n\n#### 4. Ollama Setup\n\nMake sure Ollama is running with a model installed:\n\n```bash\n# Pull a recommended model (e.g., llama2)\nollama pull llama2\n\n# Or use a larger model for better results\nollama pull codellama\n```\n\n## 🔧 Available Make Commands\n\nHere are all available commands in the Makefile:\n\n### Installation \u0026 Setup\n- `make install` - Install all dependencies (backend + frontend)\n- `make install-backend` - Install only backend dependencies\n- `make install-frontend` - Install only frontend dependencies\n- `make setup-ollama` - Pull recommended Ollama model (llama2)\n\n### Development\n- `make dev` - Start both backend and frontend in development mode\n- `make dev-backend` - Start only the backend server\n- `make dev-frontend` - Start only the Electron app\n- `make dev-parallel` - Start both services in parallel (requires `parallel` or `concurrently`)\n\n### Building\n- `make build` - Build the Electron application\n- `make build-mac` - Build for macOS\n- `make build-win` - Build for Windows\n- `make build-linux` - Build for Linux\n\n### Code Quality\n- `make lint` - Run linter on frontend code\n- `make format` - Format frontend code with Prettier\n- `make typecheck` - Run TypeScript type checking\n\n### Testing\n- `make test-backend` - Run backend tests\n\n### Cleaning\n- `make clean` - Remove all dependencies and build artifacts\n- `make clean-backend` - Clean only backend dependencies\n- `make clean-frontend` - Clean only frontend dependencies\n\n### Utilities\n- `make help` - Display all available commands\n\n## 📝 Development Workflow\n\n### Starting Development\n\n```bash\n# Terminal 1: Start backend\nmake dev-backend\n\n# Terminal 2: Start frontend\nmake dev-frontend\n```\n\nOr use a single command:\n\n```bash\nmake dev\n```\n\n### Making Changes\n\n1. **Frontend changes**: Hot reload is enabled, changes will reflect automatically\n2. **Backend changes**: The server will auto-reload on file changes\n\n### Building for Production\n\n```bash\n# Build for your current platform\nmake build\n\n# Or build for a specific platform\nmake build-mac    # macOS\nmake build-win    # Windows\nmake build-linux  # Linux\n```\n\n## 🐛 Troubleshooting\n\n### Electron fails to start\n\nIf you see an error like \"Electron failed to install correctly\", run:\n\n```bash\nmake fix-electron\n```\n\nThis happens because pnpm's build script restrictions. The fix-electron command manually runs the installation scripts that were blocked.\n\n### Backend server won't start\n\nMake sure you've run:\n\n```bash\nmake install-backend\n```\n\nAnd verify Ollama is running:\n\n```bash\nollama list\n```\n\n### Port already in use\n\nIf port 4000 or 5173 is already in use, stop the conflicting service or modify the port in the respective configuration files:\n- Backend: `apps/backend/main.py`\n- Frontend: `apps/client/electron.vite.config.ts`\n\n## 📂 Project Structure\n\n```\ndevlok/\n├── apps/\n│   ├── client/          # UI for visualization and chat\n│   └── backend/         # Analysis engine and AI server\n├── docs/                # Documentation\n└── ...\n```\n\n## 🤝 Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## 📄 License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamsr%2Fdevlok","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamsr%2Fdevlok","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamsr%2Fdevlok/lists"}