Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
840 commits
Select commit Hold shift + click to select a range
454f0e7
feat(licenses): upgrade banner for Custom plan
mvriu5 Aug 20, 2026
54e7b3e
feat(licenses): withdrawal notice
mvriu5 Aug 20, 2026
0ce6056
feat(docs): update
mvriu5 Aug 20, 2026
ec16ac9
feat(licenses): show all license in sidebar everytime
mvriu5 Aug 20, 2026
d42080b
feat(licenses): use scultpor dialog layout
mvriu5 Aug 20, 2026
f53fe43
feat(licenses): show customer in license detail apge
mvriu5 Aug 20, 2026
c1eb92f
feat(licenses): add features in upgrade dialog
mvriu5 Aug 20, 2026
2a89c4a
feat(licenses): manage subscription payment methods
mvriu5 Oct 17, 2026
bf04366
feat(security): add csp
mvriu5 Aug 20, 2026
bdcdfbf
feat(security): move csp to proxy and add nonce
mvriu5 Aug 20, 2026
d724781
feat(security): static security headers
mvriu5 Aug 20, 2026
59a449a
feat(security): create rate limit policies
mvriu5 Aug 20, 2026
530508f
feat(security): ratelimit key
mvriu5 Aug 20, 2026
69800cf
feat(security): apply ratelimiter
mvriu5 Aug 20, 2026
2a10606
feat(security): security logging
mvriu5 Aug 20, 2026
19a9888
feat(security): add missing tests
mvriu5 Aug 20, 2026
638394b
feat(licenses): download license button
mvriu5 Oct 17, 2026
a694c10
feat(checkout): show upgrade banner only in pro plan
mvriu5 Aug 21, 2026
228e3e6
feat(checkout): sucsess page, add button for download license an go to
mvriu5 Aug 21, 2026
524ea16
feat(licenses): change license filetype to .czlc
mvriu5 Aug 21, 2026
d5bc34e
feat(checkout): send offer dialog
mvriu5 Aug 21, 2026
62fb10d
feat(licenses): show license history
mvriu5 Aug 21, 2026
4baee45
feat(licesnes): show upgrad banner in licensedetailpage & improve
mvriu5 Aug 21, 2026
6a54050
feat(checkout): improve upgradeplanbanner style
mvriu5 Aug 21, 2026
590c64f
feat(licenses): remove license history
mvriu5 Aug 21, 2026
4606fc6
feat(checkout): checkout pricing overview & remove checkout stepper
mvriu5 Aug 21, 2026
9311619
feat(checkout): improve switch style
mvriu5 Aug 21, 2026
2d2fd6f
feat(checkout): remove upgrade banner
mvriu5 Aug 21, 2026
a0f7865
feat(checkout): improve stripe checkout payment form styling
mvriu5 Aug 21, 2026
02dd307
feat(checkout): send offer button reworked
mvriu5 Aug 21, 2026
95541a8
feat(checkout): show checkout pricing overview in success page
mvriu5 Aug 21, 2026
8d90c59
feat: move to pictor switch style
mvriu5 Oct 17, 2026
dc6fa96
feat(checkout): remove unnecessary global fields
mvriu5 Aug 21, 2026
e210257
ferat(checkout): improve checkoutoverview pricing font style
mvriu5 Aug 21, 2026
249aa15
fix(checkout): discount apply to stripe session
mvriu5 Aug 21, 2026
954f0a6
feat(checkout): draft checkout billing data to prevent refilling inputs
mvriu5 Aug 21, 2026
d96b947
feat(checkout): improve dicount apply experience
mvriu5 Oct 17, 2026
cc1522f
feat(checkout): safe checkout data and fill it after reload
mvriu5 Aug 21, 2026
64b2098
feat(checkout): improve success apge with real stripe validated price
mvriu5 Oct 17, 2026
f6b864a
fix(licenses): show access end date after subscription cancel
mvriu5 Aug 22, 2026
e4abe8b
feat(checkout): change payment methods to horizontal
mvriu5 Aug 22, 2026
f511532
feat(licenses): add payment method list
mvriu5 Oct 17, 2026
a40de2a
feat(licenses): show error if payment method is in use when deleted
mvriu5 Aug 24, 2026
df0b0b8
feat(licenses): customer license table max height & scrollarea
mvriu5 Aug 24, 2026
e5f4d26
feat(licenses): add secure namespace selection flow
mvriu5 Aug 25, 2026
7856fa9
feat(licenses): improve namespace connection flow
mvriu5 Aug 25, 2026
c1f2bfc
fix(checkout): knip issues
mvriu5 Aug 26, 2026
8f0b1be
feat(licenses): remove comment
mvriu5 Aug 26, 2026
4a7df34
feat(billing): remove weekly payment period support
mvriu5 Oct 17, 2026
6099393
feat(checkout): remove calculateTax
mvriu5 Sep 11, 2026
0142a48
feat(checkout): change checkoutCreateSession types
mvriu5 Sep 11, 2026
553f13e
feat(checkout): applied new discount fields
mvriu5 Sep 11, 2026
58e5600
feat(cehckout): remove payment method detach & add payment methods to
mvriu5 Sep 11, 2026
a8a0e70
feat(checkout): remove customer draft flow & apply CustomerType enum
mvriu5 Sep 11, 2026
9ea840d
feat(licenses): remove license download filename
mvriu5 Sep 11, 2026
bcc9575
feat(subscriptions): manage the payment method through
mvriu5 Sep 11, 2026
2bffd0c
feat(checkout): adjust customerCreate after cratter changes
mvriu5 Sep 11, 2026
7106603
feat(checkout): use new crater graphql types
mvriu5 Oct 17, 2026
2aed292
fix(checkout): remove tax elements from payment form
mvriu5 Sep 11, 2026
c6f3144
feat(licenses): add payment method query to get payment method
mvriu5 Oct 17, 2026
5fffc3f
feat(checkout): normalize enum values
mvriu5 Sep 14, 2026
3f0b5ea
feat(checkout): skip the login step for a signed-in browser
mvriu5 Sep 14, 2026
ea82c9f
fix(licenses): show a load error when payment methods fail to load
mvriu5 Sep 14, 2026
383e944
feat(checkout): add guest login
mvriu5 Oct 17, 2026
d0924c5
feat(checkout): adopt to crater schema changes
mvriu5 Sep 17, 2026
c31ff33
fix(licenses): remove current payment method from payment method list
mvriu5 Sep 17, 2026
1c96379
feat(checkout): isolate guest sessions and improve guest purchase flow
mvriu5 Sep 19, 2026
b800145
fix(checkout): guest login label placement
mvriu5 Sep 19, 2026
bd476dc
refactor(checkout): organize subscription and license code
mvriu5 Oct 17, 2026
531096d
refactor(checkout): organize subscription and license code
mvriu5 Sep 19, 2026
bca0d07
refactor(licenses): split dashboard service and reuse payment hooks
mvriu5 Sep 19, 2026
4f41b54
feat(licenses): improve background & add primary sidebar
mvriu5 Sep 20, 2026
df0f37b
feat(licenses): rework license page & dialog ui
mvriu5 Sep 20, 2026
89ff409
feat(licenses): improve customer & dashboard page
mvriu5 Sep 20, 2026
ff8ef21
fix(licenses): url pattern without graphql path
mvriu5 Sep 27, 2026
6c3622e
fix(licenses): status dot color
mvriu5 Sep 27, 2026
c5016e8
feat(licenses): filter & sort in tables
mvriu5 Sep 27, 2026
18a4587
feat(licenses): remove customer & license detail page heading &
mvriu5 Sep 27, 2026
42bc6e3
feat(licenses): customer link in license detail page
mvriu5 Sep 27, 2026
6bfb75a
feat(licenses): license detail page button group
mvriu5 Sep 27, 2026
56bcef6
feat(licenses): improve customer edit dialog style
mvriu5 Sep 27, 2026
e5cbf49
feat(licenses): invoice preview
mvriu5 Sep 27, 2026
a959fb1
feat(licenses): remove dashboard page
mvriu5 Sep 27, 2026
04f5ddf
feat(licenses): remove upgradeplanbanner & add sidebar components
mvriu5 Sep 27, 2026
5a192dc
feat(licenses): move license upgrade dialog to license edit dialog as
mvriu5 Sep 27, 2026
a69b3ee
feat(licenses): add table pagination
mvriu5 Sep 29, 2026
0826432
feat(licenses): improve sidebar sizing & remove license count badge
mvriu5 Sep 29, 2026
f2de9a2
fix(licenses): sidebar text sizes
mvriu5 Sep 29, 2026
a87fb60
feat(licenses): remove customer card in license & add button re go back
mvriu5 Sep 30, 2026
1105673
feat(licenses): remove plan icon & add deployment icon
mvriu5 Sep 30, 2026
b256ca1
feat(licenses): improve card dividers
mvriu5 Sep 30, 2026
1b057d4
feat(licenses): improve sidebar license buttons
mvriu5 Sep 30, 2026
2d3ec48
feat(licenses): change billing period to billing date in license
mvriu5 Sep 30, 2026
0746af2
feat(licenses): cleanup license detail page status dot
mvriu5 Sep 30, 2026
0434763
feat(licenses): improve sidebar menu & edit dialogs
mvriu5 Sep 30, 2026
eaf1bd2
feat(licenses): remove logout button in sidebar
mvriu5 Sep 30, 2026
bd48230
feat(licenses): improve payment status by switching from dot to badge
mvriu5 Sep 30, 2026
769f771
feat(licenses): use pictor tab components & improve dialog layout
mvriu5 Sep 30, 2026
51d82df
feat(licenses): improve license dialog layouts
mvriu5 Oct 1, 2026
8a763f8
feat(licenses): add missing cms fields & remove unused
mvriu5 Oct 1, 2026
cbca8e3
deps: update crater graphql types
mvriu5 Oct 17, 2026
96a2ee4
feat(licenses): make customerId required, add usage packages
mvriu5 Oct 2, 2026
7453dd7
feat(checkout): animate package slider
mvriu5 Oct 2, 2026
d01dbb1
feat(checkout): remove discount route & handle discount with stripe
mvriu5 Oct 3, 2026
98d8f86
feat(licenses): complete subscription dashboard migration
mvriu5 Oct 3, 2026
2f639e0
feat(licenses): complete subscription dashboard migration
mvriu5 Oct 3, 2026
587f5a3
refactor(billing): simplify payment methods and handle namespace
mvriu5 Oct 3, 2026
f5c9b2f
fix(licenses): open correct license after checkout
mvriu5 Oct 3, 2026
2d28aaa
refactor(licenses): cancellation texts
mvriu5 Oct 3, 2026
a5c6fc7
fix(checkout): input styles
mvriu5 Oct 4, 2026
c30ebea
fix: remove outdated deployment enum changes from action list migration
mvriu5 Oct 4, 2026
d58bbae
fix: knip issues
mvriu5 Oct 4, 2026
62593fc
refactor: centralized crater values file
mvriu5 Oct 4, 2026
405490e
Create values.ts
mvriu5 Oct 4, 2026
1a9e5a4
refactor: editSections& new crater error file
mvriu5 Oct 4, 2026
a8d291d
refactor: checkout client
mvriu5 Oct 4, 2026
7916c65
refactor: move crater logic files from checkout to crater folder
mvriu5 Oct 4, 2026
b655356
refactor: licenseCount to subscriptionCount
mvriu5 Oct 4, 2026
d7cc816
refactor: subsctription & license lib folders
mvriu5 Oct 17, 2026
b568724
refactor: tests
mvriu5 Oct 4, 2026
b64f7a6
fix(checkout): package slider line prop
mvriu5 Oct 4, 2026
b8de67e
refactor(licenses): improve sidebar styles to match sculptor
mvriu5 Oct 4, 2026
c7eebb3
refactor: checkout components
mvriu5 Oct 4, 2026
b5f95f7
refactor(licenses): seperate fetching from components
mvriu5 Oct 4, 2026
b16b3b4
refactor: license components
mvriu5 Oct 4, 2026
5615349
feat(checkout): use new product lookup ids
mvriu5 Oct 4, 2026
f51fc38
fix(licenses): bind license to namespace after subscription
mvriu5 Oct 5, 2026
aa470d3
feat: add payloadServerUrl env variable for runtime
mvriu5 Oct 5, 2026
3b34bc3
fix: use payload server url when resolving siteUrl
mvriu5 Oct 6, 2026
6c63a9b
feat(subscription): remove auto scroll on select in configurator
mvriu5 Oct 6, 2026
82eff0b
fix: use runtime public origin for auth redirects and media URLs
mvriu5 Oct 6, 2026
f6b30c5
fix: remove & rename env variables
mvriu5 Oct 9, 2026
585cf51
fix(licenses): clarify payment method setup dialog copy
mvriu5 Oct 9, 2026
30081e5
feat(subscription): use craters package quantities
mvriu5 Oct 17, 2026
174ce33
feat: improve CheckoutSuccessPage animation
mvriu5 Oct 9, 2026
128aeb0
fix(subscription): plan package quantities display & month suffix in
mvriu5 Oct 9, 2026
4274287
ifx: remove existing next_public enviroment variables
mvriu5 Oct 9, 2026
94323ac
feat: use env variables for suclptorUrls and remove from payload
mvriu5 Oct 10, 2026
b7d932b
feat(licenses): add namespace name & immediate cancellation
mvriu5 Oct 17, 2026
ee1ecce
feat(licenses): improve cancel dialog
mvriu5 Oct 10, 2026
12ade6e
refactor(checkout): checkout status completion
mvriu5 Oct 10, 2026
dc25078
refactor(licenses): re-export intercepted modal pages from their route
mvriu5 Oct 10, 2026
74ca852
refactor(crater): share session and mutation handling across api routes
mvriu5 Oct 11, 2026
f66d1ad
refactor(stripe): share one appearance between checkout and payment
mvriu5 Oct 11, 2026
c10edff
refactor(cms): derive global content types from payload-types and add
mvriu5 Oct 11, 2026
b8875a8
refactor(globals): add localizedText field helper for localized CMS copy
mvriu5 Oct 11, 2026
bdaca3f
feat(cms): require subscription config fields and derive its type from
mvriu5 Oct 11, 2026
518d90c
fix: checkout login callback use env
mvriu5 Oct 11, 2026
0ec0a70
feat(checkout): add confetti on checkout success
mvriu5 Oct 11, 2026
77ba4c8
fix(checkout): without session or configuration return the user to
mvriu5 Oct 11, 2026
f6100c2
fix(security): key rate limits by trusted client IP only
mvriu5 Oct 11, 2026
099fff5
fix(security): rate limit requests without a trusted client IP
mvriu5 Oct 11, 2026
c728019
fix(security): bind Sagittarius login callbacks to a login state
mvriu5 Oct 11, 2026
f3ae99a
fix(security): validate guest emails, add HSTS and Permissions-Policy
mvriu5 Oct 11, 2026
2a3a2ac
feat(checkout): skip the login choice for a valid account session
mvriu5 Oct 11, 2026
eab9484
feat(licenses): confirm immediate cancellation before submitting
mvriu5 Oct 11, 2026
cfd579b
fix(checkout): avoid nested button in success page links
mvriu5 Oct 11, 2026
1c13a4d
fix(checkout): keep the guest session after a failed payment
mvriu5 Oct 11, 2026
ff0ba47
fix(seo): keep checkout and license routes out of search indexes
mvriu5 Oct 11, 2026
c6bb92d
feat(licenses): log in through Sculptor instead of an empty dashboard
mvriu5 Oct 11, 2026
51a2870
fix(licenses): stretch sidebar menu items across the full menu width
mvriu5 Oct 11, 2026
12abf4c
feat(checkout): show the purchased plan as a badge on the success page
mvriu5 Oct 11, 2026
2954ad6
feat(licenses): improve sidebar loading state
mvriu5 Oct 12, 2026
f17ee40
feat: add billing descriptions and pending change notes to license di…
nicosammito Oct 12, 2026
b4488c8
feat(licenses): improve no namespace warning in license page
mvriu5 Oct 12, 2026
9a60387
chore: stop exporting module-internal login state and usage package
mvriu5 Oct 12, 2026
555e2fa
feat(licenses): simplify license detail page by removing unused route…
nicosammito Oct 12, 2026
b733177
feat(licenses): enhance LicenseDetailPage and LicenseSidebar with dow…
nicosammito Oct 12, 2026
51253d8
feat(licenses): add LicenseAlert component and integrate it into Lice…
nicosammito Oct 12, 2026
d43e479
feat(licenses): add sidebar download license label and update related…
nicosammito Oct 12, 2026
61be3a1
feat(licenses): remove payment section from license edit dialog and r…
nicosammito Oct 13, 2026
6d1ae89
feat(licenses): refactor LicenseUpgradeDialog and related components …
nicosammito Oct 13, 2026
39c90f1
feat: main sidebar items open in a new tab
mvriu5 Oct 13, 2026
06b6b24
feat(licenses): add customer overiew page & only show customers licenses
mvriu5 Oct 13, 2026
557336e
fix(licenses): add table skeletons and button-shaped sidebar skeletons
mvriu5 Oct 13, 2026
c297cdf
refactor(licenses): remove the edit button from the customer page
mvriu5 Oct 13, 2026
239b78e
fix(checkout): redirect existing cloud sessions to namespace selection
mvriu5 Oct 13, 2026
89d2801
chore: change percentage opacity colors to / tailwind
mvriu5 Oct 14, 2026
45cfa0d
feat(licenses): integrate checkout packages into LicenseEditDialog an…
nicosammito Oct 13, 2026
314817c
feat(licenses): add invoice selection functionality and prevent actio…
nicosammito Oct 13, 2026
b273510
feat(licenses): reorder LicenseUpgradeButton in LicenseSidebar for im…
nicosammito Oct 13, 2026
4d3f303
feat(licenses): enhance payment period selection with pending update …
nicosammito Oct 13, 2026
79daa0f
feat(licenses): add cancellation status descriptions and update licen…
nicosammito Oct 13, 2026
1a6cadd
feat(licenses): add LicenseBackToCustomerButton to LicenseSidebar for…
nicosammito Oct 13, 2026
621dc37
fix(licenses): show not-found page when dashboard loading fails
mvriu5 Oct 14, 2026
2a15b67
feat(licenses): add toasts
mvriu5 Oct 17, 2026
9d16c14
feat(licenses): add upgrade dialog skeletons
mvriu5 Oct 15, 2026
2bc6a69
fix: migration add canceled description field
mvriu5 Oct 15, 2026
cae6cf1
feat: show monthly savings with configurable CMS label and crossed-out
mvriu5 Oct 16, 2026
7c39d2b
fix: initialize valid usage quantities when switching to custom plan
mvriu5 Oct 16, 2026
91385c1
fix: validate required customer details with Pictor useForm
mvriu5 Oct 16, 2026
cfd5207
fix: show CMS placeholder instead of Crater ID for missing invoice
mvriu5 Oct 16, 2026
cc0ac72
feat(licenses): sign in with the Sculptor link token and support
mvriu5 Oct 16, 2026
de307f4
fix(checkout): snap summary usage quantities onto Crater checkout
mvriu5 Oct 16, 2026
c7506e5
refactor(licenses): new dialog design
mvriu5 Oct 16, 2026
8ad71c8
refactor(licenses): align primary sidebar with Sculptor's
mvriu5 Oct 16, 2026
6f41fca
test: share the GraphQL test server helper and condense validation tests
mvriu5 Oct 16, 2026
65695cc
chore(cms): remove the unused upgrade banner global and dead global
mvriu5 Oct 16, 2026
ccc56cd
feat(cms): group cubscriptioNConfig global
mvriu5 Oct 16, 2026
eeff79f
feat(cms): group license & licenseDialog globals
mvriu5 Oct 16, 2026
fb35ad1
Merge branch 'feat/crater-implementation' of https://github.com/code0…
mvriu5 Oct 17, 2026
906c601
fix(crater): remove unused login route without login-state binding
mvriu5 Oct 17, 2026
85eb036
fix(security): key untrusted rate limits by subject and flag missing
mvriu5 Oct 17, 2026
6426a26
fix(security): rate limit customer, payment method, subscription and
mvriu5 Oct 17, 2026
9efae34
fix(security): look up invoice PDFs through the session instead of a
mvriu5 Oct 17, 2026
6126cbe
fix(checkout): prune stale guest checkout cookies before adding a new
mvriu5 Oct 17, 2026
a5d191b
fix: prevent stale payment method lists from detaching newly added cards
mvriu5 Oct 17, 2026
e80c570
fix(checkout): show delayed fulfillment state with CMS-managed copy
mvriu5 Oct 18, 2026
dfe1980
fix(auth): clear local session cookies when Crater logout fails
mvriu5 Oct 18, 2026
bb74a8d
fix(auth): clear checkout contact drafts on logout
mvriu5 Oct 18, 2026
4a13bcb
fix(billing): use shared email validation for customer creation
mvriu5 Oct 18, 2026
18bd11a
fix(checkout): display CMS error messages instead of backend diagnostics
mvriu5 Oct 18, 2026
cb4565f
fix(auth): prevent login CSRF through license access links
mvriu5 Oct 18, 2026
ade3cb0
refactor(crater): share route helpers while keeping request flows
mvriu5 Oct 18, 2026
f2b78d1
fix(checkout): reject zero and negative quantities before calling Crater
mvriu5 Oct 18, 2026
5621465
fix(billing): remove duplicate error alerts and close payment method
mvriu5 Oct 18, 2026
5bb95bb
fix(billing): retry loading payment methods after checkout to avoid
mvriu5 Oct 18, 2026
a07c2d5
fix: payload nodemailer bug
mvriu5 Oct 19, 2026
f446830
fix: payload large identifiers
mvriu5 Oct 19, 2026
7509572
fix: wrong table primary keys
mvriu5 Oct 21, 2026
c0ae760
fix(checkout): adress select background
mvriu5 Oct 24, 2026
046bf17
feat(checkout): add custom scrollarea
mvriu5 Oct 24, 2026
bb66b5a
fix(checkout): display inclusive tax with CMS-managed labels
mvriu5 Oct 24, 2026
90b7e3a
feat: use pictor dialog
mvriu5 Oct 24, 2026
8afa51d
feat: add full button width in dialogs
mvriu5 Oct 24, 2026
c3300a5
feat: use pictor segemented control
mvriu5 Oct 24, 2026
8d47acb
feat: use pictor alert
mvriu5 Oct 24, 2026
32bd83a
feat(cehckout): go to error page when checkout fails
mvriu5 Oct 24, 2026
cd5255f
fix(checkout): validate customerType & deploymentType
mvriu5 Oct 24, 2026
1c73284
feat: add dialog close
mvriu5 Oct 24, 2026
b4f45d0
fix(checkout): revalidate sessions when returning to inactive tabs
mvriu5 Oct 24, 2026
4e164e1
fix: license dialog segmentedControl focus
mvriu5 Oct 25, 2026
e3dc1cd
fix: segmentedControl padding in dialogs
mvriu5 Oct 25, 2026
974701e
feat: reduct packageslider logic and improve visiblity of steps
mvriu5 Oct 25, 2026
ef34217
feat(subscription): adjust workflow calculator to use packageslider
mvriu5 Oct 25, 2026
b48aa90
feat(subscription): show buy button & price everytime
mvriu5 Oct 25, 2026
8a3b4eb
feat(subscription): improve configurator
mvriu5 Oct 25, 2026
3eec56a
feat(subscription): add missing price csm fields in configurator
mvriu5 Oct 25, 2026
6f6d35e
fix(licenses): readable past-due and orange canceled status badges
mvriu5 Oct 25, 2026
ca4108e
fix(licenses): restore custom namespace warning row in license dialog
mvriu5 Oct 26, 2026
33b7fd1
fix(checkout): keep legal footer at the bottom inside the scroll area
mvriu5 Oct 26, 2026
2134053
feat(licenses): highlight the open license title in the sidebar
mvriu5 Oct 27, 2026
d964199
feat(licenses): remove application settings button from primary sidebar
mvriu5 Oct 27, 2026
d5e7c83
feat(licenses): show active license counts and customer type badges in
mvriu5 Oct 27, 2026
d865236
Update LicenseIndexPage.tsx
mvriu5 Oct 27, 2026
8ca5b8e
feat(licenses): announce scheduled subscription changes in a separate
mvriu5 Oct 27, 2026
7b64ee2
fix(payload): refresh schema snapshot for the latest migrations
mvriu5 Oct 27, 2026
3e22460
feat(subscription): show the price per payment period above the buy
mvriu5 Oct 30, 2026
958deeb
feat(subscription): category colors and relative option prices in the
mvriu5 Oct 30, 2026
7debd47
fix(payload): missing migration
mvriu5 Oct 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 8 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Build-Time
NEXT_PUBLIC_APP_URL=https://localhost:3000
NEXT_PUBLIC_GA_MEASUREMENT_ID=G-XXXXXXXXXX
GA_MEASUREMENT_ID=G-XXXXXXXXXX
STRIPE_PUBLIC_KEY=pk_test_example

