docs: add justfile and rewrite README/CLAUDE.md for service architecture
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,21 +1,30 @@
|
||||
# whoareyou
|
||||
|
||||
Who is calling me?
|
||||
Who is calling me? A self-hosted HTTP service that looks up Swedish phone
|
||||
numbers across reverse-lookup sites. Providers are sandboxed WASM components.
|
||||
|
||||
## Usage
|
||||
|
||||
```shell
|
||||
$ whoareyou 0700000000
|
||||
$ just run
|
||||
$ curl "http://127.0.0.1:8080/api/v1/number/0700000000"
|
||||
```
|
||||
|
||||
## Todo
|
||||
## Configuration (env)
|
||||
|
||||
Almost everything. I will add stuff when I need stuff. But hey, if you found this project and want to use it. Fork it, change it, create a PR, and I will add it :)
|
||||
| Variable | Default |
|
||||
|---|---|
|
||||
| `WHOAREYOU_LISTEN` | `127.0.0.1:8080` |
|
||||
| `WHOAREYOU_COMPONENTS_DIR` | `components` |
|
||||
| `WHOAREYOU_CACHE_TTL_HOURS` | `24` |
|
||||
| `WHOAREYOU_FETCH_TIMEOUT_SECS` | `10` |
|
||||
|
||||
- [x] Add flag to open url for probes in browser (easier for debugging)
|
||||
- [x] Probe should return and Result, so we don't print a new line for empty result
|
||||
- [x] Add logging
|
||||
- [ ] List cache entries
|
||||
- [ ] Clear cache entries
|
||||
- [ ] Add some nice colors, so it's easier to read the output.
|
||||
- [x] Add tests for probes.
|
||||
## Development
|
||||
|
||||
```shell
|
||||
$ rustup target add wasm32-wasip2
|
||||
$ just test
|
||||
```
|
||||
|
||||
Provider contract lives in `wit/provider.wit`. See
|
||||
`docs/superpowers/specs/2026-06-05-wasm-provider-service-design.md`.
|
||||
|
||||
Reference in New Issue
Block a user