# Abdelouhab

Monorepo for the Abdelouhab Phase 1 prototype.

## Platforms

Abdelouhab is split into **two separate web applications**:

| Platform | Directory | Dev URL | Purpose |
|----------|-----------|---------|---------|
| **Firm** | `firm/` | http://127.0.0.1:8080 | Accountant workspace: inbox, approvals, bank matching, SnelStart sync |
| **Client** | `client/` | http://127.0.0.1:8082 | Client portal: upload documents, track status, answer queries |

Shared UI, state, and API client code lives in `shared/`.

## Run locally

From the project root:

```sh
npm run install:all
npm run dev
```

This starts:

- **Backend API** at `http://127.0.0.1:8001` (FastAPI)
- **Firm platform** at `http://127.0.0.1:8080`
- **Client portal** at `http://127.0.0.1:8082`

Both frontends proxy `/api/*` to the backend.

## Run separately

```sh
# Terminal 1 — backend
cd backend
python3 -m pip install -r requirements.txt
python3 -m uvicorn app.main:app --reload --host 127.0.0.1 --port 8001

# Terminal 2 — firm platform
cd firm
npm install
npm run dev

# Terminal 3 — client portal
cd client
npm install
npm run dev
```

## Configuration

Frontend env (`firm/.env` and `client/.env`):

- `VITE_API_URL=/api` — API base path (proxied in dev)
- `VITE_USE_API=true` — connect to backend; falls back to local mock data if API is unavailable

## Notes

- Port `8001` is used because `8000` is already occupied on this machine by another service.
- The legacy combined `frontend/` folder is deprecated; use `firm/` and `client/` instead.
- Seed data is exported via `npm run export:seed`.
