feat: establish auth listing and image vertical slices

Includes MFA-capable authentication, session and CSRF security, password recovery, listing lifecycle and ownership rules, inventory image metadata, local ImageStorage, migrations, tests, and implementation status documentation. Verification: npm test (62 passing) and integration suite (14 passing).
This commit is contained in:
2026-09-08 17:32:03 -04:00
commit c728016dec
128 changed files with 9788 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
CREATE TYPE "listing_status" AS ENUM ('DRAFT', 'AVAILABLE', 'PENDING', 'CLOSED', 'ARCHIVED');
CREATE TABLE "listings" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"inventory_item_id" uuid NOT NULL REFERENCES "inventory_items"("id"),
"product_name" text NOT NULL,
"category_id" uuid NOT NULL,
"condition_id" uuid NOT NULL REFERENCES "conditions"("id"),
"asking_price_minor" integer NOT NULL,
"status" "listing_status" DEFAULT 'DRAFT' NOT NULL,
"notes" text,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
);
CREATE INDEX "listings_inventory_item_id_index" ON "listings" ("inventory_item_id");
CREATE INDEX "listings_status_index" ON "listings" ("status");