A local, containerized web application that uses a Large Language Model (LLM) to refactor, document, or transform code projects. It runs entirely offline using Ollama and a Python FastAPI backend.
- Local by Default: Refactoring runs against your local Ollama model.
- Optional Web Research: If enabled, the app fetches public web snippets to enrich context.
- Stack-Aware Prompting: Loads framework/language context from JSON files in
context/using extension and filename mapping rules. - Zip or Single File Input: Upload either a source code zip or one supported code/config file, and get a refactored zip back.
- Multi-File Aware: Can generate entirely new project structures (e.g., Python to Java ports).
- Hardware Agnostic: Runs on standard Linux servers (CPU) or NVIDIA-equipped workstations (GPU).
- Docker Desktop or Docker Engine
- RAM: 16GB Minimum (for CPU mode)
- GPU (Optional): NVIDIA GPU with 12GB+ VRAM for accelerated processing
Option A: Standard / CPU Mode (Linux Servers) Use the standard compose file. This is best for servers without dedicated GPUs.
docker compose up --build -dOption B: NVIDIA GPU Mode (Local Workstation) Use the GPU-optimized compose file.
docker compose -f docker-compose.gpu.yml up --build -dYou must download the model once after starting the containers. We use qwen2.5-coder:14b for the best balance of logic and speed.
Linux / Mac:
docker exec -it ollama_backend ollama pull qwen2.5-coder:14bWindows (Git Bash):
winpty docker exec -it ollama_backend ollama pull qwen2.5-coder:14b- Open your browser to
http://localhost:8000. - Upload either a
.zipproject archive or one supported source/config file. - Enter instructions (e.g., "Add Typescript interfaces" or "Convert to Java Spring Boot").
- (Optional) Enable Add web research to prompt context.
- (Optional) Provide a custom query and web snippet count (1-10).
- Click Process.
- Wait for processing to finish (logs are available via
docker compose logs -f app) and download the result.
.
├── app.py # FastAPI backend & LLM logic
├── Dockerfile # Python environment build
├── docker-compose.yml # Standard CPU/Universal config
├── docker-compose.gpu.yml # NVIDIA GPU config
├── requirements.txt # Python dependencies
├── context/ # Stack context JSON files + mapper
│ ├── mapper.json # Extension/filename to context-file mapping
│ └── *.json # Detailed stack guidance and docs links
└── templates/
└── index.html # Frontend UI
- Logs: Run
docker compose logs -f appto see what the AI is writing in real-time. - Timeout: The application is configured to wait indefinitely for the LLM. If you experience network timeouts (e.g. Nginx 504 Gateway Time-out), check your reverse proxy settings.
- Memory: If the container crashes on large files, try a smaller model like
qwen2.5-coder:7b.
This repository now includes a workflow at .github/workflows/repo-converter.yml that runs end-to-end conversion in GitHub Actions.
context_repo: HTTPS URL of the source repository to use as conversion context.destination_repo: HTTPS URL of the destination repository that receives converted code.destination_stack: Target technology stack for conversion (for example,Spring Boot,FastAPI,Node.js).github_username: GitHub username used for HTTPS auth (x-access-tokenrecommended for PAT/app tokens).model_name: Ollama model to pull inside the action before conversion (default:qwen2.5-coder:14b).
- Clones the context repo (source).
- Clones the destination repo on
main. - Starts an Ollama service container and waits for health readiness.
- Pulls the selected model in the workflow.
- Runs AI conversion across supported files using
github_action_runner.py. - Clears destination repo content before copy (preserves
.gitand existingREADME.md). - Removes untouched original context/source files so they are not published with converted output.
- Copies converted output into destination repo (source
README.mdis skipped to preserve destinationREADME.md). - Commits and pushes to the destination repo
mainbranch.
OLLAMA_URLis set automatically by the workflow to the local Ollama service endpoint.- Model selection is controlled by the workflow input
model_name. GITHUB_TOKENis used by default for Git authentication.- This workflow starts an
ollama/ollamaservice container and points the converter tohttp://127.0.0.1:11434/api/generateso it behaves like a local install directly inside GitHub Actions. - If either repository is private (or in another org), add:
CONTEXT_REPO_TOKEN(secret): token that can read the context repo.DESTINATION_REPO_TOKEN(secret): token that can read/write the destination repo.
Go to Actions → Repository Converter → Run workflow and provide the required inputs (plus optional github_username if needed).