Commit Graph

15 Commits

Author SHA1 Message Date
0a6015b154 fix: Scrolling in detail view didnt work after the rework, this now works 2026-03-14 17:24:21 +01:00
cb2225f1aa update: reworked the handling of account tab to use bubbleteas viewport. it didnt work - yet 2026-03-14 01:20:21 +01:00
404ef31c52 some commits 2026-03-07 18:57:39 +01:00
d6db7e7c8f added some tests. mostly written by claude code 2026-03-03 08:44:47 +01:00
163790092e feat: save cart to database
the cart gets pushed to the database so that if you quit you can quickly
resume with the cart you had before you left
2026-03-02 22:52:11 +01:00
14c0e9ac8b patch: update order history after new order
when making a new order it wouldnt immediately pop up in the order
history in the account tab, you would have to close the connection and
ssh into the server again to see the order. this is now fixed and will
update immediately after ordering
2026-03-02 20:49:10 +01:00
bad11358da feat: view previous order details in account tab
feat: view previous order details in account tab

in the account tab you could view previous orders and how much they cost
but not the entire order and what got ordered and so on.

this is not added where you can go and click on a previous order and get
all the info about that order
2026-03-02 20:41:05 +01:00
f6ca8836c9 feat: added Bring address validation for Norwegian addresses 2026-03-01 20:52:36 +01:00
92d5c46e19 revert and update: reverted shippo logic and changed error msg in TUI
a while back i made shippo skip "validate" addresses that didnt
specifically fail the validation process. this meant that addresses
outside the us worked as long as they didnt specifically return false.
this is now reverted to test actual validaion.

also changed some error messages in the TUI so that the entire message
type is not also printed, just the message
2026-02-28 22:26:01 +01:00
18c7a93e0b feat: implement server-side cart persistance with Stripe PaymentIntents
feat: implement server-side cart persistence with Stripe PaymentIntents

Replaced the client-only in-mem cart with a database-backed cart system

- Add Cart and CartItem GORM models (two-table design)
- Add 6 cart API endpoints (get, set item, set address, set card, clear,
conver)
- Switch from Stripe Charge API to PaymentIntents with confirm:true
- Add 9 API client methods for cart and card operations
- Refactor TUI cart from map[int] (slice index) to map[uint] (CoffeeID)
- Replace single-shot checkout with saveCardAndConvert multi-step flow
- Add CheckingOut state with "submitting order..." processing indicator
- Fix Stripe tokenization to use secret key for server-side SSH apps
- Remove admin product CRUD endpoints and old checkout handler
2026-02-28 15:01:06 +01:00
6097b8c863 rework: added shipping validation at address creation
the last implementation just accepted any input for the shipping
validation and then only validated the address on payment. this is now
changed to validation upon creation upon finishing the shipping address
form.

when a user completes the shipping form, a client-side check is first
made to just simply check if there are any empty fields, if this check
passes it gets check server-side by shippo. If the address is not found
it will return an address not found error, and the user will not be able
to continue to the payment form. The invalid address will also not be
saved to the database.

if the check pass, we simply save the address to the database with an
ID. this ID is then passe in when doing the payment, instead of
validating at the payment phase.

this implementation currently only uses Shippo, which i have come to
realize does NOT support shipping in countries outside of the US (i
should have read the friendly manual before using Shippo). This means
that a huge rewrite is due.

i will focus on adding address validation for Norway first since thats
where i live. i plan on using Bring's api for this validation. i will
still keep Shippo for US based address verification even though this
project is focused fon nordic shipping - just for a rainy day if some
poor soul decides to order from AMERICA
2026-02-26 16:32:48 +01:00
7ebc5b24de updating the ui fr 2026-02-26 10:16:57 +01:00
7f07394537 something 2026-02-24 15:35:32 +01:00
59cd90b6a9 something 2026-02-23 19:51:13 +01:00
f62b28d29b first commit after chaning git structure on pc 2026-02-16 11:42:43 +01:00