Commit Graph
53 Commits
Author SHA1 Message Date
mizorewww 83ac3f00ae feat: add card rotation, customer lookup, and concurrent eligibility checks
Add encrypted card pool management, persisted card and outbound rotation, and per-card decline cooldowns. Improve customer and redemption-code lookup, recovery controls, and filtering; rebuild frontend assets and refresh mock screenshots.

Give read-only eligibility checks four independent slots so payment processing no longer blocks them. Cover concurrency, slot cleanup, card rotation, and lookup behavior with tests.
2026-10-04 11:44:38 +08:00
mizorewww 92f09423c3 feat: add payment node cooldown and safe network retries 2026-10-04 01:50:08 +08:00
mizorewww 7493a72941 feat: add order recovery and per-order payment proxy pools
Add customer code lookup, single-order and batch recovery, and verified replacement checkout links with preserved payment evidence.

Add payment pause controls, persisted per-order outbound selection, proxy diagnostics, admin status, documentation, tests, and rebuilt frontend assets.
2026-10-03 21:59:14 +08:00
mizorewww 56c606ca40 feat: add pre-redemption eligibility check
POST /api/check runs the read-only X gifting-eligibility query for
a username under the shared work semaphore with its own 8/min rate
bucket, so visitors can verify their account before redeeming. The
redeem page gains an advisory check button with loading and result
states.
2026-10-03 17:29:32 +08:00
mizorewww a9589a3867 feat: extend filter expressions with NOT, inequality, and more fields
Add stackable complement operators (not/!/非), per-condition
inequality (status!=active, clickable = / ≠ toggle on canvas
tokens), and months/username conditions with - for empty values.
The palette gains duration and account groups, and full-width
operator punctuation is normalized.
2026-10-03 17:29:31 +08:00
mizorewww 99876953f9 feat: rebuild the filter as a palette token builder
The expression renders as deletable rounded-rectangle tokens on a
canvas, composed from a guarded palette of status/folder/logic
buttons, with a raw-text mode for power users. Guards prevent
invalid sequences, mid-deletions explain what broke and how to
repair it, full-width punctuation is normalized, and all actions
are announced to screen readers.
2026-10-03 16:55:57 +08:00
mizorewww a4f37555d6 feat: add client-side expression filter to the codes table
Compose folder and status conditions with and/or/parentheses in the
admin UI (typed or assembled from helper chips). In filter mode all
pages are fetched and matched client-side with local pagination, so
no backend changes are needed. Invalid expressions show precise
Chinese errors without fetching.
2026-10-03 14:16:48 +08:00
mizorewww f5f80b7d42 feat: add copyright and GitHub link footer to both pages 2026-10-03 13:13:13 +08:00
mizorewww 2ca5a5911f fix(cli): restore functional X Premium catalog defaults
The history scrub replaced the wizard's default catalog constants
with placeholders, which would write a nonfunctional catalog for
anyone accepting the defaults. Restore X's real gifting identifiers
— they are published in x.com checkout pages, not operator secrets.
2026-10-03 13:09:37 +08:00
mizorewww c8271e809f docs: add MIT license 2026-10-03 13:07:20 +08:00
mizorewww ca1a0b5316 docs: use the real clone URL now that the repo is public 2026-10-03 13:03:09 +08:00
mizorewww 01b2470dd0 docs: rewrite README as a plain-language preview and deployment guide 2026-10-03 13:02:45 +08:00
mizorewww ac712cc472 docs: add mock preview screenshots to the README 2026-10-03 12:59:00 +08:00
mizorewww 66631579ff docs: record catalog and stats redesign deployment 2026-10-03 12:50:41 +08:00
mizorewww d3246cc9bd docs: de-sensitize templates and README for open sourcing
Replace the production domain, server hostname, operator paths and
customer usernames with placeholders, document the catalog
configuration step, and mark the Caddyfile as a template.
2026-10-03 12:48:46 +08:00
mizorewww b0ce2a249c feat: make the Stripe catalog operator-configurable
Move the hardcoded merchant account, product IDs, amounts and
currency into an encrypted catalog vault record read per checkout
flow. The setup wizard offers the X Premium defaults (X's public
gifting identifiers) or a fully custom catalog, put --name catalog
updates it, and status validates it. Tests use fake catalog
fixtures instead of real identifiers.
2026-10-03 12:48:46 +08:00
mizorewww 1a0aaa3dc6 feat: redesign stats dashboard charts for readability
Replace the cramped 90-bar grouped activity chart with three
single-series small-multiple strips (created, redeemed, succeeded),
give plan and review-stage bars proper height with legends and
percentage labels, and lay the summary cards out 3x2 on desktop.
2026-10-03 12:48:45 +08:00
mizorewww 3af2466e50 docs: record stats dashboard and setup wizard deployment 2026-10-03 12:12:43 +08:00
mizorewww f18083f33e fix(cli): support repairing api-auth and stripe-key records
put --name now accepts api-auth (JSON) and stripe-key (the raw
pk_live_ key), so status failure messages can point at a working
repair path instead of the setup wizard, which refuses an existing
vault. The wizard also prints explicit recovery instructions when it
aborts after creating the vault, and validates the site origin
exactly like the web server.
2026-10-03 12:09:38 +08:00
mizorewww a8e7565448 fix(proxy): ignore services, endpoints and experimental sections
A pasted sing-box config carrying services (api/ssm-api), endpoints
(wireguard/tailscale), or experimental controllers (clash/v2ray/debug)
could bind non-loopback listeners or alter host networking once the
full include registries are enabled. Strip those sections so the
proxy record can only forward traffic; outbounds, route and dns still
pass through. Align the README outbound list (dns outbound was
removed in sing-box 1.12) and document the stripped sections.
2026-10-03 12:09:37 +08:00
mizorewww f1010921d9 docs: describe setup wizard and flexible proxy outbounds 2026-10-03 11:54:45 +08:00
mizorewww 84727ded02 feat(cli): add interactive first-time setup wizard
xgift setup guides the operator through writing X cookies and API
auth metadata, the payment card with billing details, the proxy
(direct, guided AnyTLS, or pasted sing-box JSON validated by a real
embedded start), and the Stripe publishable key into a freshly
created encrypted vault, generating the vault password to a
persistent owner-only file. It can also emit site.env and a random
admin password for the web service. Secrets are read without echo on
terminals while piped stdin stays scriptable. The status command now
also verifies the api-auth and stripe-key records.
2026-10-03 11:54:45 +08:00
mizorewww a15e6b5537 feat(proxy): accept any sing-box outbound including direct
Register the full sing-box include registries instead of the
anytls-only outbound registry so the vault proxy record may use any
core outbound type (direct, socks, http, shadowsocks, vmess, vless,
trojan, anytls, shadowtls, snell, ssh, tor, block, dns, selector or
urltest) plus route and dns sections. Reject configs without
outbounds early. The forced loopback mixed inbound and disabled log
are unchanged.
2026-10-03 11:54:31 +08:00
mizorewww a31de399ad feat: add admin statistics dashboard and polling resume
Add GET /api/admin/stats aggregating code counts, redemption and
success rates, per-plan totals, a 30-day activity series, and review
stage distribution. Render a collapsible stats panel with summary
cards and an accessible SVG bar chart on the admin page, show total
count and pages in pagination, and let users resume status polling
after the 5-minute timeout without re-redeeming.
2026-10-03 11:38:34 +08:00
mizorewww 62050a6aae docs: record checkout recovery behavior and production rollouts 2026-10-03 10:53:40 +08:00
mizorewww 2bcb1ea9a2 fix: restrict site origin access to Cloudflare proxy ranges 2026-10-03 10:53:39 +08:00
mizorewww 7162039c6d feat: resume unsubmitted review orders through explicit user action 2026-10-03 10:53:39 +08:00
mizorewww ab1096455c fix: retry transient X query failures and preserve encrypted diagnostics 2026-10-03 10:53:39 +08:00
mizorewww e422656687 fix: accept single-letter Stripe checkout routes with strict session validation 2026-10-03 10:53:38 +08:00
mizorewww 6b3d2b68da docs: record verified redemption code retention and copy backfill 2026-10-02 19:33:31 +08:00
mizorewww 8a15c6feb4 docs: record successful batch folder deployment 2026-10-02 19:30:38 +08:00
mizorewww cf2a058e77 fix: reserve batch navigation height to prevent loading layout shifts 2026-10-02 19:28:36 +08:00
mizorewww a097b6f0a6 docs: describe batch folders and persistent encrypted code copying 2026-10-02 19:27:09 +08:00
mizorewww ba162cb7d1 fix: use batch folders and explicit icon actions with row copying 2026-10-02 19:26:31 +08:00
mizorewww 1f9c1060cc fix: group codes by batch and retain encrypted codes for copying 2026-10-02 19:25:41 +08:00
mizorewww d158b0dc48 docs: record folder management validation and production rollout 2026-10-02 19:16:38 +08:00
mizorewww c06fbe466d feat: manage redemption folders from the admin dashboard 2026-10-02 19:15:18 +08:00
mizorewww 62d9e80dd5 feat: persist redemption folders and support atomic classification 2026-10-02 19:08:11 +08:00
mizorewww 07820c8f48 feat: copy newly generated redemption codes with one click 2026-10-02 19:07:26 +08:00
mizorewww abba32850c fix: keep card position stable when switching appearance 2026-10-02 19:06:22 +08:00
mizorewww 2cc8d8acde fix: centralize theme colors and use neutral gray surfaces 2026-10-02 19:04:08 +08:00
mizorewww 9e920d17d2 docs: document frontend builds audits and production deployment 2026-10-02 19:02:22 +08:00
mizorewww b4b9d2a36d feat: migrate redemption and admin UI to themed React and MUI 2026-10-02 19:02:21 +08:00
mizorewww 7c9cf4509c chore: install project frontend design and MUI skills 2026-10-02 19:02:20 +08:00
mizorewww 17c1ff34de Recover transient prepayment failures and reconcile pending gifts automatically 2026-10-02 18:27:58 +08:00
mizorewww a70168a441 Preserve gift creation failures and distinguish unsubmitted payments 2026-10-02 18:19:24 +08:00
mizorewww c94c58e4e7 Enable Cloudflare proxy and preserve trusted visitor IPs 2026-10-02 17:39:02 +08:00
mizorewww 33d4ec58d7 Remove redemption page header and footer 2026-10-02 17:19:02 +08:00
mizorewww ba271c7da2 Reconcile completed Stripe gifts and show real redemption progress 2026-10-02 17:07:22 +08:00
mizorewww 1a30b1a18f Document incomplete payment evidence and retained recipient lock 2026-10-02 16:47:30 +08:00