# Project Manager (Phase 1: Core Skeleton)

Internal webapp tracking projects in `/data/video-pipeline/LXC4103/project/` and any manually-added paths.

## Setup

```bash
cp .env.example .env
# edit .env, generate secrets:
echo "PM_SESSION_SECRET=\"$(openssl rand -hex 32)\"" >> .env
echo "PM_ENCRYPTION_KEY=\"$(openssl rand -hex 32)\"" >> .env

npm install
npx prisma migrate deploy
npm run seed:password -- yourpassword
npm run build
npm start
```

App runs on `:3000`.

## Tests

```bash
npm test            # unit + integration (Vitest)
npm run test:e2e    # E2E (Playwright)
```

## E2E test requirements

Playwright Chromium requires these system libraries on the host:

```bash
sudo apt install -y libnspr4 libnss3 libasound2 libatk-bridge2.0-0 libcups2 \
  libgtk-3-0 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 \
  libgbm1 libxshmfence1 libnotify-bind libdrm2 libwayland-client0 libxss1
```

Or via Playwright's own helper (also needs sudo):

```bash
sudo npx playwright install-deps chromium
```

If those deps aren't available (e.g. minimal LXC), unit + integration tests still run normally; E2E will skip.

## Phase 1 features
- Single-password login (bcrypt + JWT cookie)
- Auto-scan `/data/video-pipeline/LXC4103/project/` for git repos
- Manual add-project form
- Project dashboard + detail view
