How dhruval12098/admin-hod works
This is a Next.js jewelry-commerce administration application. Staff manage products against a configurable catalog, edit storefront content, and review orders and operational records. The principal workflow is product administration: staff use dashboard editors, API routes authenticate and validate changes, catalog-link helpers maintain related selections, and Supabase stores records. Separate branches cover CMS publishing and order-status updates. The tree documents broad capabilities, while sampled source confirms selected product, catalog, settings, media, and order interactions; unsampled route wiring is represented only at the documented subsystem level.
Main entry points: admin-supabase.ts Supabase · bootstrap/route.ts Catalog API · cms-auth.ts Admin authorization · products/route.ts Product API
Components 23
Admin workspace
- Dashboard
app/dashboard/page.tsx - Order dashboard
app/dashboard/orders/orders-client.tsx - Order operations
app/api/orders/[id]/route.ts
Product operations
- Product editors
app/dashboard/products/products-client.tsx - Product form
components/product-form.tsx - Product API
app/api/products/route.ts - Product detail API
app/api/products/[id]/route.ts - Slug editor API
app/api/products/by-slug/[slug]/route.ts - Catalog links
lib/product-catalog-links.ts - Editor data loader
lib/product-editor-data.ts - Product media
app/api/products/media/route.ts
Catalog management
- Catalog dashboard
app/dashboard/catalog/catalog-client.tsx - Category editor
app/dashboard/catalog/[slug]/page-client.tsx - Catalog API
app/api/catalog/bootstrap/route.ts - Hierarchy operations
lib/catalog-hierarchy-save.ts - Catalog masters
lib/catalog-master-save.ts
Storefront content
- CMS editors
app/dashboard/cms/page.tsx - CMS APIs
app/api/cms/home/hiphop/route.ts
Persistence and integrations
- Admin authorization
lib/cms-auth.ts - Supabase
lib/admin-supabase.ts - R2 media storage
lib/r2.ts - Email delivery
lib/email.ts
Other components
- Admin staff
Connections 34
- Admin staff → Dashboard: uses
- Dashboard → Product editors: opens
- Product editors → Product form: edits
- Product editors → Product API: requests
- Product form → Product API: submits
- Product API → Admin authorization: authorizes
- Product detail API → Admin authorization: authorizes
- Slug editor API → Admin authorization: authorizes
- Product API → Catalog links: replaces links
- Product detail API → Catalog links: loads and replaces
- Slug editor API → Editor data loader: loads editor item
- Slug editor API → Catalog links: replaces links
- Product API → Supabase: reads and writes
- Product detail API → Supabase: reads and writes
- Slug editor API → Supabase: reads and writes
- Product editors → Product media: uploads
- Product media → Admin authorization: authorizes
- Product media → Supabase: stores images
- Product media → R2 media storage: stores videos
- Admin staff → Catalog dashboard: manages catalog
- Catalog dashboard → Catalog API: loads catalog
- Category editor → Catalog API: updates hierarchy
- Catalog API → Admin authorization: authorizes
- Catalog API → Hierarchy operations: loads hierarchy
- Catalog API → Catalog masters: loads masters
- Catalog API → Supabase: reads catalog
- Admin staff → CMS editors: edits content
- CMS editors → CMS APIs: requests content
- CMS APIs → Supabase: reads and writes
- Admin staff → Order dashboard: reviews orders
- Order dashboard → Order operations: requests updates
- Order operations → Admin authorization: authorizes
- Order operations → Supabase: loads and updates
- Order operations → Email delivery: sends status update