# GTD

Minimal Getting Things Done app. One Expo/React Native codebase for iPhone, Android, and web; data lives in Postgres on the VPS.

- **Web**: https://gtd.rehbock.xyz (Expo web export, static)
- **API**: https://gtd.rehbock.xyz/api → `gtd-api` container (Bun, `server/`)
- **DB**: `gtd` database in the `personal-db` Postgres container (`server/schema.sql`)
- **Auth**: single bearer token (`API_TOKEN` in `server/.env` on the VPS); enter it once in the app's Settings

## Layout

- `app/` — Expo app (expo-router, TypeScript). Tabs: Inbox / Next / Waiting / Someday / Projects; tap a task to clarify (list, project, context, waiting-for, due/defer dates).
- `server/` — Bun API + Dockerfile + compose. Deployed at `~/personal/gtd` on rehbock.xyz, joined to `personal-db_default` + `caddy_net`.

## Develop

```sh
cd app && npx expo start        # scan QR with Expo Go (iPhone or Pixel)
```

## Deploy

```sh
# API
rsync -a server/ --exclude .env.token.local rehbock.xyz:personal/gtd/
ssh rehbock.xyz 'cd ~/personal/gtd; and docker compose up -d --build'

# Web
cd app && npx expo export --platform web
rsync -a --delete dist/ rehbock.xyz:personal/gtd/web/
```
