|
| 1 | +# Age Plotter |
| 2 | + |
| 3 | +A modern web UI for querying Neo4j and PostgreSQL AGE graph databases. Built as a lightweight alternative to Neo4j Browser and AGViewer. |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +## Features |
| 8 | + |
| 9 | +- **Monaco Editor** - VS Code's editor with Cypher syntax highlighting |
| 10 | +- **Schema-aware completions** - autocomplete for node labels, relationship types, and properties |
| 11 | +- **Graph visualization** - interactive Cytoscape.js graphs with multiple layout options |
| 12 | +- **Dual view modes** - switch between table and graph views |
| 13 | +- **Query history** - with favorites and draft auto-save |
| 14 | +- **Multi-database support** - Neo4j (Bolt) and PostgreSQL AGE |
| 15 | +- **Session isolation** - each browser session has independent connections |
| 16 | + |
| 17 | +## Requirements |
| 18 | + |
| 19 | +- Python 3.11+ |
| 20 | +- Node.js 18+ |
| 21 | +- [uv](https://github.com/astral-sh/uv) (recommended) or pip |
| 22 | + |
| 23 | +## Quick Start |
| 24 | + |
| 25 | +```bash |
| 26 | +# Install dependencies |
| 27 | +npm install |
| 28 | +npm run build |
| 29 | +uv sync |
| 30 | + |
| 31 | +# Run |
| 32 | +uv run python -m age_plotter |
| 33 | +``` |
| 34 | + |
| 35 | +Open http://localhost:8100 |
| 36 | + |
| 37 | +## Docker |
| 38 | + |
| 39 | +```bash |
| 40 | +# Copy and edit connection config |
| 41 | +cp connections.example.json connections.json |
| 42 | + |
| 43 | +# Run with docker-compose |
| 44 | +docker-compose up |
| 45 | +``` |
| 46 | + |
| 47 | +## Configuration |
| 48 | + |
| 49 | +Environment variables: |
| 50 | + |
| 51 | +| Variable | Default | Description | |
| 52 | +|----------|---------|-------------| |
| 53 | +| `AGE_PLOTTER_HOST` | `127.0.0.1` | Host to bind | |
| 54 | +| `AGE_PLOTTER_PORT` | `8100` | Port to bind | |
| 55 | +| `AGE_PLOTTER_CONNECTIONS` | - | Path to JSON file with preconfigured connections | |
| 56 | + |
| 57 | +### Preconfigured Connections |
| 58 | + |
| 59 | +Create a `connections.json` file (see `connections.example.json`): |
| 60 | + |
| 61 | +```json |
| 62 | +[ |
| 63 | + { |
| 64 | + "name": "Local Neo4j", |
| 65 | + "type": "neo4j", |
| 66 | + "uri": "bolt://localhost:7687", |
| 67 | + "username": "neo4j", |
| 68 | + "password": "password", |
| 69 | + "database": "neo4j" |
| 70 | + }, |
| 71 | + { |
| 72 | + "name": "Local AGE", |
| 73 | + "type": "age", |
| 74 | + "host": "localhost", |
| 75 | + "port": 5432, |
| 76 | + "database": "mydb", |
| 77 | + "username": "postgres", |
| 78 | + "password": "password", |
| 79 | + "graph_name": "my_graph" |
| 80 | + } |
| 81 | +] |
| 82 | +``` |
| 83 | + |
| 84 | +Then: |
| 85 | + |
| 86 | +```bash |
| 87 | +export AGE_PLOTTER_CONNECTIONS=/path/to/connections.json |
| 88 | +uv run python -m age_plotter |
| 89 | +``` |
| 90 | + |
| 91 | +## Development |
| 92 | + |
| 93 | +```bash |
| 94 | +# Watch mode for frontend assets |
| 95 | +npm run watch:css |
| 96 | +npm run watch:js |
| 97 | + |
| 98 | +# Run with auto-reload |
| 99 | +uv run python -m age_plotter --reload |
| 100 | +``` |
| 101 | + |
| 102 | +## License |
| 103 | + |
| 104 | +MIT |
0 commit comments