# Build/Run-Time
DATABASE_URL=postgresql://user:1234@localhost:5432/payload
PAYLOAD_SECRET=secret_key
PAYLOAD_USER_PASS=test_password123
ACTIONS_IMPORT_SECRET=secret_import_key

# Run-Time
CRATER_GRAPHQL_URL=https://api.example.com/graphql

SERVER_URL=http://localhost:3000
SCULPTOR_URL=http://localhost:3001
SCULPTOR_LOGIN_URL=http://localhost:3001/redirect

SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USER=your-smtp-user
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ jobs:
env:
PAYLOAD_SECRET: build-secret
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/payload
NEXT_PUBLIC_APP_URL: https://codezero.build
NEXT_PUBLIC_GA_MEASUREMENT_ID: G-55EJVGDCLZ
SERVER_URL: https://codezero.build

steps:
- uses: actions/checkout@v7
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.next-dev-*.log

# local env files
.env*.local
Expand Down
62 changes: 62 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Project Instructions

These instructions apply to the entire repository.

## Billing and Payment Service

Crater is the billing service used by this project. Before changing any code
related to billing, customers, authentication sessions, checkout, discounts,
taxes, subscriptions, invoices, or licenses, read `docs/crater.md` completely.
Treat that document as the primary project-level summary of the Crater API and
domain model.

