# Changelog

## Unreleased

### Added
- Prisma-backed checkout with real order creation
- guest checkout success page at `/checkout/success`
- public order tracking at `/order-status`
- order lifecycle timeline for customers and admins
- coupon support in checkout with validation and discount preview
- saved-address prefilling for signed-in checkout
- inventory deduction on order placement
- inventory restoration / re-reservation during admin order lifecycle changes
- admin reports hub at `/admin/reports`
- CSV exports for dashboard, orders, inventory, and reviews
- admin bulk actions for products, reviews, and coupons
- admin dashboard widgets for revenue pulse, order mix, attention queues, and top products
- local QA checklist in `docs/local-qa-checklist.md`
- Windows sync checklist in `docs/windows-sync-checklist.md`
- known limitations document in `docs/known-limitations.md`
- checkout shipping method selection with Standard, Express, and Priority options
- fulfillment tracking fields for carrier, tracking number, delivery estimates, and milestone dates
- customer-facing shipment visibility on account order details and guest order lookup
- PDF invoice downloads for admin, account orders, and guest order lookup
- PDF packing slip download for admin order fulfillment
- print-friendly HTML quote, proforma, invoice, credit note, and packing slip views
- admin document settings page for company identity, branding polish, numbering, footers, and email defaults
- persistent quote, proforma, invoice, credit note, and packing slip numbering on orders
- credit note PDF generation for refunded or cancelled orders
- quote and proforma PDF generation for admin, account orders, and guest tracking
- actual SMTP-or-local document email delivery with order email logs and manual admin send actions
- refund-aware finance workflow with refund amount and reason tracking
- warranty card PDF and print views with serial and warranty coverage fields
- embedded PDF logo support for branded documents
- admin email templates page for quote, proforma, invoice, and credit note emails
- final release / handoff checklist document for laptop sync and sign-off
- quick sync commands sheet for fastest Windows laptop setup
- Telegram phone alerts for new customer checkouts
- customer lifecycle emails for confirmed and on-the-way updates
- admin notification toggles page for Telegram new-order alerts and automatic customer lifecycle emails

### Changed
- README now reflects the real current DarkZone app rather than the earlier starter-only scope
- environment examples now include `NEXT_PUBLIC_APP_URL` and upload configuration values
- deployment notes now reflect the current local-first / `prisma db push` workflow
- checkout UX now supports client-side validation, live coupon interactions, and shipping-method-aware totals

### Fixed
- multiple Next.js 15 `params` / `searchParams` typing issues across app routes
- sitemap build safety when `DATABASE_URL` is not present
- missing cart helper for bundle add-to-cart flow
- coupon archive state wiring between UI and backend actions
- admin order inventory shortage handling when reopening orders
