How meriemchm/chm_admin_e-commerce_website works
This is a multi-store e-commerce administration app built with Next.js, Prisma, and Clerk, with Stripe checkout support. The main workflow is a store administrator managing catalog and store settings through dashboard pages backed by store-scoped API routes and Prisma; orders and dashboard metrics provide operational visibility. Checkout and payment confirmation form a separate transaction path. The tree and README document broad capabilities, but many route implementations were not sampled, so those links are omitted or marked unverified rather than inferred.
Main entry points: prismadb.ts Prisma database · webhook/route.ts Payment webhook · stripe.ts Stripe payments · checkout/route.ts Checkout endpoint
Components 18
Identity and Stores
- Clerk auth
- Sign-in and signup
app/(auth)/(routes) - Store entry and switching
app/(root)/(routes)/page.tsx - Store API
app/api/stores
Store Administration
- Dashboard shell
app/(dashboard)/[storeId]/(routes) - Catalog management UI
app/(dashboard)/[storeId]/(routes)/products/components/client.tsx - Catalog APIs
app/api/[storeId]/products/route.tsx - Catalog attributes APIs
app/api/[storeId] - Billboard management UI
app/(dashboard)/[storeId]/(routes)/billboards/components/client.tsx - Store settings
app/(dashboard)/[storeId]/(routes)/settings - Reusable data table
components/ui/data-table.tsx
Commerce Operations
- Order management UI
app/(dashboard)/[storeId]/(routes)/orders - Dashboard metrics
actions/get-graph-revenue.ts - Checkout endpoint
app/api/[storeId]/checkout/route.ts - Payment webhook
app/api/webhook/route.ts
Persistence and Integrations
- Stripe payments
lib/stripe.ts - Prisma database
lib/prismadb.ts
Other components
- Store administrator
Connections 15
- Store administrator → Sign-in and signup: signs in
README.md - Sign-in and signup → Clerk auth: authenticates with
README.md - Store administrator → Dashboard shell: manages store
README.md - Store entry and switching → Store API: selects store
- Catalog management UI → Reusable data table: renders
app/(dashboard)/[storeId]/(routes)/products/components/client.tsx - Billboard management UI → Reusable data table: renders
app/(dashboard)/[storeId]/(routes)/billboards/components/client.tsx - Catalog APIs → Prisma database: reads and writes
app/api/[storeId]/products/route.tsx - Catalog attributes APIs → Prisma database: persists entities
app/api/[storeId]/categories/route.tsx - Store API → Prisma database: reads and writes
app/api/stores/route.ts - Dashboard metrics → Prisma database: queries metrics
actions/get-graph-revenue.ts - Checkout endpoint → Prisma database: creates order
app/api/[storeId]/checkout/route.ts - Checkout endpoint → Stripe payments: starts payment
app/api/[storeId]/checkout/route.ts - Stripe payments → Payment webhook: confirms payment
app/api/webhook/route.ts - Payment webhook → Stripe payments: verifies event
app/api/webhook/route.ts - Payment webhook → Prisma database: updates order and products
app/api/webhook/route.ts