# Current

> Keep this file short. One active step, one ordered backlog. Completed work moves to
> [progress.md](progress.md). If this file starts reading like a changelog, it has
> drifted — that's exactly what went wrong last time.

## Active: Milestone 0 — Skeleton

**Goal:** a Topcoat app that boots, serves one page, reads config from env, and opens
a SQLite pool. No domain logic yet. The point is to learn Topcoat's shape before
committing the architecture to it.

### Steps

- [ ] Add `topcoat` 0.5 + `tokio` to `Cargo.toml`; install `topcoat-cli`
- [ ] Get the getting-started hello-world page rendering
- [ ] Work out how `#[page]` / `module_router!` discovery wants the source tree laid
      out — this constrains everything after it
- [ ] Config from env via `envy` (`STEID_*`), mirroring `.env.dev` from the previous
      attempt (see [runbook.md](runbook.md))
- [ ] SQLite pool registered as app context; confirm a page can read it via
      `app_context::<T>(cx)`
- [ ] Decide the layering question in [architecture.md](architecture.md#open-question-topcoats-data-access-vs-clean-architecture)
      — this is the one genuinely open design question and it blocks Milestone 1

### Done when

`cargo run` (or `topcoat` CLI) serves a page that renders a value read from SQLite,
with config supplied by env.

## Backlog

Ordered. Pull from the top.

1. **Milestone 1 — Identity.** Domain model (User, Org, Membership, Actor, Role),
   value objects (Email, PasswordHash), typed IDs, repository ports, Argon2 hashing,
   registration policy, session cookies. Reference implementation exists and was
   solid — port the domain layer, rewrite the web layer.
2. **Milestone 2 — Repo model.** `Repository` entity, `Visibility`, `create_repo` use
   case, bare repo on disk at `{data_dir}/{org}/{repo}.git`. Watch the
   DB-plus-filesystem atomicity problem — see
   [architecture.md](architecture.md#db-plus-filesystem-writes).
3. **Milestone 3 — Git over SSH.** `GitProtocolServer` port, `GitBinary` adapter,
   embedded russh. Channel-splitting is fiddly; the notes in
   [progress.md](progress.md#ssh-channel-bridging) are hard-won.
4. **Milestone 4 — SSH key auth + authz.**

## Open questions

- **Topcoat is nine days old** (v0.5.0, first release 2026-07-22, breaking changes
  expected). Pin the exact version and expect to chase it. Budget time for churn that
  isn't feature work.
- Does Topcoat's asset/CSS pipeline coexist with an embedded russh server in one
  binary, or does the CLI's watch-and-rebuild model push SSH into a separate process?
  Unresolved — affects the embedded-SSH approach and single-binary deploy.
- Topcoat ships Tailwind without Node. That reopens the design system from attempt #1
  that was dropped purely to avoid an npm build step — see [ui.md](ui.md).
