|
|
5cb0f48db7
|
feat: full-product round 2 — auth end-to-end + commerce engines
- apps/api: public /v1/auth routes (register/login/magic-link/session/logout) via
@settlekit/auth, AuthService in context, signed sk_session cookie; existing
api-key guard untouched (14 api tests intact).
- apps/dashboard + apps/portal: real login/signup UIs (password + magic-link),
httpOnly session cookie via route handlers, server session helpers, sign-out.
- packages: fleshed refunds, dunning (retry schedules), disputes (state machine),
payouts (settlement + available-balance) into real engines with stores+services.
Verified: full build 0 TS errors; 591 tests pass; live auth flow
(register->login->session->magic-link->bad-login 401) confirmed end-to-end.
|
2026-06-15 17:06:29 +03:00 |
|
|
|
f7c9cd735d
|
feat(escrow): Postgres persistence for the full escrow lifecycle
- add missing escrow_refunds + escrow_reviews tables (schema + migration 0001)
- seed a default customer (DEFAULT_CUSTOMER_ID) to satisfy buyer_customer_id FK
- PgEscrowStore: document-projection over all 7 escrow tables; deterministic
per-task ids for idempotent sub-record upserts; listTasks filters docs by org
- wire escrow to Postgres in context (in-memory fallback retained)
Verified live: create->fund->assign->submit->approve->release persists rows in
escrow_tasks/fundings/submissions/reviews/releases; documents round-trip (real
buyerCustomerId in __doc, FK-safe default projected). 50 tables; 590 tests pass.
Remaining in-memory in Postgres mode (deep FK chains / no clean table fit):
saas seats (subscription FK), agent usage (agent_buyers FK), file-download
grants + agent reputation (no backing table).
|
2026-06-15 12:04:32 +03:00 |
|
|
|
286b1d4adc
|
feat(api): Postgres persistence + real integration/secrets wiring
Persistence (selected by DATABASE_URL; in-memory fallback otherwise):
- document-projection pattern (codec): canonical entity in metadata.__doc,
typed columns projected for querying — lossless round-trip despite schema drift.
- async EntityStore<T> (in-memory + Postgres) for products/prices/customers/
delivery-runs/webhooks/github+discord records.
- Pg adapters for packaged stores: checkout/payment/subscription repositories,
entitlements, license keys, api keys, saas plans, bundles, agent services.
- seedDefaults() upserts the default org+merchant to satisfy merchant_id FKs.
- context.ts selects Pg vs in-memory; routes awaited end-to-end.
- drizzle migration 0000_init.sql (48 tables) + db:generate/migrate scripts.
Integrations (config/env.ts + config/integrations.ts + wiring/delivery-clients.ts):
- env-driven secrets for Arc/Circle/GitHub/Discord/Resend/S3, partial-group
validation via ConfigError.
- real delivery clients + Arc x402 verifier when configured; in-memory fallback.
Verified: full purchase->entitlement flow run against a live Postgres 16
(rows persisted + documents round-trip); 590 in-memory tests still pass; 0 TS errors.
x402: pinned-nonce support already added earlier enables stateless verify.
|
2026-06-15 11:50:50 +03:00 |
|