@arch-atlas/server
v0.1.8
Published
Fastify server for arch-atlas explorer
Readme
@arch-atlas/server
Local Fastify server and bundled web UI for Arch Atlas.
Version: 0.1.8 (depends on @arch-atlas/[email protected])
Most users should install the CLI:
npm install -D arch-atlas
npx arch-atlasUse this package when you want to start the explorer from your own Node process (custom ports, embedding, etc.).
Install
npm install @arch-atlas/serverRequires Node.js >= 18. The published package includes a built copy of the web UI under dist/web.
Quick start
import { startServer } from '@arch-atlas/server';
const server = await startServer({
projectRoot: '/path/to/project',
port: 4578,
openBrowser: true,
watch: true,
});
console.log(server.url);
console.log(server.graph.stats);
// later
await server.close();Options
| Option | Default | Description |
|--------|---------|-------------|
| projectRoot | required | Absolute or relative project path |
| port | 4578 | HTTP port |
| pull | — | Optional file/folder to pull into a focused graph |
| openBrowser | true | Open the explorer in the default browser |
| watch | true | Chokidar live rescans |
| webDistPath | bundled dist/web | Override UI static root (useful in monorepo dev) |
Instance
| Property / method | Description |
|-------------------|-------------|
| url | Local explorer URL |
| port | Bound port |
| graph | Latest ArchitectureGraph |
| rescan() | Force a full rescan |
| close() | Stop watcher + HTTP server |
HTTP API (v0.1.8)
| Endpoint | Description |
|----------|-------------|
| GET /api/health | Status + project path |
| GET /api/graph | Full graph (includes deadCode, packageBoundaries, …) |
| GET /api/file/* | File detail |
| GET /api/package/:name | npm package usage |
| GET /api/dependencies/* | Forward dependency tree (?depth=3) |
| GET /api/impact/* | Reverse impact tree (?depth=3) |
| GET /api/boundaries | Monorepo boundary report |
| GET /api/search?q= | Search index |
| GET /api/dead-code | Unused files with explanations |
| GET /api/circular | Circular dependency cycles |
| POST /api/open | Body { path } — open in local editor |
| POST /api/rescan | Trigger rescan + broadcast |
| WS /ws | { type: 'graph-update' \| 'scanning', … } |
Related packages
arch-atlas— CLI (--scan-only, CI flags, etc.)@arch-atlas/core— scanner / graph engine
License
MIT
