# Mini CI Feature Ideas

Feature ideas for evolving the project from a Docker container watcher into a self-hosted mini CI/deployment platform for local developers.


## Build Pipeline

- **Build from source** — clone a repo, run a `Dockerfile` or `docker-compose.yml`, build the image locally, then deploy it. Closes the loop from source to running container.
- **Build logs streaming** — SSE stream of `docker build` output, reusing the existing container logs streaming pattern.
- **Build cache management** — show Docker layer cache stats, allow selective cache invalidation.

## Git Integration

- **Webhook receiver for push events** — Gitea/GitHub/GitLab sends a push webhook, the platform rebuilds and redeploys automatically. Reuses existing webhook infra from registry polling.
- **Branch preview environments** — push to `feature/foo`, get a temporary deployment at `foo.preview.local`. Auto-cleanup when the branch is deleted.
- **Commit status reporting** — push deploy status back to Gitea/GitHub as commit statuses (green check / red X).

## Developer Experience

- **CLI tool** — `Tinyforge deploy`, `Tinyforge logs`, `Tinyforge status` from the terminal for developers who prefer the shell.
- **`.Tinyforge.yml` project config** — a declarative file in the repo root that defines how to build, which env vars to inject, health check paths, proxy rules. One file, full deploy config.
- **Environment promotion** — one-click promote from `dev` to `staging` to `prod`. Builds on the existing multi-stage project model by adding a promotion workflow.

## Observability

- **Resource dashboard** — CPU/memory/disk per container over time (not just a snapshot). Use Docker stats API with a small ring buffer in SQLite.
- **Deploy timeline** — a visual timeline showing deploys, rollbacks, and incidents across all projects. "What happened in my infra today?"
- **Alerting** — container OOM, high CPU, health check failures pushed to Telegram/Discord/email/webhook.

## Multi-Service Orchestration

- **Compose support** — import a `docker-compose.yml` and manage the entire stack as one project. Deploy/rollback the stack atomically.
- **Service dependency graph** — visualize which services depend on which. Block deploys if a dependency is unhealthy.
- **Shared secrets** — secrets scoped to a project or global, injected into any service that needs them. Extends the existing encrypted secrets model from static sites.

## Database / Persistence

- **Database snapshots** — one-click snapshot/restore of database volumes before risky deploys.
- **Automatic pre-deploy backup** — snapshot the data volume before every deploy, auto-prune old snapshots.
