How ashadansari/veron works
VÉRON is a Nepal-focused clothing storefront with customer accounts and an admin console. The main customer journey is browsing the catalog, selecting product variants, maintaining a cart, and placing a server-validated Cash on Delivery order; order confirmation and account order history follow. Authentication and customer account management form a separate branch, while administrators manage catalog, inventory, orders, and store settings. The graph reflects documented product capabilities and shown imports/calls; checkout, order management, and several route implementations were not excerpted, so their links rely on README statements.
Main entry points: index.ts PostgreSQL data · admin.ts Admin actions · repository.ts Catalog reads · checkout.ts Checkout transaction
Components 31
Storefront
- Storefront pages
src/app/shop/page.tsx - Catalog reads
src/lib/catalog/repository.ts - Sample catalog
src/lib/catalog/sample-data.ts - Product views
src/app/products/[slug]/page.tsx - Cart state
src/components/storefront/cart-provider.tsx - Browser cart storage
src/components/storefront/cart-storage.ts - Checkout review
src/components/storefront/checkout-review.tsx
Identity and Accounts
- Authentication forms
src/components/auth-form.tsx - Auth endpoints
src/app/api/auth/[...all]/route.ts - Better Auth
src/lib/auth.ts - Session authorization
src/lib/authz.ts - Account management
src/lib/account-service.ts
Commerce Operations
- Order action
src/app/actions/place-order.ts - Checkout transaction
src/lib/commerce/checkout.ts - Order confirmation
src/app/order/success/[orderNumber]/page.tsx - Payment callback
src/app/api/payments/khalti/return/route.ts - Payment processing
src/lib/commerce/payment-processing.ts - Payment provider interface
src/lib/commerce/payment-provider.ts - Order management
src/lib/commerce/order-management.ts
Administration
- Admin console
src/app/admin/page.tsx - Catalog forms
src/components/admin/admin-forms.tsx - Admin actions
src/app/actions/admin.ts - Catalog administration
src/lib/admin/catalog-service.ts - Customer administration
src/lib/admin/customer-service.ts - Store settings
src/lib/admin/settings-service.ts
Persistence
- PostgreSQL data
src/db/index.ts - Commerce and auth schema
src/db/schema.ts - Prisma catalog client
src/lib/prisma.ts
Other components
- Shopper
- Customer
- Administrator
Connections 30
- Shopper → Storefront pages: browses
README.md - Storefront pages → Catalog reads: loads catalog
README.md - Catalog reads → Sample catalog: falls back
src/lib/catalog/repository.ts - Catalog reads → Prisma catalog client: queries products
src/lib/catalog/repository.ts - Shopper → Product views: selects product
README.md - Product views → Catalog reads: loads details
- Shopper → Cart state: manages cart
README.md - Cart state → Browser cart storage: stores snapshot
src/components/storefront/cart-provider.tsx - Shopper → Checkout review: reviews order
README.md - Checkout review → Order action: submits order
src/components/storefront/checkout-review.tsx - Order action → Checkout transaction: places order
src/app/actions/place-order.ts - Checkout transaction → PostgreSQL data: commits order
README.md - Checkout transaction → Payment provider interface: supports provider interface
- Shopper → Order confirmation: views confirmation
README.md - Shopper → Authentication forms: signs in
README.md - Authentication forms → Better Auth: uses auth client
src/components/auth-form.tsx - Auth endpoints → Better Auth: dispatches requests
src/app/api/auth/[...all]/route.ts - Better Auth → PostgreSQL data: persists identity
src/lib/auth.ts - Customer → Account management: manages account
README.md - Administrator → Admin console: manages store
README.md - Admin console → Session authorization: checks session
README.md - Catalog forms → Admin actions: submits changes
src/components/admin/admin-forms.tsx - Admin actions → Catalog administration: updates catalog
src/app/actions/admin.ts - Admin actions → Order management: manages orders
src/app/actions/admin.ts - Admin actions → Store settings: updates settings
src/app/actions/admin.ts - Catalog administration → PostgreSQL data: reads and writes
src/lib/admin/catalog-service.ts - Customer administration → Account management: deactivates account
src/lib/admin/customer-service.ts - Customer administration → PostgreSQL data: reads customers
src/lib/admin/customer-service.ts - PostgreSQL data → Commerce and auth schema: uses schema
src/db/index.ts - Payment callback → Payment processing: handles callback
src/app/api/payments/khalti/return/route.ts