A modern, fully responsive e-commerce storefront and admin panel built with Next.js 15, TailwindCSS, and Shadcn UI components.
- 🏪 Modern product grid layout with responsive design
- 🎨 Beautiful product cards with hover effects
- 🌙 Dark/Light theme toggle
- 📱 Mobile-responsive navigation
- 🛒 Shopping cart UI (mockup)
- 🔍 Clean, aesthetic design with Tailwind spacing and shadows
- 🔐 Simple admin authentication mockup
- 📊 Dashboard with product statistics
- 📦 Product management (view, add products)
- 📝 Product form with validation using react-hook-form and Zod
- 🎯 Admin-only routes with auth guard
- 🗂️ Sidebar navigation for admin pages
- ⚡ Next.js 15 with App Router
- 🎨 TailwindCSS for styling
- 🧩 Shadcn UI components
- 🔧 TypeScript for type safety
- 📦 Bun package manager
- 🌙 Theme switching with next-themes
- 📱 Fully responsive design
src/
├── app/
│ ├── (admin)/admin/ # Admin layout group
│ │ ├── layout.tsx # Admin sidebar layout
│ │ ├── page.tsx # Admin dashboard
│ │ ├── products/ # Products management
│ │ └── add-product/ # Add product form
│ ├── (store)/ # Store layout group
│ │ └── layout.tsx # Store navbar layout
│ ├── api/products/ # API routes
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── components/
│ ├── ui/ # Shadcn UI components
│ ├── navbar.tsx # Store navigation
│ ├── admin-sidebar.tsx # Admin sidebar
│ ├── product-card.tsx # Product display card
│ ├── auth-guard.tsx # Admin route protection
│ └── theme-provider.tsx # Theme context
└── lib/
├── auth-context.tsx # Auth state management
└── utils.ts # Utility functions
-
Install dependencies:
bun install
-
Run the development server:
bun run dev
-
Open http://localhost:3000 in your browser.
- Click the user icon in the navbar to "login" as admin
- Navigate to the admin panel via the "Admin Panel" button
- Use the sidebar to navigate between admin pages
- Login as admin
- Go to Admin Panel → Add Product
- Fill out the product form
- Submit to add the product to the catalog
GET /api/products- Fetch all productsPOST /api/products- Add a new product
Edit the CSS custom properties in src/app/globals.css to customize the color scheme.
Modify the product interface in src/app/api/products/route.ts to add more fields.
The project uses TailwindCSS with custom utility classes for consistent spacing and aesthetics.
Build the project:
bun run buildStart the production server:
bun run start- Framework: Next.js 15 (App Router)
- Styling: TailwindCSS
- UI Components: Shadcn UI
- Forms: React Hook Form + Zod validation
- Theme: next-themes
- Icons: Lucide React
- Package Manager: Bun
- Language: TypeScript
MIT License - feel free to use this template for your projects!