Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ jobs:
- name: Install dependencies
run: bun install --frozen-lockfile

- name: Validate graph data
run: |
test -d ./data/graph
bun src/index.ts --validate --graph-path ./data/graph

- name: Test
run: bun test

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ WORKDIR /app

ENV NODE_ENV=production
ENV PORT=3000
ENV LINK_GRAPH_PATH=/data/graph
ENV LINK_DATA_DIR=/data

COPY package.json bun.lock bunfig.toml tsconfig.json bun-env.d.ts build.ts ./
COPY --from=build /app/node_modules ./node_modules
COPY src ./src

RUN mkdir -p /data/graph
RUN mkdir -p /data

EXPOSE 3000

Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Link

Link is a local-first Bun + React graph tracker for flexible work-related entities and relationships. Graph data is stored as canonical, Git-friendly JSON files under `./data/graph`; Git is the history, collaboration, backup, and conflict-resolution layer.
Link is a local-first Bun + React graph tracker for flexible work-related entities and relationships. Graph data is stored as canonical, Git-friendly JSON files under `./.data/graph`; Git is the history, collaboration, backup, and conflict-resolution layer.

## Features

Expand All @@ -24,17 +24,17 @@ Open the app at the printed server URL, usually `http://localhost:3000`.
Common checks:

```bash
bun src/index.ts --validate --graph-path ./data/graph
bun src/index.ts --validate
bun test
bun run build
```

## Graph storage

The default graph path is `./data/graph`:
The default graph path is `./.data/graph`:

```text
data/
.data/
graph/
node-types/
person.json
Expand All @@ -54,17 +54,17 @@ Each record is pretty-printed JSON with deterministic top-level key order and a

1. `git pull`.
2. Run Link locally and edit through the UI, HTTP API, or MCP tools.
3. Inspect JSON changes under `data/graph`.
4. `bun src/index.ts --validate --graph-path ./data/graph`.
5. `git add data/graph && git commit`.
3. Inspect JSON changes under `.data/graph`.
4. `bun src/index.ts --validate`.
5. `git add .data/graph && git commit`.
Comment on lines 55 to +59
6. `git pull --rebase` or merge, resolve JSON conflicts, re-run validation, then push.

## Configuration

| Variable | Default | Description |
| --- | --- | --- |
| `PORT` / `LINK_PORT` | `3000` | HTTP server port. `LINK_PORT` wins when both are set. |
| `GRAPH_PATH` / `LINK_GRAPH_PATH` | `./data/graph` | Graph JSON directory. `LINK_GRAPH_PATH` wins when both are set. |
| `LINK_DATA_DIR` | `./.data` | Base data directory. Graph JSON is always stored under the fixed `graph/` subdirectory inside it. |

## HTTP API overview

Expand Down Expand Up @@ -130,7 +130,7 @@ docker build -t link .
Run with graph data mounted:

```bash
docker run --rm -p 3000:3000 -v "$PWD/data/graph:/data/graph" link
docker run --rm -p 3000:3000 -v "$PWD/.data:/data" link
```

Use `LINK_GRAPH_PATH` if you mount the graph somewhere else inside the container.
Use `LINK_DATA_DIR` if you mount the data directory somewhere else inside the container.
8 changes: 0 additions & 8 deletions data/graph/edge-types/alias-of.json

This file was deleted.

8 changes: 0 additions & 8 deletions data/graph/edge-types/depends-on.json

This file was deleted.

8 changes: 0 additions & 8 deletions data/graph/edge-types/knows-about.json

This file was deleted.

8 changes: 0 additions & 8 deletions data/graph/edge-types/member-of.json

This file was deleted.

8 changes: 0 additions & 8 deletions data/graph/edge-types/owns.json

This file was deleted.

8 changes: 0 additions & 8 deletions data/graph/edge-types/related-to.json

This file was deleted.

8 changes: 0 additions & 8 deletions data/graph/edge-types/status-for.json

This file was deleted.

8 changes: 0 additions & 8 deletions data/graph/edge-types/works-on.json

This file was deleted.

8 changes: 0 additions & 8 deletions data/graph/node-types/aka.json

This file was deleted.

8 changes: 0 additions & 8 deletions data/graph/node-types/customer.json

This file was deleted.

13 changes: 0 additions & 13 deletions data/graph/node-types/info.json

This file was deleted.

18 changes: 0 additions & 18 deletions data/graph/node-types/issue.json

This file was deleted.

8 changes: 0 additions & 8 deletions data/graph/node-types/org.json

This file was deleted.

8 changes: 0 additions & 8 deletions data/graph/node-types/other.json

This file was deleted.

13 changes: 0 additions & 13 deletions data/graph/node-types/person.json

This file was deleted.

8 changes: 0 additions & 8 deletions data/graph/node-types/product-group.json

This file was deleted.

8 changes: 0 additions & 8 deletions data/graph/node-types/product.json

This file was deleted.

23 changes: 0 additions & 23 deletions data/graph/node-types/project.json

This file was deleted.

8 changes: 0 additions & 8 deletions data/graph/node-types/team.json

This file was deleted.

8 changes: 0 additions & 8 deletions data/graph/node-types/technology.json

This file was deleted.

Loading