Skip to content

Prajwalkadam29/Legacy-Migration-Engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Legacy Migration Engine

What it does

  • Parse C into AST (pycparser)
  • Store AST in Neo4j
  • Vectorize AST nodes (Ollama embeddings)
  • Provide AST context to LLaMA3.2 (Ollama) to convert code to OOP Python
  • Streamlit UI for upload/paste, visualize AST, download generated code

Prerequisites

  • Python 3.10+
  • Neo4j running locally or remotely (bolt)
  • Ollama installed locally (https://ollama.com)
  • Models pulled to Ollama:
    • ollama pull nomic-embed-text
    • ollama pull llama3.2
  • Groq API (If Ollama is not installed)

🛠️ Setup & Usage

1. Clone Repository

git clone https://github.com/your-username/your-repo.git
cd your-repo

2. Build & Start Containers

docker-compose up --build

This will:

3. Stop Containers

docker-compose down

To also remove volumes (⚠️ deletes all Neo4j data):

docker-compose down -v

📊 Volumes

  1. neo4j_data → Stores Neo4j database files (persistent)
  2. ./outputs → Stores outputs generated by Streamlit app

🐳 Useful Docker Commands

  1. Check running containers:
docker ps
  1. Inspect logs for Streamlit app:
docker logs <app-container-id>
  1. Open interactive shell inside app container:
docker exec -it <app-container-id> bash

🌐 Access

✅ Notes

  1. Replace GROQ_API_KEY with your valid key (in Dockerfile, docker-compose.yml, etc).