sync app filled in
This commit is contained in:
30
README.md
30
README.md
@@ -21,6 +21,7 @@ This repository now contains the Milestone 1 foundation scaffold:
|
||||
- Docker (optional)
|
||||
- CGO-capable toolchain for `go-libsql`
|
||||
- `air` for Go live reload (`go install github.com/air-verse/air@v1.65.1`)
|
||||
- Xcode command-line tools for the optional macOS sync app and CLI
|
||||
|
||||
Install the pinned toolchain with:
|
||||
|
||||
@@ -48,6 +49,28 @@ mise run server-run
|
||||
|
||||
The server listens on `http://localhost:8080` by default.
|
||||
|
||||
### macOS Sync and CLI
|
||||
|
||||
The menu bar sync app and companion CLI live in `apps/macos-sync`. For local
|
||||
development, start the server with its local-only auth shortcut:
|
||||
|
||||
```bash
|
||||
PORT=9000 CAIRNQUIRE_DEV_MODE=1 mise run server-run
|
||||
|
||||
cd apps/macos-sync
|
||||
swift run cairnquire-cli config \
|
||||
--server http://localhost:9000 \
|
||||
--token dev \
|
||||
--folder "$HOME/Documents/Cairnquire"
|
||||
swift run cairnquire-cli sync
|
||||
swift run CairnquireSync
|
||||
```
|
||||
|
||||
The app automatically uses the `dev` token for localhost servers. For a
|
||||
deployed server, create an API token from `/account` and store that token in
|
||||
the app settings. See [`apps/macos-sync/README.md`](apps/macos-sync/README.md)
|
||||
for upload, sync, and Keychain details.
|
||||
|
||||
### Fresh Server Deployment
|
||||
|
||||
The Compose deployment keeps its database and attachment store in `./data` and
|
||||
@@ -86,6 +109,7 @@ Supported variables:
|
||||
|
||||
- `CAIRNQUIRE_PUBLIC_ORIGIN` - Required for deployment. Exact public HTTPS origin used for passkeys and device-flow URLs, for example `https://cairnquire.example.com`.
|
||||
- `CAIRNQUIRE_SERVER_ADDR` - Listen address. Defaults to `:8080`.
|
||||
- `PORT` - Optional shorthand for the listen port, for example `PORT=9000`.
|
||||
- `CAIRNQUIRE_DATABASE_PATH` - Local SQLite/libsql path. Defaults to `../../data/db.sqlite` when running from `apps/server`.
|
||||
- `CAIRNQUIRE_DATABASE_PRIMARY_URL` - Optional remote libsql primary URL for an embedded replica.
|
||||
- `CAIRNQUIRE_DATABASE_AUTH_TOKEN` - Optional auth token for the remote libsql primary.
|
||||
@@ -97,6 +121,12 @@ Supported variables:
|
||||
- `CAIRNQUIRE_LOG_LEVEL` - Defaults to `INFO`.
|
||||
- `CAIRNQUIRE_DEV_MODE` - Optional local-only auth shortcut. Do not enable on a deployed server.
|
||||
|
||||
## Dev Mode
|
||||
|
||||
With `CAIRNQUIRE_DEV_MODE=1`, API requests using `Authorization: Bearer dev`
|
||||
authenticate as the local development admin. This is intended only for
|
||||
localhost testing.
|
||||
|
||||
## Noted Gaps
|
||||
|
||||
- The docs call for `golang-migrate`, but the current foundation uses an internal migration runner while `go-libsql` integration details are validated.
|
||||
|
||||
Reference in New Issue
Block a user