SvelteKit web console for Logarys.
The UI connects to logarys-console-manager and provides:
- login with JWT bearer authentication;
- authenticated API calls;
- log search;
- pipeline views and admin configuration;
- profile management;
- admin user management.
- SvelteKit 5
- TypeScript
- Static adapter
- Caddy runtime image
small-type-dependency-injection
npm install
cp .env.example .env
npm run devnpm run buildnpm run testdocker compose up --buildThe UI is exposed on http://localhost:5173.
PUBLIC_LOGARYS_API_URL=http://localhost:3002PUBLIC_LOGARYS_API_URL must point to the console manager API.
The login page calls:
POST /auth/loginExpected response from the API:
{
"accessToken": "jwt-token",
"expiresIn": 43200,
"user": {
"id": "user-id",
"name": "Administrator",
"email": "admin@logarys.local",
"isAdmin": true,
"isEnabled": true
}
}After login, the UI stores:
access token
current userAuthenticated API requests automatically send:
Authorization: Bearer jwt-tokenIf the API returns 401, the UI clears the local auth state and redirects to /login.
/login public login page
/ authenticated dashboard entry
/logs authenticated log search
/pipelines authenticated pipeline view
/config admin-only configuration
/profile authenticated own profile edition
/admin/users admin-only user management| Page / action | Admin | Regular user |
|---|---|---|
| Login | yes | yes |
| Logs search | yes | yes |
| Pipeline view | yes | yes |
| Profile page | yes | yes |
| Edit own name/email/password | yes | yes |
| Admin configuration | yes | no |
| User list | yes | no |
| Create user | yes | no |
| Disable user | yes | no |
| Edit another user | yes | no |
The UI hides admin-only navigation entries for non-admin users.
The API is still the source of truth for permissions: hidden UI actions are not considered security controls by themselves.
Route:
/loginThe user enters:
email
passwordOn success:
- the JWT is saved;
- the current user is saved;
- admin users can access
/admin/users; - regular users are redirected to the main console.
Route:
/profileAuthenticated users can edit their own:
name
email
passwordThe UI calls:
GET /users/me
PATCH /users/meRegular users cannot update their own isAdmin or isEnabled fields.
Route:
/admin/usersAdmin users can:
- list users;
- create users;
- update users;
- enable or disable users;
- assign or remove admin rights.
The UI calls:
GET /users
POST /users
PATCH /users/:id
PATCH /users/:id/disable
DELETE /users/:idThe UI calls the backend for these actions:
POST /auth/login
GET /users/me
PATCH /users/me
GET /users
POST /users
PATCH /users/:id
PATCH /users/:id/disable
DELETE /users/:id
GET /pipelines
GET /pipelines?query=...&inputType=...&enabled=...
POST /pipelines
GET /logs?query=...&pipelineId=...&level=...&limit=...List responses may be returned either directly as an array or wrapped in one of these shapes:
{ "items": [] }
{ "data": [] }
{ "results": [] }The UI needs an existing admin user to log in.
Create one through the console manager env vars:
ADMIN_INIT_ENABLED=true
ADMIN_EMAIL=admin@logarys.local
ADMIN_PASSWORD=change-me-password
ADMIN_NAME=AdministratorOr create one manually from the console manager project:
npm run user:create -- \
--name "Administrator" \
--email admin@logarys.local \
--password "change-me-password" \
--adminThen log in at:
/loginWhen developing locally, make sure both services agree on the API URL:
PUBLIC_LOGARYS_API_URL=http://localhost:3002If the console manager runs on another port, update .env accordingly.