Files
orion/docs/deployment/launch-readiness.md
Samir Boulahtit c87bdfa129 feat: add configurable currency locale and fix vendor JS init
Currency Locale Configuration:
- Add platform-level storefront settings (locale, currency)
- Create PlatformSettingsService with resolution chain:
  vendor → AdminSetting → environment → hardcoded fallback
- Add storefront_locale nullable field to Vendor model
- Update shop routes to resolve and pass locale to templates
- Add window.SHOP_CONFIG for frontend JavaScript access
- Centralize formatPrice() in shop-layout.js using SHOP_CONFIG
- Remove local formatPrice functions from shop templates

Vendor JS Bug Fix:
- Fix vendorCode being null on all vendor pages
- Root cause: page components overriding init() without calling parent
- Add parent init call to 14 vendor JS files
- Add JS-013 architecture rule to prevent future regressions
- Validator now checks vendor JS files for parent init pattern

Files changed:
- New: app/services/platform_settings_service.py
- New: alembic/versions/s7a8b9c0d1e2_add_storefront_locale_to_vendors.py
- Modified: 14 vendor JS files, shop templates, validation scripts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 21:26:12 +01:00

8.0 KiB

OMS Launch Readiness Analysis

This document tracks the launch readiness status of the Order Management System (OMS).

Last Updated: 2026-01-02 Overall Status: 95% Feature Complete


Executive Summary

The OMS is nearly production ready with core order processing, invoicing, inventory management, and customer account features complete. Recent updates have added customer profile management, multiple address support, and fixed frontend authentication across all shop account pages.


Feature Completion Status

Core Order Processing (95% Complete)

Feature Status Notes
Order creation from shop Complete Full checkout flow
Order list/detail (vendor) Complete With filtering, search
Order status management Complete Full status workflow
Customer stats update Complete Updates on order placement
Cart clearing on order Complete Clears after successful order
Order confirmation email Complete Template-based emails
VAT calculation Complete Aligned with invoice logic

Invoicing System (95% Complete)

Feature Status Notes
Invoice generation Complete Auto from orders
PDF generation Complete WeasyPrint
Invoice settings Complete Per-vendor config
VAT regimes Complete Domestic, OSS, reverse charge, exempt
Customer invoice download Complete Shop order detail page

Shop Frontend (95% Complete)

Feature Status Notes
Order history Complete Customer order list
Order detail page Complete With VAT breakdown, timeline
Invoice download Complete PDF download button
Order tracking timeline Complete Visual status progression
Product catalog Complete With search, filters
Shopping cart Complete Full cart functionality
Checkout flow Complete Address, payment selection
Customer registration Complete Email-based
Customer login Complete JWT authentication
Password reset Partial Email sending TODO
Customer profile Complete Full profile management
Customer addresses Complete Multiple addresses, address book
Customer messages Complete Conversation-based messaging
Currency locale Complete Configurable platform/vendor locale

Vendor Dashboard (90% Complete)

Feature Status Notes
Order management Complete List, detail, status
Invoice management Complete Create, view, PDF
Product management Complete CRUD, images
Inventory management Complete Stock levels
Customer list Complete View, filter
Analytics Partial Basic stats
Shipping integration Partial Manual only
Returns/refunds Not Started Future feature

Admin Dashboard (90% Complete)

Feature Status Notes
Vendor management Complete Full CRUD
User management Complete Roles, permissions
Order overview Complete Cross-vendor view
System settings Complete Configuration
Marketplace sync Complete LetzShop integration
Code quality dashboard Complete Validation results

Recent Completions (January 2026)

Customer Account Features

  • Profile Management: Full customer profile API and UI
    • Profile information editing (name, email, phone)
    • Preferences management (language, marketing consent)
    • Password change functionality
    • API: GET/PUT /api/v1/shop/profile, PUT /api/v1/shop/profile/password
  • Multiple Addresses: Complete address book functionality
    • Add, edit, delete addresses
    • Set default shipping/billing addresses
    • Address type support (shipping, billing)
    • Country ISO codes for VAT calculation
    • API: Full CRUD at /api/v1/shop/addresses
  • Frontend Authentication: Fixed all shop account pages
    • Orders, messages, addresses, profile now properly authenticated
    • Token-based API calls with Authorization header
    • Proper redirect to login on 401 responses

