dressup-store.js
2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// The three cold-start asset libraries for the dressup dance room
// (dev-plan.md T1; schemas: dressup-dance-room-mvcp.md M.3/M.4/M.5).
const path = require("path");
const { createStore } = require("./store.js");
const characters = createStore(path.join(__dirname, "characters.json"));
const garments = createStore(path.join(__dirname, "garments.json"));
const danceRefs = createStore(path.join(__dirname, "dance-refs.json"));
// One character can have several angle photos (front/side/back, close-ups,
// expression refs, ...) — this is the child table, filtered by characterId
// at read time (same flat-sibling-store pattern generationJobs uses for
// batchId), not nested under characters.json. Exactly one row per
// characterId has isCover: true; that image's url is mirrored onto the
// parent character's imageUrl field since every downstream consumer
// (dance generation's reference_image_urls, my-works thumbnail, admin
// list thumbnail) still expects a single image per character.
const characterImages = createStore(path.join(__dirname, "character-images.json"));
// In-flight/completed generation jobs (dev-plan.md T8/T9) — tracks a
// submission from "queued" through "generating" to "done"/"failed" so a
// restart can resume polling (h3JobId) and T9's batch UI can show progress.
// The finished *video* itself lands in library.json (M.7), not here.
const generationJobs = createStore(path.join(__dirname, "generation-jobs.json"));
// Auto-moderation results (dev-plan-4.md T26; schema M.9) — one row per
// moderateGarmentImage() call, approved or rejected, so a human can audit
// what the automated gate did even before a real vendor is picked.
const moderationLog = createStore(path.join(__dirname, "moderation-log.json"));
// Operator hand-curated blocklist (dev-plan-5.md T39; schema M.9's near
// neighbor is M.11 — a *different* table: this is manual takedowns, not
// the automated face-blacklist model (T32) or garment moderation (T26).
const blacklist = createStore(path.join(__dirname, "blacklist.json"));
// Standalone admin tool (separate from the dressup dance room pipeline
// above): one row per person-3-views + garment -> composite portrait call
// through the gpt-image-2 relay, see generateDressImage() in server.js.
const dressGenRecords = createStore(path.join(__dirname, "dress-gen.json"));
module.exports = { characters, garments, danceRefs, characterImages, generationJobs, moderationLog, blacklist, dressGenRecords };