Welcome to Twake Mail Administration (version 0.0.0)
This project is a simple frontend for Twake Mail system operators. It enables quick and timely verification of running systems and if need be ease remediations. Hopefully, with this tool, regular operators will no longer need to cope with WebAmin REST interface via CLI.
This document summarizes feature included in Twake Mail admin interface MVP.
Non goals: This project is not meant for doing:
- functional administration. Use LinID instead.
- presenting log and metrics. Use Loki/Prometheus/Grafana instead.
Before running the project, create a .env file based on .env.example:
cp .env.example .envThen, update the values as needed.
| Variable | Description | Default Value |
|---|---|---|
VITE_API_BASE_URL |
The base URL for the admin API. | http://localhost:8000 |
VITE_PAGE_LIMIT |
Defines the number of items per page in pagination. | 20 |
Then use node version 18:
nvm install 18
nvm use 18
Rename .env.sample into .env and edit the file accordingly to your Twake Mail environment.
Install other project dependencies:
bun install
Then run the dev version of the project:
bun run dev
Alternatively, you can run the project using Docker Compose.
-
Ensure you have Docker and Docker Compose installed.
-
Run the following command to start the service:
docker compose up --build
This will build and start the application in a container.
-
To stop the containers, use:
docker compose down
-
If you want to run the service in detached mode:
docker compose up -d
This project is built with Vite!
What this frontend shows depends entirely on the allowed.urls profile
configured for the operator's OIDC client in
webadmin-proxy. Writing one by hand
means knowing the WebAdmin API endpoint by endpoint.
profile-editor/ generates one by asking questions —
which pages, which sections, which actions — and writes a rule file the proxy can
include as-is. It also runs backwards: --check takes an existing profile and
reports, page by page, what it makes visible.
From this checkout — standard library only, nothing to install, arrow keys and checkboxes included:
cd profile-editor
python3 -m twake_profile_editor --name domain-support # ask, then generate
python3 -m twake_profile_editor --name domain-support --fr # ...in French
python3 -m twake_profile_editor --check domain-support.json # what does it show?Or from the image published alongside this one, at the tag matching the deployment you are writing the profile for — the endpoint inventory is baked in, so the tag is the version pin:
docker run --rm -it -v "$PWD:/work" --user "$(id -u):$(id -g)" \
linagora/twake-mail-admin-profile-editor:1.2.3 --name domain-support --frIt reads validation.md, src/lib/proxy-resolver.ts and every
useIsAllowed call site straight out of this repository, and its test suite
fails when they disagree — which is why it lives here rather than in a repository
of its own. See profile-editor/UPSTREAM.md.
