Skip to content

Commit 58eb3b5

Browse files
committed
updated readme with setup instructions
1 parent 63ba49e commit 58eb3b5

File tree

1 file changed

+54
-6
lines changed

1 file changed

+54
-6
lines changed

README.md

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,76 @@
88
## Getting Started
99
[Live Demo](https://code-graph.falkordb.com/)
1010

11+
## Run locally
12+
This project is composed of three pieces:
13+
14+
1. FalkorDB Graph DB - this is where your graphs are stored and queried
15+
2. Code-Graph-Backend - backend logic
16+
3. Code-Graph-Frontend - website
17+
18+
You'll need to start all three components:
19+
1120
### Run FalkorDB
1221

1322
```bash
1423
docker run -p 6379:6379 -it --rm falkordb/falkordb
1524
```
1625

17-
### Install node packages
26+
### Run Code-Graph-Backend
27+
28+
#### Clone the Backend
1829

1930
```bash
20-
npm install
31+
git clone https://github.com/FalkorDB/code-graph-backend.git
2132
```
2233

23-
### Set your OpenAI key
34+
#### Setup environment variables
2435

36+
```bash
37+
export FALKORDB_HOST=falkordb FALKORDB_PORT=6379 \
38+
OPENAI_API_KEY=<YOUR OPENAI_API_KEY> SECRET_TOKEN=Vespa \
39+
FLASK_RUN_HOST=0.0.0.0 FLASK_RUN_PORT=5000
2540
```
26-
export OPENAI_API_KEY=YOUR_OPENAI_API_KEY
41+
42+
#### Install dependencies & run
43+
44+
```bash
45+
cd code-graph-backend
46+
47+
pip install --no-cache-dir -r requirements.txt
48+
49+
flask --app api/index.py run --debug
2750
```
2851

29-
### Run the development server
52+
### Run Code-Graph-Frontend
53+
54+
#### Clone the Frontend
3055

3156
```bash
57+
git clone https://github.com/FalkorDB/code-graph.git
58+
```
59+
60+
#### Setup environment variables
61+
62+
```bash
63+
export BACKEND_URL=http://localhost:5000 SECRET_TOKEN=Vespa OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>
64+
```
65+
66+
#### Install dependencies & run
67+
68+
```bash
69+
cd code-graph
70+
npm install
3271
npm run dev
3372
```
3473

35-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
74+
### Process a local repository
75+
```bash
76+
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: Vespa"
77+
```
78+
79+
Note: At the moment code-graph can analyze both the C & Python source files.
80+
Support for additional languages e.g. JavaScript, Go, Java is planned to be added
81+
in the future.
82+
83+
Browse to [http://localhost:3000](http://localhost:3000)

0 commit comments

Comments
 (0)