If more detail is required, consult the source documentation referenced by
`docs/crater.md`, especially the GraphQL schema documentation and database ERD.
Do not infer undocumented fields, mutation arguments, authentication headers,
or response shapes.

## Crater Integration Rules

- Access Crater through its GraphQL API using the Apollo client in
`src/lib/apolloClient.ts`.
- Keep Crater requests on the server unless a task explicitly requires
client-side access and exposing that access is known to be safe.
- Keep API URLs, tokens, session credentials, Stripe secrets, and other
sensitive values in environment variables. Never hard-code or commit them.
- Use the Crater user session produced by `usersLogin` where an authenticated
operation requires it. A Sagittarius token is an input to login, not a
substitute for assumptions about Crater session authentication.
- Use the exact GraphQL types, argument names, nullability, and response fields
documented by Crater.
- Handle both transport-level GraphQL errors and the non-null `errors` field
returned by mutation payloads.
- Preserve and surface documented Crater error codes where useful. Do not
reduce all domain failures to a generic checkout error.
- Send monetary amounts as integers in the smallest currency unit. Do not use
floating-point values for amounts transferred to Crater.
- Treat checkout tax quotes as non-binding previews.
- For `checkoutCreateSession`, use either a regular plan checkout or a custom
checkout configuration as documented. Do not combine their semantics.
- Only send `namespaceId` for cloud deployments.
- Use the checkout redirect URL returned by Crater. Do not recreate Crater's
Stripe Checkout Session directly in this application unless the architecture
is explicitly changed.
- Do not duplicate subscription, invoice, license, or Stripe webhook state that
is owned by Crater without a documented application requirement.
- Avoid sharing cached customer or payment data between requests. Use
`no-cache` for sensitive or request-specific Apollo operations when
appropriate.