VAT Calculation Alignment

  • Created shared VAT utility (app/utils/vat.py)
  • Added VAT fields to Order model: vat_regime, vat_rate, vat_rate_label, vat_destination_country
  • Updated order service to use vendor invoice settings
  • Full support for EU VAT regimes:
    • Domestic (same country)
    • OSS (One-Stop-Shop for B2C cross-border)
    • Reverse charge (B2B with VAT number)
    • Origin (non-OSS cross-border)
    • Exempt (non-EU sales)

Shop Order Detail Enhancements

  • Order tracking timeline with visual status progression
  • Invoice download button with auto-generation
  • VAT breakdown display in order summary
  • New API endpoint: GET /api/v1/shop/orders/{order_id}/invoice

Test Coverage

  • Unit tests for VAT utility (23 tests)
  • Integration tests for shop orders API (13 tests)
  • Integration tests for shop addresses API
  • All validation scripts fixed and passing

Configurable Currency Locale

  • Two-tier settings architecture: Platform defaults with vendor overrides
  • Resolution chain: Vendor setting → AdminSetting → Environment → Hardcoded fallback
  • Platform settings service: New PlatformSettingsService for setting resolution
  • Configuration options:
    • Environment: DEFAULT_STOREFRONT_LOCALE, DEFAULT_CURRENCY in .env
    • Admin: default_storefront_locale, default_currency in AdminSetting table
    • Vendor: storefront_locale field on Vendor model (nullable = inherit)
  • Supported locales: fr-LU, de-DE, de-LU, en-GB, nl-BE, etc.
  • Frontend: window.SHOP_CONFIG provides locale/currency to JavaScript
  • Shared formatPrice(): Single implementation in shop-layout.js

Remaining Gaps

High Priority

  1. Payment Verification - Payment gateway integration for order completion verification
  2. Email Notification System - Password reset, order updates, shipping notifications

Medium Priority

  1. Analytics Enhancement - Sales reports, revenue tracking
  2. Shipping Label Generation - Integration with shipping providers
  3. Multi-language Support - Full i18n for all templates

Low Priority

  1. Returns/Refunds - Return requests, refund processing
  2. Promotions/Discounts - Coupon codes, promotional pricing
  3. Wishlist - Customer product wishlist

Frontend Gap Summary

Admin Dashboard Gaps

Component Status Priority
Dashboard analytics Partial Medium
Bulk operations Missing Low
Export functionality Missing Low
Activity logs Partial Low

Vendor Dashboard Gaps

Component Status Priority
Revenue analytics Missing Medium
Shipping automation Missing Medium
Return management Missing Low
Promotion management Missing Low
Multi-warehouse Missing Low

Shop Frontend Gaps

Component Status Priority
Password reset email Missing High
Order tracking updates Missing Medium
Wishlist Missing Low
Reviews/ratings Missing Low
Social login Missing Low

Validation Status

All code validators pass:

Architecture Validator: PASSED
Security Validator: PASSED (with skips)
Performance Validator: PASSED (with skips)

Launch Checklist

  • Core order processing
  • Invoice generation
  • VAT calculation
  • Customer authentication
  • Order confirmation emails
  • Shop order detail page
  • Invoice download
  • Customer profile management
  • Multi-address support
  • Customer messaging
  • Payment verification integration
  • Password reset emails
  • Production deployment configuration
  • SSL certificates
  • Database backups
  • Monitoring setup

Recommendations

  1. Immediate Focus: Payment verification for order completion
  2. Short-term: Email notifications for password reset and order updates
  3. Pre-launch: Production infrastructure setup (SSL, monitoring, backups)
  4. Post-launch: Analytics enhancements and shipping integrations