Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Accounts: say that the studio's owner sees what accounts make

Adarsh57cd38333dd5
diff --git a/docs/SELF-HOSTING.md b/docs/SELF-HOSTING.md
index 4554ae32..07886b7d 100644
--- a/docs/SELF-HOSTING.md
+++ b/docs/SELF-HOSTING.md
@@ -58,7 +58,7 @@ Each connection field in Settings has **Save & test**: what you typed is tested
## Keys, data and files
-Keys (and Assist connectors' URLs and tokens) are stored in a local SQLite database (`data/fuobe.db`) and never sent to the browser in full. Generated media is saved under `data/files/`, and LoRAs downloaded only to copy them to fal or Replicate, and your trained Soul ID LoRAs, under `data/loras/`. Fuobe is single-user.
+Keys (and Assist connectors' URLs and tokens) are stored in a local SQLite database (`data/fuobe.db`) and never sent to the browser in full. Generated media is saved under `data/files/`, and LoRAs downloaded only to copy them to fal or Replicate, and your trained Soul ID LoRAs, under `data/loras/`. One person owns a Fuobe studio. With public sign-up on, other people can make free accounts that run on their own GPU; you see what they make in **Settings → Accounts** ([public-signup.md](public-signup.md)).
## Security
diff --git a/docs/public-signup.md b/docs/public-signup.md
index 9318756c..d100c8f9 100644
--- a/docs/public-signup.md
+++ b/docs/public-signup.md
@@ -69,19 +69,38 @@ An account is signed in, but it sees the owner's studio as a guest does:
to run this" card.
- **Its own runs are its own.** The runs an account starts on its GPU appear in its own lists
(`GET /api/generations`), and it can open, cancel and delete them and download their files. They
- stay out of the owner's lists, and no other account can open them. An account's delete is for
- good (it has no Trash), so its space comes back at once. The live-updates stream isn't sent to
- accounts: their studios poll instead.
+ stay out of the owner's Library and live feed, and no other account can open them. The studio's
+ owner can see them, open their files and delete them ([Managing accounts](#managing-accounts));
+ the sign-up form says so. An account's delete is for good (it has no Trash), so its space comes
+ back at once. The live-updates stream isn't sent to accounts: their studios poll instead.
- **Its own uploads are its own.** Only the account that uploaded a file can open it or use it in a
run. See [Uploads](#uploads).
## Managing accounts
The owner sees everyone who signed up in **Settings → Accounts**: email, when the account was
-created, its last log-in, whether its own GPU is connected, and the total. The owner can switch an
-account off (it is signed out at once and can't log in) or delete it, and export the list as CSV.
-The API is `GET /api/admin/accounts` (`?format=csv` for the file), `PATCH /api/admin/accounts/<id>`
-with `{ "disabled": true | false }`, and `DELETE /api/admin/accounts/<id>`, for the owner only.
+created, its last log-in, whether its own GPU is connected, its runs (all time, in the last 7 days,
+running now, failed in the last 7 days), when it last ran, and the space its files take against its
+limit (1 GB in its first 7 days, then 3 GB). A line above the list gives the runs of every account
+in the last 24 hours and 7 days, the runs going now, and the space all accounts' files take against
+their share of the disk. The owner can switch an account off (it is signed out at once and can't
+log in) or delete it, and export the list as CSV.
+
+**Accounts' runs** (`/settings/runs`, from the list) shows what accounts made, newest first: one
+account's or every account's, each labelled with its email, filtered by account, status (finished,
+running, failed) and kind. Each run shows its result (a clip plays on hover or a tap), the app,
+preset or studio and the model, the prompt, its status with the error of a failed run, and when it
+ran. The owner can delete a run with its files, which gives the account its space back at once, or
+switch the account off from there. The owner's own runs are never listed there, and accounts' runs
+never appear in the owner's Library, its counts or the live feed.
+
+The API, for the owner only (guests get 401, accounts 403): `GET /api/admin/accounts` (each account
+with `runs`, `runsDay`, `runsWeek`, `running`, `failedWeek`, `lastRunAt`, `bytes` and `capBytes`,
+and `totals`; `?format=csv` for the file), `PATCH /api/admin/accounts/<id>` with
+`{ "disabled": true | false }`, `DELETE /api/admin/accounts/<id>`, `GET /api/admin/generations`
+(`?account=<id>`, `status=finished|running|failed`, `kind=image|video|audio|model3d|text`,
+`before=<createdAt>:<id>` from the last page's `next`, `limit` up to 100) and
+`DELETE /api/admin/generations/<id>` (an account's run only).
An account can delete itself: `DELETE /api/auth/me` with `{ "password" }`. When an account is
deleted (by itself or by the owner), its runs are stopped and removed, and its uploads and results
@@ -190,5 +209,7 @@ The rules are in `src/lib/guest-access.ts` (which paths guests and accounts may
`src/server/providers/comfyui.ts` and `accountRun` in `src/server/generations.ts`; what an account's
work may read is `src/server/tenant.ts`. Uploads are `src/app/api/uploads/route.ts` (which makes the
proxy's checks itself, `src/server/direct-gate.ts`), the limits are in `src/server/account-files.ts`
-and the clean-up in `src/server/account-sweep.ts`. The tests are in `tests/public-signup.test.ts`,
-`tests/accounts-admin.test.ts`, `tests/account-gpu.test.ts` and the `tests/account-*.test.ts` files.
+and the clean-up in `src/server/account-sweep.ts`. The owner's view of what accounts make is
+`src/server/account-admin.ts`. The tests are in `tests/public-signup.test.ts`,
+`tests/accounts-admin.test.ts`, `tests/account-runs-admin.test.ts`, `tests/account-gpu.test.ts` and
+the `tests/account-*.test.ts` files.
diff --git a/src/components/gpu/account-gpu-section.tsx b/src/components/gpu/account-gpu-section.tsx
index 7eb0d3e8..3acfbab3 100644
--- a/src/components/gpu/account-gpu-section.tsx
+++ b/src/components/gpu/account-gpu-section.tsx
@@ -15,7 +15,9 @@ export function AccountGpuSection() {
<h2 id="your-gpu-title" className="text-[15px] font-semibold">
Your GPU
</h2>
- <p className="mt-1 text-[13px] text-muted-foreground">Signed in as {account.email}. Connect your own ComfyUI to run open-source models.</p>
+ <p className="mt-1 text-[13px] text-muted-foreground">
+ Signed in as {account.email}. Connect your own ComfyUI to run open-source models. The studio&apos;s owner can see what you make here.
+ </p>
<Button
size="sm"
variant="ghost"
diff --git a/src/components/login-form.tsx b/src/components/login-form.tsx
index 73dcd50a..bb61942b 100644
--- a/src/components/login-form.tsx
+++ b/src/components/login-form.tsx
@@ -102,6 +102,7 @@ export function LoginForm() {
<Button type="submit" className="mt-4 h-11 w-full" disabled={!password || (mode !== "owner" && !email) || (mode === "signup" && password.length < 8) || busy}>
{busy && <Loader2 className="animate-spin" />} {copy.button}
</Button>
+ {mode === "signup" && <p className="mt-3 text-center text-[12px] text-muted-foreground">The studio&apos;s owner can see what you make here.</p>}
{open && (
<div className="mt-4 space-y-1.5 text-center text-[13px] text-muted-foreground">
{mode === "signup" ? (