Skip to content

Commit 11d72c3

Browse files
authored
Merge branch 'staging' into dependabot/npm_and_yarn/staging/types/node-22.13.14
2 parents 745db11 + c2d6c10 commit 11d72c3

File tree

3 files changed

+106
-69
lines changed

3 files changed

+106
-69
lines changed

README.md

Lines changed: 58 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,113 @@
1+
# CodeGraph - Knowledge Graph Visualization Tool
2+
3+
### Visualize your repository with our graph for code analysis
4+
15
[![Try Free](https://img.shields.io/badge/Try%20Free-FalkorDB%20Cloud-FF8101?labelColor=FDE900&link=https://app.falkordb.cloud)](https://app.falkordb.cloud)
26
[![Dockerhub](https://img.shields.io/docker/pulls/falkordb/falkordb?label=Docker)](https://hub.docker.com/r/falkordb/falkordb/)
37
[![Discord](https://img.shields.io/discord/1146782921294884966?style=flat-square)](https://discord.com/invite/6M4QwDXn2w)
48
[![Workflow](https://github.com/FalkorDB/code-graph/actions/workflows/nextjs.yml/badge.svg?branch=main)](https://github.com/FalkorDB/code-graph/actions/workflows/nextjs.yml)
9+
-
10+
11+
![Alt Text](https://res.cloudinary.com/dhd0k02an/image/upload/v1739719361/FalkorDB_-_Github_-_readme_jr6scy.gif)
512

6-
![image](https://github.com/FalkorDB/code-graph/assets/753206/60f535ed-cf29-44b2-9005-721f11614803)
13+
**👉🏻[Live Demo](https://code-graph.falkordb.com/)**
714

8-
## Getting Started
9-
[Live Demo](https://code-graph.falkordb.com/)
15+
## Running Locally
1016

11-
## Run locally
12-
This project is composed of three pieces:
17+
This project consists of three core components:
1318

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
19+
1. **FalkorDB Graph DB** – Stores and queries your graphs.
20+
2. **Code-Graph-Backend** – Handles backend logic.
21+
3. **Code-Graph-Frontend** – Provides the web interface.
1722

18-
You'll need to start all three components:
23+
To set up the project, you’ll need to start all three components.
1924

20-
### Run FalkorDB
25+
### 1. Start FalkorDB
26+
27+
Run the following command to start FalkorDB using Docker:
2128

2229
```bash
2330
docker run -p 6379:6379 -it --rm falkordb/falkordb
2431
```
2532

26-
### Run Code-Graph-Backend
33+
### 2. Start the Backend
2734

28-
#### Clone the Backend
35+
#### Clone the Backend Repository
2936

3037
```bash
3138
git clone https://github.com/FalkorDB/code-graph-backend.git
39+
cd code-graph-backend
3240
```
3341

34-
#### Setup environment variables
42+
#### Set Up Environment Variables
3543

36-
`SECRET_TOKEN` - user defined token used to authorize the request
44+
Define the required environment variables:
3745

3846
```bash
3947
export FALKORDB_HOST=localhost FALKORDB_PORT=6379 \
40-
OPENAI_API_KEY=<YOUR OPENAI_API_KEY> SECRET_TOKEN=<YOUR_SECRECT_TOKEN> \
48+
OPENAI_API_KEY=<YOUR_OPENAI_API_KEY> SECRET_TOKEN=<YOUR_SECRET_TOKEN> \
4149
FLASK_RUN_HOST=0.0.0.0 FLASK_RUN_PORT=5000
4250
```
4351

44-
#### Install dependencies & run
52+
`SECRET_TOKEN` is a user-defined token used for request authorization.
4553

46-
```bash
47-
cd code-graph-backend
54+
#### Install Dependencies & Start the Backend
4855

56+
```bash
4957
pip install --no-cache-dir -r requirements.txt
50-
5158
flask --app api/index.py run --debug > flask.log 2>&1 &
52-
5359
```
5460

55-
### Run Code-Graph-Frontend
61+
### 3. Start the Frontend
5662

57-
#### Clone the Frontend
63+
#### Clone the Frontend Repository
5864

5965
```bash
6066
git clone https://github.com/FalkorDB/code-graph.git
67+
cd code-graph
6168
```
6269

63-
#### Setup environment variables
70+
#### Set Up Environment Variables
6471

6572
```bash
6673
export BACKEND_URL=http://${FLASK_RUN_HOST}:${FLASK_RUN_PORT} \
67-
SECRET_TOKEN=<YOUR_SECRECT_TOKEN> OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>
74+
SECRET_TOKEN=<YOUR_SECRET_TOKEN> OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>
6875
```
6976

70-
#### Install dependencies & run
77+
#### Install Dependencies & Start the Frontend
7178

7279
```bash
73-
cd code-graph
7480
npm install
7581
npm run dev
7682
```
7783

78-
### Process a local repository
84+
### 4. Process a Local Repository
85+
86+
Use the following `curl` command to analyze a local repository:
87+
7988
```bash
80-
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>"
89+
curl -X POST http://127.0.0.1:5000/analyze_folder \
90+
-H "Content-Type: application/json" \
91+
-H "Authorization: <YOUR_SECRET_TOKEN>" \
92+
-d '{"path": "<PATH_TO_LOCAL_REPO>", "ignore": ["./.github", "./sbin", "./.git", "./deps", "./bin", "./build"]}'
8193
```
8294

83-
Note: At the moment code-graph can analyze both the C & Python source files.
84-
Support for additional languages e.g. JavaScript, Go, Java is planned to be added
85-
in the future.
95+
**Note:** Currently, Code-Graph supports analyzing C and Python source files.
96+
Support for additional languages (e.g., JavaScript, Go, Java) is planned.
97+
98+
### 5. Access the Web Interface
99+
100+
Once everything is running, open your browser and go to:
101+
102+
[http://localhost:3000](http://localhost:3000)
103+
104+
## Community
105+
106+
Have questions or feedback? Reach out via:
107+
108+
* [GitHub Issues](https://github.com/FalkorDB/GraphRAG-SDK/issues)
109+
* Join our [Discord](https://discord.com/invite/6M4QwDXn2w)
110+
111+
⭐️ If you find this repository helpful, please consider giving it a star!
86112

87-
Browse to [http://localhost:3000](http://localhost:3000)
113+
Knowledge Graph, Code Analysis, Code Visualization, Dead Code Analysis, Graph Database

package-lock.json

Lines changed: 46 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@radix-ui/react-toast": "^1.2.6",
2020
"@radix-ui/react-tooltip": "^1.1.8",
2121
"@types/react-gtm-module": "^2.0.4",
22-
"autoprefixer": "^10.4.20",
22+
"autoprefixer": "^10.4.21",
2323
"canvas2svg": "^1.0.16",
2424
"class-variance-authority": "^0.7.1",
2525
"clsx": "^2.1.1",
@@ -48,7 +48,7 @@
4848
"@types/react-dom": "^18.3.5",
4949
"@types/react-syntax-highlighter": "^15.5.13",
5050
"eslint": "^9.20.1",
51-
"eslint-config-next": "^15.1.7",
51+
"eslint-config-next": "^15.2.4",
5252
"tailwindcss": "^3.4.17",
5353
"typescript": "^5.7.3"
5454
}

0 commit comments

Comments
 (0)