An open API service indexing awesome lists of open source software.

https://github.com/eastend-street/neo4j-nextjs-practice

This is a sample Next.js project used to test Neo4j integration.
https://github.com/eastend-street/neo4j-nextjs-practice

neo4j nextjs

Last synced: about 1 month ago
JSON representation

This is a sample Next.js project used to test Neo4j integration.

Awesome Lists containing this project

README

        

# Sample Next.js Project to Test Neo4j Integration

This is a sample Next.js project used to test Neo4j integration.

By leveraging Neo4j, we can represent the codebase as a graph.

# ✅ Prerequisites
You have downloaded neo4j and you have run a neo4j database locally.

https://neo4j.com/download/

# 🚀 Getting Started
Start the development server:

```bash
npm run dev
```

You’ll see a simple recipe app in your browser.

Note: This app was auto-generated by Cursor and serves only as a sample project for testing Neo4j integration.

Recipe App Screenshot

image

# 🧠 How to Generate the Codebase Graph
Run graph.js to insert file dependency data into your local Neo4j database and generate a JSON file (code-graph.json) representing the code structure.

Before running, update the password in graph.js to match your local Neo4j database credentials.

```bash
node graph.js
```

image

# 📊 How to View the Graph
To visualize the graph in the Neo4j browser, run the following Cypher query on your Neo4j browser:

```cypher
MATCH (a:Component)-[:IMPORTS]->(b:Component)
RETURN a, b
```

Graph in Neo4j Browser

You can also inspect the graph data in JSON format (code-graph.json):

Graph JSON Output

# ✍️ Author
https://github.com/eastend-street