## Implementation and Verification

- Keep GraphQL operations close to the relevant billing integration code and
give operations descriptive names.
- Add explicit TypeScript types for operation variables and relevant response
data unless generated GraphQL types are available.
- Validate required environment variables and return safe errors that do not
expose credentials or sensitive payment information.
- After changing TypeScript code, run `npm run typecheck`.
- Add or update focused tests when changing billing calculations, request
mapping, error handling, or checkout behavior.
- Do not modify generated Payload files or migrations unless the requested
change requires a schema or database change.
38 changes: 38 additions & 0 deletions docs/checkout-testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Checkout testing

Run the automated checkout suite first:

```sh
npm run test:checkout
```

The automated suite covers B2C and B2B customer payloads, required contact and tax fields, incomplete and complete Stripe billing addresses, successful and failed confirmation results, discount session replacement, return identifiers, component remounts, and API error rendering.

## Stripe sandbox verification

Use only Stripe sandbox keys and synthetic test data. Start the application with a sandbox Crater instance and complete each scenario through the real Stripe Elements UI.

For every scenario, verify that the browser returns to the localized `/checkout/success?session_id=cs_...` URL, the success page accepts the return identifier, and access is not granted until Crater processes the verified Stripe webhook.

| Scenario | Test data and expected result |
| --- | --- |
| B2C card | Use card `4242 4242 4242 4242`, any future expiry, any CVC, and a complete billing address. Confirmation succeeds and returns to the success page. |
| B2B card | Enter company contact data and a sandbox-valid tax ID, then use card `4242 4242 4242 4242`. The Customer and resulting subscription retain the business customer type. |
| Incomplete address | Leave a required Stripe address field empty. The Payment Element and Payment step remain unavailable. |
| Completed address | Complete all required address fields. The Payment Element appears and the stepper advances to Payment. |
| 3D Secure | Use card `4000 0000 0000 3220`, complete the sandbox authentication challenge, and verify the return to the success page. Repeat once by failing the challenge and verify that no success or entitlement is produced. |
| Redirect method | Enable a redirect-based sandbox payment method such as iDEAL for the Stripe account, authorize it on Stripe's test page, and verify the return URL. Repeat its failure path. |
| Discount | Apply the configured sandbox promotion code before payment. Change and remove it after Elements loads and verify that a new Checkout Session is mounted with the updated total each time. |
| Reload | Reload before confirmation. The local form safely restarts and does not display an unverified success state. |
| Decline | Use card `4000 0000 0000 9995` and verify that Stripe's error is shown without advancing to success. |

