How vivek-kanjariya/deepceramics works
Purpose and Runtime
Deepceramics is a Next.js App Router site for a ceramics/tile catalog, product content, inquiry/contact capture, blog publishing, and internal administration. It runs as a Node/Next application, with route handlers serving backend endpoints. Deployment is compatible with Vercel per the starter README. Primary application shell and root entry points are src/app/layout.js, src/app/layout.tsx, and src/app/page.jsx.
Public Site and Catalog
The public experience centers on homepage content, tile browsing/detail pages, product pages, blog, contact, and gallery. Catalog navigation flows from route pages into tile/product data endpoints and rendering components. Key routes are src/app/tiles/[slug]/page.jsx, src/app/products/page.tsx, and src/app/products/[slug]/page.js; gallery has a separate root-level route at gallery/page.js.
Content Management Boundary
Sanity is the CMS for blog-oriented content, including posts, authors, categories, and rich block content. The embedded Sanity Studio is exposed under the Next app, letting editors manage schemas without a separate frontend. CMS access and schema composition are defined by src/sanity/lib/client.ts, src/sanity/schemaTypes/index.ts, and src/app/studio/[[...tool]]/page.tsx.
Tile Data, Upload, and Administration
An authenticated admin area supports dashboarding, tile management, individual uploads, and bulk uploads. Tile persistence/access is abstracted behind API and library boundaries rather than embedded directly in pages. Primary control points are src/app/admin/layout.jsx, src/app/admin/tiles/page.jsx, src/app/api/tiles/route.js, and src/lib/uploadTile.js. Database integrations are present for MongoDB and Supabase in src/lib/mongodb.js and src/lib/supabase.js; the tree does not establish which is authoritative for each domain.
Leads and Contact Flow
Contact and inquiry UI submit to server-side route handlers, keeping external delivery or persistence concerns off the client. The contact page has its own content/client split, while shared inquiry capture is reusable in catalog contexts. Relevant boundaries are src/app/contact/page.jsx, src/app/contact/api/route.js, src/app/api/contact/route.js, and src/components/inquiry/InquiryForm.jsx.
Analytics Pipeline
Client analytics are collected through a tracker/hook and sent to route handlers for page views, search, filters, tile views, and quote events. There are duplicate-looking endpoint trees under TEMP/analytics and its nested analytics directory, suggesting generated, transitional, or alternate route placement rather than a clean canonical API surface. Core client components are src/components/AnalyticsTracker.jsx and src/hooks/useAnalytics.js; representative handlers are TEMP/analytics/pageview/route.js and TEMP/analytics/analytics/search/route.js.
Cross-Cutting Delivery and Access
The shared layout supplies global styling and common navigation/footer UI; context coordinates application-wide client state. Middleware likely enforces routing or admin access policies. SEO is generated through App Router metadata endpoints. Architectural paths include src/app/globals.css, src/components/Navbar.jsx, src/context/MasterContext.jsx, middleware.js, src/app/sitemap.js, and src/app/robots.js.
Main entry points: route.js Tile API · layout.js App shell · page.jsx Catalog routes · AnalyticsTracker.jsx Analytics client
Components 20
Public experience
- App shell · Provides shared styling and global UI.
src/app/layout.js - Navigation & state
src/components/Navbar.jsx - Catalog routes · Tile listing/detail and product browsing pages.
src/app/tiles/[slug]/page.jsx - Product detail
src/app/products/[slug]/page.js - Gallery
gallery/page.js - Inquiry form · Reusable quote and inquiry capture.
src/components/inquiry/InquiryForm.jsx - Contact page
src/app/contact/page.jsx - SEO metadata · Generates sitemap and crawler directives.
src/app/sitemap.js
Content & administration
- Admin area · Dashboard, tile management, and uploads.
src/app/admin/layout.jsx - Tile upload service · Handles individual and bulk tile uploads.
src/lib/uploadTile.js - Sanity Studio · Editor interface for blog content.
src/app/studio/[[...tool]]/page.tsx - Sanity schemas · Posts, authors, categories, and rich content.
src/sanity/schemaTypes/index.ts
Server boundaries
- Tile API · Abstracts tile persistence and retrieval.
src/app/api/tiles/route.js - Contact endpoints · Server-side delivery or persistence boundary for contact submissions.
src/app/api/contact/route.js - MongoDB integration · Domain authority is not established.
src/lib/mongodb.js - Supabase integration · Domain authority is not established.
src/lib/supabase.js - Middleware · Likely applies routing or admin access controls.
middleware.js
Analytics
- Analytics client · Captures page, search, filter, tile-view, and quote events.
src/components/AnalyticsTracker.jsx - Pageview handler · Alternate or transitional analytics endpoint tree.
TEMP/analytics/pageview/route.js - Search handler · Nested duplicate-looking analytics endpoint.
TEMP/analytics/analytics/search/route.js
Connections 19
- App shell → Navigation & state: renders
- App shell → Catalog routes: hosts
- App shell → Analytics client: initializes
- App shell → SEO metadata: publishes
- Catalog routes → Product detail: navigates to
- Catalog routes → Inquiry form: embeds
- Catalog routes → Tile API: loads tiles
- Gallery → Tile API: uses catalog data
- Contact page → Inquiry form: uses
- Inquiry form → Contact endpoints: submits
- Admin area → Tile upload service: manages uploads
- Admin area → Tile API: manages tiles
- Middleware → Admin area: guards
- Tile upload service → Tile API: persists through
- Tile API → MongoDB integration: may use
- Tile API → Supabase integration: may use
- Sanity Studio → Sanity schemas: loads schemas
- Analytics client → Pageview handler: sends page views
- Analytics client → Search handler: sends search events