docs: Phase 5 - Comprehensive deployment documentation

- Created detailed srv/README.md with:
  - Quick start guide
  - SystemD service setup instructions
  - Reverse proxy configuration (Caddy & Nginx)
  - Complete API endpoint reference
  - Client configuration examples
  - Troubleshooting guide
  - Security considerations
  - Future enhancement roadmap
- Updated main README.md with server & sync features
- Added sync command quick reference
- Documented offline support and conflict resolution
This commit is contained in:
2026-01-05 16:21:09 +01:00
parent 40c09d6a8a
commit 4c54814eb5
2 changed files with 416 additions and 10 deletions
+51 -1
View File
@@ -32,4 +32,54 @@ A task can be recurring. Then we have a template task and instances of that task
A recurring task is given a status of recurring which hides it from view. The recurring task you create is called the template task, from which recurring tasks instances are created. So the template remains hidden, and the recurring instances that spawn from it are the tasks that you will see and complete.
## Storage
Sqlite store.
SQLite database stored in `~/.config/jade/opal.db`
## Server & Sync
Opal-task includes a REST API server for syncing tasks across multiple devices.
### Quick Start
**Server Setup:**
```bash
# Build
go build -o opal main.go
# Generate API key
./opal server keygen --name "My Device" --db /var/lib/opal/opal.db
# Start server
./opal server start --addr :8080 --db /var/lib/opal/opal.db
```
**Client Setup:**
```bash
# Configure sync
opal sync init --url https://opal.yourdomain.com --key oak_abc123...
# Sync tasks
opal sync now
# Initial merge (for existing local database)
opal sync merge
```
### Sync Commands
- `opal sync init` - Configure sync with server
- `opal sync status` - Show sync configuration and status
- `opal sync now` - Bidirectional sync
- `opal sync up` - Push local changes to server
- `opal sync down` - Pull server changes from server
- `opal sync merge` - Initial database merge (for first-time sync)
- `opal sync log` - View conflict resolution log
### Features
- **Offline support** - Queue changes when server is unreachable
- **Conflict resolution** - Automatic conflict handling (last-write-wins by default)
- **Change tracking** - Full change log with configurable retention
- **API key authentication** - Secure bcrypt-hashed keys
- **Household sharing** - Single shared database for all family members
See [srv/README.md](srv/README.md) for detailed server deployment instructions.