A modern product showcase platform for HAP, a home decor and tableware brand. Built with Next.js and Supabase, the platform provides a public product catalog, detailed product pages, and a secure admin dashboard for managing inventory and featured content.
- Public homepage with a hero collage and an "Our Picks" featured section
- Full catalog with category filtering and empty/error states
- Product detail pages with image gallery, product attributes, and WhatsApp contact CTA
- Admin login and dashboard for managing products and homepage hero images
- Supabase-backed storage, auth, and database
- Next.js 15 App Router
- TypeScript
- Tailwind CSS v3
- Supabase Auth, Database, and Storage
- Google Fonts: Cormorant Garamond and DM Sans
/- homepage/catalog- all products with filters/product/[id]- product detail page/admin/login- admin sign-in/admin- admin dashboard
app/- application routes and page layoutscomponents/- shared UI and admin componentslib/supabase/- server, client, middleware, and admin Supabase clientsscripts/seed.ts- local seed scriptsupabase/migrations/- database and storage migrationstypes/database.types.ts- typed Supabase schema helpers
- Node.js 18+ recommended
- A Supabase project
- A configured admin email address
- A WhatsApp number in international format for product inquiries
Create a .env.local file in the project root with:
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
ADMIN_EMAIL=
NEXT_PUBLIC_WHATSAPP_NUMBER=Notes:
ADMIN_EMAILis the only email allowed to access/adminNEXT_PUBLIC_WHATSAPP_NUMBERshould be in the format91XXXXXXXXXX- Never expose
SUPABASE_SERVICE_ROLE_KEYin client-side code
- Install dependencies:
npm install-
Create or connect a Supabase project.
-
Apply the database migrations in
supabase/migrations/.The repo currently includes migrations for the
productstable, thehero_imagestable, RLS policies, and theproduct-imagesstorage bucket. -
Add the environment variables listed above to
.env.local. -
Seed sample products, if you want local demo data:
npm run seedThe seed script uses the service role key and exits early if products already exist.
- Start the development server:
npm run devnpm run dev- start the Next.js development servernpm run build- build the production appnpm run start- start the production servernpm run lint- run Next.js lintingnpm run seed- seed the database with sample products
id- uuid primary keyname- product namedescription- optional textprice- numeric INR pricecategory-tableware,kitchenware,crockery,cutlery, orhome_decorcolor- optional textsize- optional textmaterial- optional textimages- array of public Supabase Storage URLsin_stock- boolean, defaults totruefeatured- boolean, defaults tofalsefeatured_at- timestamp used for featured sortingcreated_at- timestamp
slot- integer primary key, values1,2, or3image_url- public Supabase Storage URLupdated_at- timestamp
- Public users can read
productsandhero_images - Authenticated users can manage data only through the admin area
- All storage uploads happen server-side with the service role key
- Admin access is checked against
ADMIN_EMAILboth at login and on protected routes
- Product cards always show the first image in the
imagesarray - The homepage featured section only renders when featured products exist
- The catalog supports category filtering and a featured-only filter
- Product inquiries open WhatsApp with a pre-filled message
- The app is designed mobile-first and uses a warm editorial visual style
This app is ready for deployment on Vercel with the environment variables above configured in the project settings.
This project was built for a home decor and tableware business to provide a dedicated product showcase platform beyond social media channels. The focus was on product discovery, visual presentation, and streamlined customer inquiries through WhatsApp.
ISC