Skip to content

mikemaz-dev/next-pizza

Repository files navigation

πŸ• NextPizza β€” DodoPizza Clone with Next.js

A full-featured pizza delivery web application inspired by DodoPizza, built with modern web technologies and demonstrating real-world e-commerce functionality.

Deployed on Vercel Next.js TypeScript Prisma

πŸš€ Live Demo

Visit the live application: https://next-pizza-7zt4-nine.vercel.app/

πŸ“± Live Preview

NextPizza Application Screenshot

NextPizza's modern interface featuring product filtering, pizza selection, and detailed ingredient information

πŸ“‹ About

NextPizza is a comprehensive pizza delivery platform that replicates the functionality of DodoPizza. Built with Next.js 14 and modern web technologies, it showcases advanced e-commerce features including server-side rendering, authentication, payment processing, and real-time notifications.

✨ Features

  • πŸ” Advanced Product Filtering - Server-side rendering with URI-based filter state
  • πŸ›’ Smart Cart Management - Add, remove, and modify products with real-time updates
  • πŸ” Multi-Provider Authentication - Email/password, GitHub, and Google OAuth integration
  • βœ… Email Verification System - Confirmation emails and order notifications
  • πŸ‘€ User Profile Management - Complete profile editing and order history
  • πŸ• Dynamic Product Views - Modal windows and parallel routes for product details
  • πŸ’³ Secure Checkout Process - Integrated payment processing and order management
  • πŸ“± Responsive Design - Optimized for all device sizes
  • πŸš€ High Performance - Server components and optimized loading
  • πŸ”” Real-time Notifications - Toast messages and email alerts

πŸ› οΈ Tech Stack

Next.js
Next.js 14
React
React
TypeScript
TypeScript
TailwindCSS
Tailwind CSS
Prisma
Prisma
PostgreSQL
PostgreSQL
NextAuth.js
NextAuth.js
Vercel
Vercel

πŸƒβ€β™‚οΈ Getting Started

Prerequisites

  • Node.js 18+ installed on your machine
  • PostgreSQL database (local or hosted)
  • GitHub and Google OAuth applications (for social login)

Installation

  1. Clone the repository

    git clone https://github.com/mikemaz-dev/next-pizza.git
    cd next-pizza
  2. Install dependencies

    npm install
  3. Set up environment variables

    Create a .env.local file in the root directory:

    # Database
    POSTGRES_URL="your_postgres_connection_string"
    POSTGRES_URL_NON_POOLING="your_postgres_non_pooling_string"
    
    # Authentication
    NEXTAUTH_SECRET="your_nextauth_secret"
    NEXT_PUBLIC_API_URL="http://localhost:3000"
    
    # OAuth Providers
    GITHUB_ID="your_github_oauth_id"
    GITHUB_SECRET="your_github_oauth_secret"
    GOOGLE_CLIENT_ID="your_google_oauth_id"
    GOOGLE_CLIENT_SECRET="your_google_oauth_secret"
    
    # Email Service
    RESEND_API_KEY="your_resend_api_key"
  4. Set up the database

    npx prisma generate
    npx prisma db push
    npx prisma db seed
  5. Start the development server

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

πŸ“ Project Structure

next-pizza/
β”œβ”€β”€ app/                  # Next.js App Router
β”‚   β”œβ”€β”€ (auth)/           # Authentication routes
β”‚   β”œβ”€β”€ (dashboard)/      # Dashboard routes
β”‚   β”œβ”€β”€ api/              # API routes
β”‚   └── globals.css       # Global styles
β”œβ”€β”€ components/           # Reusable components
β”œβ”€β”€ lib/                  # Utility functions
β”œβ”€β”€ prisma/               # Database schema and migrations
β”œβ”€β”€ public/               # Static assets
β”œβ”€β”€ types/                # TypeScript type definitions
β”œβ”€β”€ .env.local            # Environment variables
β”œβ”€β”€ next.config.js        # Next.js configuration
β”œβ”€β”€ tailwind.config.js    # Tailwind CSS configuration
└── tsconfig.json         # TypeScript configuration

πŸ”§ Development

Database Operations

# Generate Prisma client
npx prisma generate

# Push schema changes
npx prisma db push

# View database in Prisma Studio
npx prisma studio

# Reset database
npx prisma db reset

Building for Production

npm run build
npm start

πŸš€ Deployment

The application is deployed on Vercel with the following setup:

  1. Database: PostgreSQL hosted on Vercel Postgres
  2. Environment Variables: Configured in Vercel dashboard
  3. Automatic Deployments: Connected to GitHub for CI/CD

Deploy to Vercel

  1. Push your code to GitHub
  2. Connect your repository to Vercel
  3. Configure environment variables in Vercel dashboard
  4. Deploy automatically on every push to main branch

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

πŸ“ Recent Updates

  • βœ… Implemented server-side product filtering with URI state
  • βœ… Built comprehensive cart and checkout system
  • βœ… Integrated multi-provider authentication (GitHub, Google)
  • βœ… Added email confirmation and notification system
  • βœ… Created user profile management interface
  • βœ… Implemented modal and parallel route product views
  • βœ… Set up PostgreSQL database with Prisma ORM
  • βœ… Deployed to Vercel with automatic CI/CD

πŸ™ Acknowledgments

  • Inspired by DodoPizza for the design and functionality
  • Thanks to the Next.js team for the amazing framework
  • Vercel for providing excellent hosting and database services
  • The open-source community for the incredible tools and libraries

⭐ If you found this project helpful, please consider giving it a star!

About

πŸ• NextPizza β€” modern full-stack pizza delivery app with seamless UX and secure auth, Built on Next.js 14 + Prisma

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages