|
| 1 | +```markdown |
| 2 | +# CodePapi AI ⚡ |
| 3 | + |
| 4 | +**CodePapi AI** is a professional, privacy-focused developer utility that brings the power of LLMs to your local workflow. Translate code from any language to another, migrate frameworks, reviews codes, and debug logic—all without your data ever leaving your machine. |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +--- |
| 13 | + |
| 14 | +## 📺 Demo |
| 15 | + |
| 16 | +https://github.com/user-attachments/assets/00000000-0000-0000-0000-000000000000 |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +## ✨ Features |
| 21 | + |
| 22 | +- 🔄 **Smart Translation**: Seamlessly convert code between 10+ languages (Go, Rust, Python, TS, etc., flexible enough to support more languages). |
| 23 | +- 🚀 **Migration Engine**: Expert-level presets for: |
| 24 | + - React Class Components ➡️ Functional Components |
| 25 | + - JavaScript ➡️ TypeScript |
| 26 | + - CSS ➡️ Tailwind CSS |
| 27 | + - React ➡️ Vue |
| 28 | +- 🔍 **Deep Code Review**: AI-driven analysis of performance, security, and best practices. |
| 29 | +- 🐞 **Interactive Bug Fixer**: Side-by-side **Diff View** highlighting exactly what the AI changed to fix your logic. |
| 30 | +- 🔒 **Air-Gapped Privacy**: Powered by `phi3:mini` running locally via **Ollama**. |
| 31 | + |
| 32 | +--- |
| 33 | + |
| 34 | +## 🚀 Quick Start |
| 35 | + |
| 36 | +### 1. Prerequisites |
| 37 | +- [Docker & Docker Compose](https://docs.docker.com/get-docker/) |
| 38 | + |
| 39 | +### 2. Setup & Installation |
| 40 | +```bash |
| 41 | +# Clone the repository |
| 42 | +git clone [https://github.com/yourusername/codepapi-ai.git](https://github.com/yourusername/codepapi-ai.git) |
| 43 | +cd codepapi-ai |
| 44 | + |
| 45 | +# Start the entire stack (AI + Backend + Frontend) |
| 46 | +docker-compose up -d |
| 47 | + |
| 48 | +``` |
| 49 | + |
| 50 | +### 3. Usage |
| 51 | + |
| 52 | +* **Frontend**: Open [http://localhost](https://www.google.com/search?q=http://localhost) |
| 53 | +* **API**: Accessible at [http://localhost:3000](https://www.google.com/search?q=http://localhost:3000) |
| 54 | + |
| 55 | +*Note: The first startup pulls the Phi-3 Mini model (approx 2.3GB). Please ensure you have a stable internet connection.* |
| 56 | + |
| 57 | +--- |
| 58 | + |
| 59 | +## 🛠 Tech Stack |
| 60 | + |
| 61 | +| Component | Technology | |
| 62 | +| --- | --- | |
| 63 | +| **AI Engine** | [Ollama](https://ollama.ai/) (phi3:mini) | |
| 64 | +| **Orchestration** | LangChain.js | |
| 65 | +| **Backend** | NestJS (Node.js) | |
| 66 | +| **Frontend** | React, TailwindCSS, Lucide | |
| 67 | +| **Editor** | Monaco Editor (VS Code Engine) | |
| 68 | +| **Tooling** | Biome (Linting & Formatting) | |
| 69 | + |
| 70 | +--- |
| 71 | + |
| 72 | +## 🤝 Contributing |
| 73 | + |
| 74 | +We use **Biome** for lightning-fast linting and formatting. Please run the following before submitting a Pull Request: |
| 75 | + |
| 76 | +```bash |
| 77 | +# Check and apply fixes |
| 78 | +npx @biomejs/biome check --apply . |
| 79 | + |
| 80 | +``` |
| 81 | + |
| 82 | + **Adding Languages:** To add new programming languages or migration presets used by the UI, see the frontend documentation: `frontend/README.md` (section "Adding More Languages"). Edit `frontend/src/constants/languages.ts` to add entries. |
| 83 | + |
| 84 | +## 📜 License |
| 85 | + |
| 86 | +Distributed under the MIT License. See `LICENSE` for more information. |
| 87 | + |
| 88 | +--- |
| 89 | + |
| 90 | +Created with ❤️ by [Your Name] |
| 91 | + |
| 92 | +``` |
| 93 | + |
| 94 | +--- |
| 95 | + |
| 96 | +### 🔧 Step 4: The Biome Configuration (`biome.json`) |
| 97 | +Run `npx @biomejs/biome init` in your project root. It will create this file. Here is a solid configuration for your project: |
| 98 | + |
| 99 | +```json |
| 100 | +{ |
| 101 | + "$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", |
| 102 | + "organizeImports": { |
| 103 | + "enabled": true |
| 104 | + }, |
| 105 | + "linter": { |
| 106 | + "enabled": true, |
| 107 | + "rules": { |
| 108 | + "recommended": true, |
| 109 | + "complexity": { |
| 110 | + "noForeach": "off" |
| 111 | + } |
| 112 | + } |
| 113 | + }, |
| 114 | + "formatter": { |
| 115 | + "enabled": true, |
| 116 | + "indentStyle": "space", |
| 117 | + "indentWidth": 2, |
| 118 | + "lineWidth": 100 |
| 119 | + } |
| 120 | +} |
| 121 | + |
| 122 | +``` |
0 commit comments