Skip to content

Commit ee80db5

Browse files
authored
Merge pull request #1 from kaust-ark/setup-instructions
Updates to the documentation related to ark's webapp
2 parents a61af3e + 00fe63f commit ee80db5

File tree

3 files changed

+34
-13
lines changed

3 files changed

+34
-13
lines changed

README.md

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -163,24 +163,45 @@ ARK parses the PDF with PyMuPDF + Claude Haiku, pre-fills the wizard, and kicks
163163
| `ark list` | List all projects with status |
164164
| `ark webapp install` | Install web portal service |
165165

166+
---
167+
168+
## Web Portal
169+
170+
ARK includes a web-based portal for managing projects, viewing scores, and steering agents.
171+
172+
### Configuration
173+
174+
The web app is configured via `webapp.env` located in your ARK config directory (default: `.ark/webapp.env` in the project root). This file is created automatically on the first run of `ark webapp`.
175+
176+
#### Authentication & Access
177+
- **SMTP**: Required for "Magic Link" login. Set `SMTP_HOST`, `SMTP_USER`, and `SMTP_PASSWORD`.
178+
- **Restrictions**: Use `ALLOWED_EMAILS` (specific users) or `EMAIL_DOMAINS` (entire organizations) to limit access.
179+
- **Google OAuth**: Optional. Set `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET`.
180+
181+
### Management Commands
182+
183+
| Command | Description |
184+
|:--------|:------------|
185+
| `ark webapp` | Start the app in the foreground (useful for debugging). |
186+
| `ark webapp release` | Tag the current code and deploy to the production worktree. |
187+
| `ark webapp install [--dev]` | Install and start as a `systemd` user service. |
188+
| `ark webapp status` | Show status of the systemd service. |
189+
| `ark webapp restart` | Restart the webapp service. |
190+
| `ark webapp logs [-f]` | View or tail service logs. |
191+
166192
<details>
167-
<summary><strong>Web Portal (dev/prod)</strong></summary>
193+
<summary><strong>Service Details (Prod vs. Dev)</strong></summary>
168194

169195
| | Prod | Dev |
170196
|--|:-----|:----|
171-
| Port | 9527 | 1027 |
172-
| Service | `ark-webapp` | `ark-webapp-dev` |
173-
| Conda env | `ark-prod` | `ark-dev` |
174-
| Code | `~/.ark/prod/` (pinned to git tag) | Current repo (live) |
175-
176-
```bash
177-
ark webapp release # tag + deploy to prod
178-
ark webapp install # start prod (port 9527)
179-
ark webapp install --dev # start dev (port 1027)
180-
```
197+
| **Port** | 9527 | 1027 |
198+
| **Service Name** | `ark-webapp` | `ark-webapp-dev` |
199+
| **Conda Env** | `ark-prod` | `ark-dev` |
200+
| **Code Source** | `~/.ark/prod/` (pinned) | Current repository (live) |
181201

182202
</details>
183203

204+
184205
<details>
185206
<summary><strong>Direct orchestrator invocation</strong></summary>
186207

ark/webapp/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def _write_default_env():
7474
ADMIN_EMAILS=
7575
7676
# Google OAuth (optional). Get credentials at console.cloud.google.com → APIs & Services → Credentials.
77-
# Redirect URI to register: {BASE_URL}/auth/google/callback
77+
# Redirect URI to register: http://{hostname}:9527/auth/google/callback
7878
GOOGLE_CLIENT_ID=
7979
GOOGLE_CLIENT_SECRET=
8080

tests/test_citation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def test_empty(self):
285285
class TestNetworkSearch:
286286
def test_search_and_fetch(self):
287287
from ark.citation import search_papers, fetch_bibtex
288-
papers = search_papers("Attention Is All You Need", max_results=5)
288+
papers = search_papers("Vaswani Attention Is All You Need", max_results=5)
289289
assert len(papers) > 0
290290
# Should find the Vaswani paper
291291
match = [p for p in papers if "attention" in p.title.lower() and p.year == 2017]

0 commit comments

Comments
 (0)