Skip to content

Repository files navigation

Luxury Dishes E-commerce Website

A premium e-commerce platform for luxury dishes and fine dining essentials, built with Next.js 14, TypeScript, and Tailwind CSS.

Features

Customer Features

  • 🏠 Beautiful Homepage - Elegant hero section with featured categories
  • 🛍️ Product Catalog - Browse products by categories with search and filtering
  • 🛒 Shopping Cart - Add products to cart and manage quantities
  • 👤 User Authentication - Secure login and registration system
  • 💳 Checkout Process - Streamlined payment and order completion
  • 📱 Responsive Design - Mobile-first design that works on all devices

Admin Features

  • 📊 Dashboard - Overview of sales, products, and customer statistics
  • 🛠️ Product Management - Full CRUD operations for products
  • 🏷️ Category Management - Organize products into categories
  • 📸 Image Upload - Upload and manage product images
  • 💰 Sale Management - Set sale prices and end dates for products
  • 📦 Order Management - View and manage customer orders
  • 📈 Analytics - Sales and performance insights

Tech Stack

  • Framework: Next.js 14 with App Router
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Database: Prisma with SQLite (easily switchable to PostgreSQL/MySQL)
  • Authentication: NextAuth.js
  • Icons: Lucide React
  • Forms: React Hook Form with Zod validation
  • Notifications: React Hot Toast
  • Image Upload: Cloudinary integration

Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

  1. Clone the repository

    git clone <repository-url>
    cd luxury-dishes-ecommerce
  2. Install dependencies

    npm install
  3. Set up environment variables Create a .env.local file in the root directory:

    DATABASE_URL="file:./dev.db"
    NEXTAUTH_SECRET="your-secret-key-here"
    NEXTAUTH_URL="http://localhost:3000"
    CLOUDINARY_CLOUD_NAME="your-cloud-name"
    CLOUDINARY_API_KEY="your-api-key"
    CLOUDINARY_API_SECRET="your-api-secret"
  4. Set up the database

    npx prisma generate
    npx prisma db push
  5. Run the development server

    npm run dev
  6. Open your browser Navigate to http://localhost:3000

Project Structure

luxury-dishes-ecommerce/
├── app/                    # Next.js App Router
│   ├── admin/             # Admin pages
│   │   ├── page.tsx       # Admin dashboard
│   │   └── products/      # Product management
│   ├── api/               # API routes
│   │   └── products/      # Product API endpoints
│   ├── globals.css        # Global styles
│   ├── layout.tsx         # Root layout
│   └── page.tsx           # Homepage
├── components/            # Reusable components
│   ├── Header.tsx         # Navigation header
│   └── Footer.tsx         # Site footer
├── lib/                   # Utility libraries
│   └── prisma.ts          # Prisma client
├── prisma/                # Database schema
│   └── schema.prisma      # Prisma schema
└── public/                # Static assets

Database Schema

The application uses the following main entities:

  • User: Customer accounts and authentication
  • Product: Product information, pricing, and inventory
  • Category: Product categorization
  • Order: Customer orders and order items
  • OrderItem: Individual items within orders

API Endpoints

Products

  • GET /api/products - Get all products with filtering
  • POST /api/products - Create a new product
  • GET /api/products/[id] - Get a specific product
  • PUT /api/products/[id] - Update a product
  • DELETE /api/products/[id] - Delete a product

Admin Access

To access the admin panel:

  1. Navigate to /admin
  2. Use the default admin credentials (you'll need to create an admin user first)

Deployment

Vercel (Recommended)

  1. Push your code to GitHub
  2. Connect your repository to Vercel
  3. Add environment variables in Vercel dashboard
  4. Deploy

Other Platforms

The application can be deployed to any platform that supports Next.js:

  • Netlify
  • Railway
  • DigitalOcean App Platform
  • AWS Amplify

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support, email support@luxurydishes.com or create an issue in the repository.

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Packages

Contributors

Languages