Files

44 lines
3.3 KiB
Markdown
Raw Permalink Normal View History

2026-09-24 14:35:05 +03:00
# Meguri
A shared source of truth for on-call rotations, replacements, escalation policies, and routing. Rust + Cot 0.7 (HTTP, ORM, migrations), PostgreSQL, and locally vendored Alpine.js. The interface is English. Providers receive calculated intervals and execute notifications/escalation timers.
## Start locally
On Windows with the PostgreSQL server binaries installed:
```powershell
./scripts/dev.ps1
```
Open http://127.0.0.1:3000. Explicit demo accounts: `alice`, `bob`, `carol`; password `meguri-demo-only`. Stop with `./scripts/stop-dev.ps1`. Pass `-PostgresBin PATH` if PostgreSQL is elsewhere. Local data and logs live in ignored `target/local/`.
On other platforms, create a PostgreSQL database, set the environment variables in `.env.example`, then run `cargo run --locked`. Use `postgresql://` URLs. Enable `MEGURI_ALLOW_SIGNUP=true` to create accounts; `MEGURI_SEED_DEMO=true` works only on loopback. Environment files are not automatically loaded.
## Implemented
- Independent workspaces, local accounts, granular workspace grants, and durable audit/history.
- Calendar-day rotations with IANA timezones, ordered participants, anchors, absence fallback, holidays, and escalation backup schedules.
- Replacements and atomic reciprocal swaps; confirmation by the other employee or forced application with a reason.
- Durable publication, optimistic revisions, worker leases, retries, checkpoints, external drift protection, and a downloadable preview.
- Mock provider and a JSM Operations API adapter for schedules, escalations, and routing.
## Working through agents
Start with [AGENTS.md](AGENTS.md). Describe intended behavior and examples to the agent; it must update the specification, implementation, and relevant tests together. [Product](docs/product.md), [architecture](docs/architecture.md), [test strategy](docs/testing.md), [development](docs/development.md), and [deployment](docs/deployment.md) are maintained project inputs.
```text
cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo test
cargo test --test integration -- --ignored --test-threads=1
```
The integration command requires `MEGURI_TEST_DATABASE_URL` for a disposable PostgreSQL database. CI runs it explicitly; ordinary unit tests need no database or external account. Browser checks are in `tests/browser.cjs`.
## Current boundaries
OIDC identity linking has a schema boundary but no login adapter yet. JSM has local HTTP contract coverage and still needs acceptance testing against a dedicated JSM test team and your subscription. GKE manifests are deployment templates, not an already deployed environment. No alert ingestion or notification engine is included.
The ignored `opsgenie-master/` directory is local reference material. Its behavioral examples are captured in the product contract and tests; application and CI do not depend on it.
Demo mode is disposable: `MEGURI_SEED_DEMO=true` resets only positively marked demo data on restart and expires temporary resources while running. Unmarked/normal databases are protected and trigger an isolated demo database with a permanent warning. See [demo lifecycle and retention settings](docs/development.md#demo-lifecycle). Alice leads two generated examples; Bob demonstrates Engineering on-call, Carol daily Support shifts. All use `meguri-demo-only`.