Interactive Code Property Graph Explorer built with Next.js and Express.
- Docker
- Docker Compose
docker-compose up --buildWait for containers to start, then open:
- Frontend: http://localhost:3000
- Backend API: http://localhost:4000
docker-compose down- Node.js 20+
- npm
cd backend
npm install
npm run dev # Runs on http://localhost:4000cd frontend
npm install
npm run dev # Runs on http://localhost:3000# Build images
docker-compose build
# Start containers (detached)
docker-compose up -d
# Stop containers
docker-compose down
# Rebuild and restart
docker-compose up --build
cpg-fullstack/
├── backend/ # Express API server
│ ├── src/
│ │ ├── lib/ # Database connection
│ │ ├── services/ # Business logic
│ │ ├── routes/ # API endpoints
│ │ ├── types/ # TypeScript types
│ │ └── server.ts # Entry point
│ ├── Dockerfile
│ └── package.json
├── frontend/ # Next.js web app
│ ├── src/
│ │ ├── app/ # Pages and components
│ │ ├── lib/ # Utilities
│ │ └── types/ # TypeScript types
│ │ └── components/
│ │ └── hooks/
│ │ └── contexts/
│ ├── Dockerfile
│ └── package.json
├── docker-compose.yml # Docker orchestration
├── data/ # SQLite database
└── README.md
- Framework: Express.js
- Language: TypeScript
- Database: SQLite (better-sqlite3)
- Runtime: Node.js 20
- Framework: Next.js 16
- Language: TypeScript
- Styling: Tailwind CSS
- Graph Viz: Cytoscape.js
- Code Highlight: Prism.js
SQLite database (~1000 MB) containing:
- 515,000+ nodes
- 1,500,000+ edges
- Prometheus codebase CPG
GET /api/functions- Search functionsPOST /api/graph- Get call graphGET /api/source- Get source codeGET /api/stats- Get statistics
- ✅ Interactive call graph visualization
- ✅ Function search with autocomplete
- ✅ Source code viewer with syntax highlighting
- ✅ Navigation history (back/forward)
- ✅ Auto-zoom for large graphs
- ✅ Responsive design
- ✅ Docker deployment