Rewrite README in English
Turn the root README into a proper project overview: what the app does today, the stack, how to run it locally and the current status, instead of the short Spanish setup notes it had before. Replace the generic SvelteKit scaffold README in frontend/ with a short one that actually describes this client.
This commit is contained in:
@@ -1,40 +1,72 @@
|
|||||||
# Docker Manager
|
# Docker Manager
|
||||||
|
|
||||||
WebApp centralizada para gestionar instancias Docker (Musify, bot de Discord, etc.) desde un único sitio: recursos, logs, consola. Ver [Plan-DockerManager-WebApp.md](../Plan-DockerManager-WebApp.md) para la arquitectura completa y el roadmap.
|
A web app for keeping track of Docker containers running on a home server
|
||||||
|
from a single dashboard, instead of jumping between SSH sessions and `docker
|
||||||
|
ps`. Built for personal infrastructure: a handful of self-hosted services and
|
||||||
|
side projects running on one box.
|
||||||
|
|
||||||
|
## What it does right now
|
||||||
|
|
||||||
|
- Lists every container on the local Docker host, running or stopped, with
|
||||||
|
its image, state and status.
|
||||||
|
- A small health check endpoint so the API itself can be monitored.
|
||||||
|
|
||||||
|
This is early: a single host, read-only, no login yet. The plan is to grow
|
||||||
|
it into something that can watch several hosts, show logs and a live
|
||||||
|
console, and act on containers (start, stop, restart) behind proper
|
||||||
|
authentication.
|
||||||
|
|
||||||
## Stack
|
## Stack
|
||||||
|
|
||||||
- **Backend:** Go (`chi`, SDK oficial de Docker, `pgx`, `zitadel/oidc`, `coder/websocket`)
|
**Backend**: Go, using `chi` for routing, the official Docker SDK to talk to
|
||||||
- **Frontend:** SvelteKit + Tailwind CSS v4
|
the engine, `pgx` for Postgres and `zitadel/oidc` and `coder/websocket` for
|
||||||
- **Auth:** Zitadel (patrón BFF)
|
what's coming next (auth and live log streaming).
|
||||||
- **DB:** PostgreSQL
|
|
||||||
- **Archivos:** SeaweedFS (S3)
|
|
||||||
|
|
||||||
## Arrancar en desarrollo
|
**Frontend**: SvelteKit with Tailwind CSS v4.
|
||||||
|
|
||||||
|
**Auth** (planned): Zitadel, with the backend-for-frontend pattern so tokens
|
||||||
|
never reach the browser.
|
||||||
|
|
||||||
|
**Database**: PostgreSQL, for hosts, tracked services and an audit log.
|
||||||
|
|
||||||
|
**File storage** (planned): SeaweedFS, S3 compatible.
|
||||||
|
|
||||||
|
Everything ships as Docker Compose for local development: Postgres, Zitadel
|
||||||
|
and SeaweedFS run as infrastructure while the Go API and the SvelteKit app
|
||||||
|
run directly on the host for fast iteration.
|
||||||
|
|
||||||
|
## Project layout
|
||||||
|
|
||||||
|
```
|
||||||
|
backend/ Go API: HTTP router, config, the Docker connector, SQL migrations
|
||||||
|
frontend/ SvelteKit app
|
||||||
|
deploy/ docker-compose.dev.yml and Postgres init scripts
|
||||||
|
```
|
||||||
|
|
||||||
|
## Running it locally
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1. Infraestructura (Postgres + Zitadel + SeaweedFS)
|
|
||||||
make dev-infra
|
make dev-infra
|
||||||
|
|
||||||
# 2. Backend (puerto 8090 — el 8080 puede estar ocupado por otros servicios)
|
|
||||||
cp backend/.env.example backend/.env
|
cp backend/.env.example backend/.env
|
||||||
make backend
|
make backend
|
||||||
|
|
||||||
# 3. Frontend (puerto 5173)
|
|
||||||
make frontend
|
make frontend
|
||||||
```
|
```
|
||||||
|
|
||||||
Backend: http://localhost:8090/healthz · http://localhost:8090/api/containers
|
That brings up Postgres, Zitadel and SeaweedFS, then starts the API on
|
||||||
Frontend: http://localhost:5173
|
`http://localhost:8090` and the frontend on `http://localhost:5173`. The API
|
||||||
|
port is 8090 instead of the usual 8080 because that one is often already
|
||||||
|
taken by something else on the same machine.
|
||||||
|
|
||||||
## Estado (Fase 1)
|
Useful endpoints while developing: `/healthz` and `/api/containers`.
|
||||||
|
|
||||||
- [x] Estructura del monorepo (`backend/`, `frontend/`, `deploy/`)
|
## Status
|
||||||
- [x] Backend Go: router `chi`, config por env vars, healthcheck
|
|
||||||
- [x] `HostConnector` / `LocalConnector`: listado de contenedores del host vía SDK oficial de Docker
|
- [x] Monorepo layout (`backend/`, `frontend/`, `deploy/`)
|
||||||
- [x] Frontend SvelteKit + Tailwind consumiendo `/api/containers`
|
- [x] Go backend: `chi` router, env based config, health check
|
||||||
- [x] `docker-compose.dev.yml` con Postgres + Zitadel + SeaweedFS
|
- [x] `HostConnector` / `LocalConnector`: container listing via the Docker SDK
|
||||||
- [x] Migraciones iniciales (`hosts`, `services`, `audit_log`)
|
- [x] Frontend consuming `/api/containers`
|
||||||
- [ ] Auth OIDC contra Zitadel (patrón BFF) — siguiente paso
|
- [x] Dev infrastructure with Postgres, Zitadel and SeaweedFS
|
||||||
- [ ] Persistencia de hosts/services en Postgres vía backend
|
- [x] Initial schema (`hosts`, `services`, `audit_log`)
|
||||||
- [ ] Acciones sobre contenedores (start/stop/restart) + logs en vivo
|
- [ ] OIDC login against Zitadel (BFF pattern)
|
||||||
|
- [ ] Persisting hosts and services through the backend
|
||||||
|
- [ ] Container actions (start/stop/restart) and live logs
|
||||||
|
|||||||
+9
-30
@@ -1,42 +1,21 @@
|
|||||||
# sv
|
# frontend
|
||||||
|
|
||||||
Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).
|
The Docker Manager web client: SvelteKit, Svelte 5 runes, TypeScript and
|
||||||
|
Tailwind CSS v4. Talks to the Go API at `$lib/api.ts`.
|
||||||
|
|
||||||
## Creating a project
|
## Development
|
||||||
|
|
||||||
If you're seeing this, you've probably already done this step. Congrats!
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# create a new project
|
npm install
|
||||||
npx sv create my-app
|
npm run dev # :5173
|
||||||
```
|
```
|
||||||
|
|
||||||
To recreate this project with the same configuration:
|
The backend needs to be running for the container list to load, see the
|
||||||
|
root [README](../README.md) for how to start it.
|
||||||
```sh
|
|
||||||
# recreate this project
|
|
||||||
npx sv@0.17.0 create --template minimal --types ts --install npm frontend
|
|
||||||
```
|
|
||||||
|
|
||||||
## Developing
|
|
||||||
|
|
||||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm run dev
|
|
||||||
|
|
||||||
# or start the server and open the app in a new browser tab
|
|
||||||
npm run dev -- --open
|
|
||||||
```
|
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
To create a production version of your app:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm run build
|
npm run build
|
||||||
|
npm run preview
|
||||||
```
|
```
|
||||||
|
|
||||||
You can preview the production build with `npm run preview`.
|
|
||||||
|
|
||||||
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user