alpha
Login
or
Join now
lgtm.shop
/
commerce
Star
5
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Pilot atproto-native commerce backend
Star
5
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
commerce
/
crates
/
server
/
src
/
at
main
3 folders
10 files
Nate Moore
fix(stripe): make automatic tax opt-in (was hardcoded on, broke checkout)
17hrs ago
f9c5db10
admin
feat(server): route Printful webhooks (URL token) + persist FulfillmentShipped - webhooks.rs resolves payment-then-fulfillment_by_id and passes the request query to verify_webhook; a valid Printful package_shipped marks the order's fulfillment 'shipped' and stores carrier tracking. - Update the trait's test/no-op verify_webhook impls across server + worker for the new query param. - Add route tests: valid token -> 200 + shipped; wrong token -> 400, row untouched.
2 days ago
bin
feat(server): seed via `--role seed` (no entrypoint override) Adds a one-shot `--role seed` to the server binary (migrate → seed demo store → exit) and extracts the seeder into a shared `server::seed` module the bin + role + tests all call. Dockerfile splits ENTRYPOINT ["server"] + CMD ["--role","all"], so seeding is just `docker run <image> --role seed` — retiring the `--entrypoint /usr/local/bin/seed-demo` gotcha. Drops the seed-demo binary from the image (kept as a cargo-run convenience bin). Deploy docs + prod compose updated; the integration test now exercises the real seeder.
1 week ago
routes
feat(server): buyer-scoped GET /api/orders/:id order status Storefront confirmation page needs to confirm an order reached Paid/Fulfilled without admin auth. Add a public, tenant-scoped GET /api/orders/:id returning status + totals; access is gated by possession of the opaque order_id (the UUID is the capability — guests have no session). 404 for unknown or cross-tenant ids. Status strings are returned raw: pending_payment -> Paid -> Fulfilling -> Fulfilled (plus Refunded/Canceled/Failed); www must match these exactly.
1 day ago
app.rs
feat(config): add LGTM_SHOP_URL to derive both checkout redirect URLs Stripe success/cancel redirects belong on the storefront (www), not the backend public_url. Add LGTM_SHOP_URL as the storefront base so a single var drives both redirects; falls back to public_url when unset. LGTM_CHECKOUT_SUCCESS_URL / LGTM_CHECKOUT_CANCEL_URL still override individually. Documented in .env.example and the README env table.
1 day ago
boot.rs
feat(server): printful catalog import via --role import
2 days ago
dev.rs
feat(dev): /dev/pay 303-redirects to success_url (uniform prod<->local return) Previously /dev/pay returned a terminal text page, so the fake-payments browser flow diverged from Stripe (which redirects to success_url). Now it 303s to the resolved success_url with {CHECKOUT_SESSION_ID} substituted by dev_{order_id}, so the storefront return flow is identical prod and local — no fake-mode branch needed in checkout.ts.
1 day ago
import.rs
refactor(server): name the existing-variant row type
2 days ago
lib.rs
feat(server): printful import upserts (idempotent product/variant mirror rows)
2 days ago
main.rs
feat(server): printful catalog import via --role import
2 days ago
seed.rs
feat(server): seed via `--role seed` (no entrypoint override) Adds a one-shot `--role seed` to the server binary (migrate → seed demo store → exit) and extracts the seeder into a shared `server::seed` module the bin + role + tests all call. Dockerfile splits ENTRYPOINT ["server"] + CMD ["--role","all"], so seeding is just `docker run <image> --role seed` — retiring the `--entrypoint /usr/local/bin/seed-demo` gotcha. Drops the seed-demo binary from the image (kept as a cargo-run convenience bin). Deploy docs + prod compose updated; the integration test now exercises the real seeder.
1 week ago
state.rs
fix(stripe): make automatic tax opt-in (was hardcoded on, broke checkout) Prod checkout returned 502 for every order: the handler forwards a valid session to Stripe, but the form hardcoded automatic_tax[enabled]=true, and Stripe rejects the session with a 400 ("You must have a valid head office address to enable automatic tax") unless the account has a head-office address + tax registrations. (The v0.3.1 error mapping surfaced this cleanly in the logs — it is a Stripe account-config requirement, not a crash.) Gate automatic tax behind LGTM_STRIPE_AUTOMATIC_TAX=1 (config_for["stripe"] ["automatic_tax"]), default off, so the reference impl creates checkout sessions without requiring Stripe Tax setup. Extract checkout_form() so the form (incl. the on/off tax field + non-empty product name + redirect URLs) is unit-tested.
17 hours ago
test_support.rs
fix(server): gate ALL mutating admin routes behind auth (close unauthenticated create/refund/settings bypass) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 month ago
wiring.rs
fix(checkout): make real Stripe checkout succeed (was a bare 400 for every order) With fake-payments off, every POST /api/checkout returned an empty-body 400. The real Stripe path could never succeed: place_order sent empty success_url/ cancel_url and DbVariantLookup left product_uri (used as the Stripe line-item name) empty. Stripe rejects both, and the handler swallowed the error with a bare `Err(_) => 400`, making it undebuggable from the storefront. - Thread configurable redirect URLs through place_order. New optional env vars LGTM_CHECKOUT_SUCCESS_URL / LGTM_CHECKOUT_CANCEL_URL, defaulting to {public_url}/checkout/success?session_id={CHECKOUT_SESSION_ID} and {public_url}/cart. - DbVariantLookup joins product for the real at_uri + title; carry a display name through VariantInfo -> DraftLine -> OrderItem to the Stripe line item (fallback title -> SKU -> "Item"). Name is a checkout-time snapshot, not persisted in P1. - Map checkout errors: validation/currency/not-found -> descriptive 400; missing key / provider rejection -> logged in full + generic 502, never a bare empty 400. Tests: place_order fake now asserts non-empty URLs + names are forwarded; DbVariantLookup join covered (title + SKU fallback); config default/override.
1 day ago