Finally, verify in Stripe and Crater that the completed Checkout Session, webhook event, subscription projection, and license state all reference the same customer and checkout configuration.
# Guest checkout isolation

The login choice is always displayed, including for signed-in self-hosted buyers. Guest creation never replaces the account session. Each purchase gets a random `guestCheckout` URL identifier and its own encrypted HttpOnly browser-session cookie. The identifier is not a credential. The existing `PAYLOAD_SECRET` seals the cookie; it must be configured and consistent across application instances.

Guest checkout access has an absolute 24-hour deadline, even if the browser restores session cookies. Requests select the purchase explicitly, so account pages and other tabs retain their own identity. Missing or expired guest credentials never fall back to account credentials. Guest form drafts use sessionStorage, and contain no credentials.

On Crater's verified `READY` response, the cookie loses its profile claim and checkout permissions. For at most another 30 minutes (bounded by the original deadline), it permits only the purchase confirmation and download of the returned license. Reloading does not extend this deadline. A `FAILED` checkout clears the guest cookie; expired cookies are cleared on the next request. Starting another guest purchase also removes expired or unreadable guest cookies and keeps at most five purchases per browser, dropping the oldest, so repeated attempts cannot overflow the Cookie header. No guest is automatically linked to the signed-in account, and the guest confirmation does not link to that account's license dashboard. Profile claiming/account linking remains a separate explicit flow.

Manual checks: keep an account dashboard open, purchase as a guest in another tab, reload checkout, complete a redirect-based payment, download the license, and verify that the original dashboard still uses the account. Repeat with two guest purchases in separate tabs and with an expired guest cookie.
Loading
Loading