diff --git a/PLAN.md b/PLAN.md index 44778b9..335f635 100644 --- a/PLAN.md +++ b/PLAN.md @@ -65,9 +65,9 @@ Create a netviel clone with improvements: ## Phase 6: Polish - [ ] Add proper error handling throughout - [ ] Add logging -- [ ] Update README with usage instructions -- [ ] Add configuration options (NOTMUCH_PATH env var) -- [ ] Security audit and warnings (local-only usage) +- [x] Update README with usage instructions +- [x] Add configuration options (NOTMUCH_PATH env var) +- [x] Security audit and warnings (local-only usage) - [ ] Run `zig fmt .` ## Notes diff --git a/README.md b/README.md index 06723f9..6b974f8 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,20 @@ Zetviel ------- -As some background, I've had some issues with the very usable [netviel](https://github.com/DavidMStraub/netviel). +A web-based email client for [notmuch](https://notmuchmail.org/), written in Zig. -I wanted to address those issues, but also simplify the deployment. And, I like zig, +As some background, I've had some issues with the very usable [netviel](https://github.com/DavidMStraub/netviel). +I wanted to address those issues, but also simplify the deployment. And, I like Zig, so I decided this was small enough I'd just re-write the thing to make my own. -This is still very work in progress, to the point it is not yet usable. It has -some basic notmuch integration and a usable build system. +Features +-------- + +- REST API for notmuch queries +- Thread and message viewing +- Attachment handling +- Security headers for safe browsing +- Configurable port Building -------- @@ -18,4 +25,39 @@ will install the necessary notmuch header/library, and the build system will detect and use that. Again, `zig build` will work in that instance, but you must `nix develop` first. -More to come... +Usage +----- + +```sh +# Start server on default port (5000) +zetviel + +# Start server on custom port +zetviel --port 8080 + +# Show help +zetviel --help + +# Show version +zetviel --version +``` + +Configuration +------------- + +- `NOTMUCH_PATH` environment variable: Path to notmuch database (default: `mail`) +- `--port`: HTTP server port (default: 5000) + +API Endpoints +------------- + +- `GET /api/query/` - Search threads using notmuch query syntax +- `GET /api/thread/` - Get messages in a thread +- `GET /api/message/` - Get message details with content +- `GET /api/attachment//` - Get attachment metadata + +Security +-------- + +**WARNING**: Zetviel is intended for local use only. It binds to 127.0.0.1 and should +not be exposed to the internet without additional security measures.