You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To include development dependencies (pytest, etc.):
88
68
89
-
# Or use the CLI directly
90
-
ohm system health
69
+
```bash
70
+
uv sync --extra dev
91
71
```
92
72
93
-
### Helpful Docker Commands
73
+
You can also run one-off commands without activating the venv:
94
74
95
75
```bash
96
-
# Run in detached mode (background)
97
-
docker-compose up -d ohm-api
76
+
uv run ohm system health
77
+
uv run pytest tests -m unit
78
+
```
79
+
80
+
### Helpful Docker commands
98
81
99
-
# View logs
100
-
docker-compose logs -f ohm-api
82
+
```bash
83
+
# Start in the background
84
+
docker compose up -d ohm-api
101
85
102
-
# Stop the server
103
-
docker-compose down
86
+
# Tail logs
87
+
docker compose logs -f ohm-api
88
+
89
+
# Rebuild after Python source changes
90
+
docker compose up --build ohm-api
91
+
92
+
# Stop everything
93
+
docker compose down
104
94
```
105
95
106
96
### Reference demo frontend (optional)
107
97
108
-
The repository includes a Vite + React reference UI under `frontend/`. Start the OHM API first, then from the **`frontend`** directory run:
98
+
The repository includes a Vite + React reference UI under `frontend/`. It provides a browser-based interface for browsing OKH designs, running matches, and visualising supply-chain solutions.
99
+
100
+
**Step 1 — start the API** (must be running before the frontend is useful):
101
+
102
+
```bash
103
+
docker compose up -d ohm-api
104
+
```
105
+
106
+
**Step 2 — start the frontend dev server** (requires Node.js ≥ 18):
109
107
110
108
```bash
111
109
cd frontend
112
-
npm install # first time only
110
+
npm install # first time only — installs JS dependencies
113
111
npm run dev
114
112
```
115
113
116
-
Open the URL Vite prints (typically `http://localhost:5173`). The dev server proxies `/v1` to the API; set `OHM_API_BASE_URL` in `frontend/.env` if your API is not at `http://localhost:8001` (see `frontend/.env.example`).
114
+
Open the URL Vite prints (typically `http://localhost:5173`).
115
+
116
+
The dev server proxies all `/v1` requests to the OHM API. If your API is not at the default `http://localhost:8001`, copy `frontend/.env.example` to `frontend/.env` and set `OHM_API_BASE_URL` accordingly.
117
+
118
+
> **Hot-reload:** The frontend picks up TypeScript/CSS changes automatically while `npm run dev` is running. Python backend changes require rebuilding and restarting the Docker container (`docker compose up --build ohm-api`).
117
119
118
120
## Documentation
119
121
120
122
This README provides a quick start guide and basic project information. For full documentation, run MkDocs locally.
121
123
122
124
### Building Documentation Locally
123
125
124
-
The OHM documentation is built using [MkDocs](https://www.mkdocs.org/), a simple static site generator for project documentation.
125
-
126
-
To build and view the documentation locally:
126
+
The OHM documentation is built using [MkDocs](https://www.mkdocs.org/).
127
127
128
-
1. Ensure your conda environment is active:
129
128
```bash
130
-
conda activate supply-graph-ai
131
-
```
129
+
# Install docs dependencies (MkDocs + plugins) into the project venv
0 commit comments