docs: sync API and implementation status
Quality / test (push) Canceled after 0s

Document the shipped acquisition, sales, pricing, dashboard, search, public detail, and image workflows, and update the next hardening milestone.
This commit is contained in:
2026-09-09 08:47:48 -04:00
parent 88ef61353e
commit 2feb5006cb
2 changed files with 27 additions and 7 deletions
+17
View File
@@ -22,6 +22,8 @@ GET /api/v1/public/inventory/:id
GET /api/v1/public/listings GET /api/v1/public/listings
GET /api/v1/public/listings/:id GET /api/v1/public/listings/:id
GET /api/v1/public/sellers GET /api/v1/public/sellers
GET /api/v1/public/lookups/categories
GET /api/v1/public/lookups/conditions
GET /api/v1/public/currencies GET /api/v1/public/currencies
GET /api/v1/public/exchange-rates GET /api/v1/public/exchange-rates
``` ```
@@ -79,7 +81,14 @@ PATCH /api/v1/admin/inventory/:id/images/order
POST /api/v1/admin/images/:id/primary POST /api/v1/admin/images/:id/primary
DELETE /api/v1/admin/images/:id DELETE /api/v1/admin/images/:id
GET /api/v1/admin/acquisitions
POST /api/v1/admin/acquisitions
GET /api/v1/admin/sales
POST /api/v1/admin/sales POST /api/v1/admin/sales
POST /api/v1/admin/sales/:id/void
POST /api/v1/admin/pricing/observations
POST /api/v1/admin/inventory/:id/valuation
POST /api/v1/admin/inventory/:id/valuation/override
POST /api/v1/admin/bulk POST /api/v1/admin/bulk
GET /api/v1/admin/dashboard GET /api/v1/admin/dashboard
@@ -105,6 +114,14 @@ Multipart uploads require `width` and `height` fields and validate the binary
signature before storage. Publication counts persisted inventory images rather signature before storage. Publication counts persisted inventory images rather
than trusting a listing request field. than trusting a listing request field.
Acquisition, sale, pricing, and dashboard routes are seller-scoped through the
authenticated admin session. All state-changing routes require the
session-bound CSRF header. Sale creation marks owned active inventory items as
`SOLD`; voiding retains the sale record, restores the items to `ACTIVE`, and
records an audit event. Pricing observations remain private; public listing
detail exposes only the latest calculated or manually overridden market value,
condition label, and public image URLs.
## Provider matching ## Provider matching
The API must expose Product-level operations for: The API must expose Product-level operations for:
+10 -7
View File
@@ -91,9 +91,11 @@ docker context use orbstack
- Listing reads are seller-scoped and return only admin listing DTO fields. - Listing reads are seller-scoped and return only admin listing DTO fields.
- Item-owned image metadata can be added through a seller-scoped, CSRF-protected admin route; publication uses the persisted image count. - Item-owned image metadata can be added through a seller-scoped, CSRF-protected admin route; publication uses the persisted image count.
- Public search is available at `GET /api/v1/public/search` through a normalized SearchService boundary with pagination, price filters, text matching, and sold-item visibility controls. - Public search is available at `GET /api/v1/public/search` through a normalized SearchService boundary with pagination, price filters, text matching, and sold-item visibility controls.
- Public search also supports active category and condition lookup options, URL-backed filters, and allowlisted recent/price sorting.
- Public search responses include `items` plus `pagination` metadata (`page`, `limit`, `total`, and `totalPages`); pending listings are visible by default and sold listings require an explicit filter. - Public search responses include `items` plus `pagination` metadata (`page`, `limit`, `total`, and `totalPages`); pending listings are visible by default and sold listings require an explicit filter.
- Public product pages are available at `GET /api/v1/public/products/:slug`; responses use a public DTO and require an active physical item with an available or pending listing. - Public product pages are available at `GET /api/v1/public/products/:slug`; responses use a public DTO and require an active physical item with an available or pending listing.
- Public listing collection and detail reads are available at `GET /api/v1/public/listings` and `GET /api/v1/public/listings/:id`; collection responses include pagination metadata and detail reads hide internal inventory identity. - Public listing collection and detail reads are available at `GET /api/v1/public/listings` and `GET /api/v1/public/listings/:id`; collection responses include pagination metadata and detail reads hide internal inventory identity.
- Public listing detail responses include safe condition labels, latest market value, and public image URLs; unavailable image states are rendered accessibly in the gallery.
- Public inventory collection and detail reads are available at `GET /api/v1/public/inventory` and `GET /api/v1/public/inventory/:id`; responses join only active physical items to available or pending listings and exclude private item notes. - Public inventory collection and detail reads are available at `GET /api/v1/public/inventory` and `GET /api/v1/public/inventory/:id`; responses join only active physical items to available or pending listings and exclude private item notes.
- The public seller directory is available at `GET /api/v1/public/sellers`; it returns only sellers with visible inventory and exposes display identity without user or contact fields. - The public seller directory is available at `GET /api/v1/public/sellers`; it returns only sellers with visible inventory and exposes display identity without user or contact fields.
- The web workspace now has a Vue/Vite public catalog shell with Vue Router, a catalog API service, search composable, loading/error/empty states, and responsive search-first styling. - The web workspace now has a Vue/Vite public catalog shell with Vue Router, a catalog API service, search composable, loading/error/empty states, and responsive search-first styling.
@@ -105,6 +107,7 @@ docker context use orbstack
- Derivative orchestration now defines thumbnail, medium, and large WebP storage outputs behind an injected renderer; the concrete worker-backed renderer remains. - Derivative orchestration now defines thumbnail, medium, and large WebP storage outputs behind an injected renderer; the concrete worker-backed renderer remains.
- The worker owns an image derivative job runner with explicit processing, completion, and failure outcomes; queue transport and persistent job records remain. - The worker owns an image derivative job runner with explicit processing, completion, and failure outcomes; queue transport and persistent job records remain.
- Image metadata limits are enforced in the service boundary: supported MIME types, 10 MiB default file size, and 10,000-pixel maximum dimensions. - Image metadata limits are enforced in the service boundary: supported MIME types, 10 MiB default file size, and 10,000-pixel maximum dimensions.
- Acquisition, sales, dashboard, pricing observations, market valuations, audited sale voiding, and manual market-value overrides are implemented with seller-scoped API and admin UI workflows.
### Verified Baseline ### Verified Baseline
@@ -115,17 +118,17 @@ docker context use orbstack
| HTTP | Product and inventory creation, validation, authentication/recovery, CSRF, rate limiting, and session management | | HTTP | Product and inventory creation, validation, authentication/recovery, CSRF, rate limiting, and session management |
| Integration | PostgreSQL catalog/session/audit/password recovery persistence and Redis-shared login throttling | | Integration | PostgreSQL catalog/session/audit/password recovery persistence and Redis-shared login throttling |
Latest result: `npm test` passed 97 tests; worker tests passed 2 tests; `npm run test:integration` passed 18 tests against OrbStack PostgreSQL and Redis. Latest result: API, web, build, Storybook build, and Storybook interaction/accessibility checks pass locally. The authenticated E2E workflow covers acquisition, image upload, pricing, listing publication, sale recording, dashboard loading, and audited sale voiding.
## Next Milestone ## Next Milestone
Continue the public catalog boundary before starting the web UI. Complete operational hardening around the implemented vertical slices.
1. Add public inventory/listing detail and collection endpoints around the existing SearchService. 1. Add integration coverage for the latest acquisition, sales, pricing, and dashboard migrations.
2. Add public catalog response pagination metadata and stable product URL handling. 2. Document and verify CI execution of integration, E2E, and Storybook gates.
3. Begin Vue public catalog and admin workflow foundations after the API read boundary is complete. 3. Add provider adapters and asynchronous pricing refresh jobs behind the existing pricing boundary.
Acceptance criteria: public reads expose only visible inventory and product fields while admin listing reads and lifecycle writes preserve seller ownership, CSRF, inventory status, and publication prerequisites. Acceptance criteria: public DTOs remain private-data-safe, migrations apply to clean test databases, and CI runs the same meaningful gates used for local vertical-slice validation.
## Overall Roadmap ## Overall Roadmap
@@ -145,7 +148,7 @@ Work through one bounded vertical slice at a time. The linked documentation rema
- No initial User/Seller is provisioned in the development database yet. Run `npm run provision:admin` after setting its required local `.env` variables. - No initial User/Seller is provisioned in the development database yet. Run `npm run provision:admin` after setting its required local `.env` variables.
- Listings are partially implemented: draft creation, seller-scoped reads, publication gating, lifecycle writes, archive behavior, sold/archived inventory checks, and item-owned image metadata are complete; storage-backed processing remains. - Listings are partially implemented: draft creation, seller-scoped reads, publication gating, lifecycle writes, archive behavior, sold/archived inventory checks, and item-owned image metadata are complete; storage-backed processing remains.
- Sales and acquisition domain foundations, concrete image rendering, normalized search, public API reads beyond the catalog, queue transport, persistent worker jobs, fuller web UI, CI, and deployment services remain incomplete to varying degrees. - Concrete provider adapters, asynchronous pricing refresh transport, richer exports/settings, full integration CI services, and deployment/backup automation remain incomplete to varying degrees.
- `npm install` currently reports dependency audit findings. Review and remediate them before production deployment; do not use `npm audit fix --force` without reviewing its changes. - `npm install` currently reports dependency audit findings. Review and remediate them before production deployment; do not use `npm audit fix --force` without reviewing its changes.
## Local Commands ## Local Commands