This project is composed of three pieces:
- FalkorDB Graph DB - this is where your graphs are stored and queried
- Code-Graph-Backend - backend logic
- Code-Graph-Frontend - website
You'll need to start all three components:
docker run -p 6379:6379 -it --rm falkordb/falkordb
git clone https://github.com/FalkorDB/code-graph-backend.git
SECRET_TOKEN
- user defined token used to authorize the request
export FALKORDB_HOST=localhost FALKORDB_PORT=6379 \
OPENAI_API_KEY=<YOUR OPENAI_API_KEY> SECRET_TOKEN=<YOUR_SECRECT_TOKEN> \
FLASK_RUN_HOST=0.0.0.0 FLASK_RUN_PORT=5000
cd code-graph-backend
pip install --no-cache-dir -r requirements.txt
flask --app api/index.py run --debug > flask.log 2>&1 &
git clone https://github.com/FalkorDB/code-graph.git
export BACKEND_URL=http://${FLASK_RUN_HOST}:${FLASK_RUN_PORT} \
SECRET_TOKEN=<YOUR_SECRECT_TOKEN> OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>
cd code-graph
npm install
npm run dev
curl -X POST http://127.0.0.1:5000/analyze_folder -H "Content-Type: application/json" -d '{"path": "<PATH_TO_LOCAL_REPO>", "ignore": ["./.github", "./sbin", "./.git","./deps", "./bin", "./build"]}' -H "Authorization: <YOUR_SECRECT_TOKEN>"
Note: At the moment code-graph can analyze both the C & Python source files. Support for additional languages e.g. JavaScript, Go, Java is planned to be added in the future.
Browse to http://localhost:3000