Implement Monlet MVP stack and UI updates

This commit is contained in:
Stanislav Rossovskii
2026-05-27 10:01:59 +04:00
parent dcea096327
commit edc51e9c59
145 changed files with 15618 additions and 248 deletions

View File

@@ -1,32 +1,53 @@
# Monlet Web
Placeholder for the read-only dashboard.
Read-only dashboard for Monlet.
Planned stack:
## Stack
- Next.js App Router;
- TypeScript;
- Tailwind CSS;
- read-only API client;
- reverse-proxy/basic-auth friendly deployment.
- Next.js 16 (App Router)
- React 19
- TypeScript
- Tailwind CSS v4
- Typed API client generated from `api/openapi.yaml`
No web UI is implemented in Stage 0.
## Planned Commands
## Commands
```sh
cd web
npm_config_cache=../.cache/npm npm install
npm_config_cache=../.cache/npm npm run dev
```
Build / lint / typecheck / smoke:
```sh
npm_config_cache=../.cache/npm npm run build
npm_config_cache=../.cache/npm npm run lint
npm_config_cache=../.cache/npm npm run typecheck
npm_config_cache=../.cache/npm npm run smoke
```
Do not install Node packages globally. Project dependencies live in `web/node_modules`; npm cache lives under repository `.cache/npm`.
## Planned Pages
## Environment
- overview;
- agents;
- agent detail;
- checks;
- incidents;
- events;
- notifiers/outbox.
| Var | Default | Purpose |
|---|---|---|
| `MONLET_API_BASE_URL` | `http://127.0.0.1:8000` | Server base URL (server-side fetch) |
| `MONLET_API_TOKEN` | _(none)_ | Bearer token sent to server |
The token never reaches the browser — all server calls happen in Server Components / route handlers.
## Pages
- `/` — overview
- `/agents` — agent list
- `/agents/[id]` — agent detail
- `/checks` — current check states
- `/incidents` — incident list
- `/events` — events query
- `/outbox` — notification outbox
## API client
Types are generated from `../api/openapi.yaml` into `src/lib/api-types.ts` via `npm run gen:api`.