Tech | Next.js, PostgreSQL, Drizzle Orm, Shadcn, PayPal, Stripe |
UI | Tailwind, Shadcn, recharts |
Database | PostgreSQL, Drizzle Orm |
Payment | PayPal, Stripe |
Deployment | Github, Vercel |
Authentication | Auth.js, Google Auth, Magic Link |
Others | uploadthing, resend, zod |
https://next-pg-shadcn-ecommerce.vercel.app
- creating e-commerce website pages by next.js server components
- designing header, footer, sidebar, menu and search box by shadcn and tailwind
- quick view products in modals using nextjs parallel routes with intercepting routes
- create database models by drizzle orm and postgres database
- handling form inputs by react-hook-forms and zod data validator
- updating data by server actions without using any api
- managing shopping cart using http cookies on server side
- handling authentication and authorization by next-auth
- creating customer dashboard to update profile and track orders
- and implement a fully-functional admin dashboard with beautiful charts and handling products, orders and users
-
Clone repo
$ git clone [email protected]:basir/next-pg-shadcn-ecommerce.git $ cd next-pg-shadcn-ecommerce
-
Create .env.local File
- duplicate .env.example and rename it to .env.local
-
Setup PostgreSQL
- Vercel PostgreSQL
- Create database at https://vercel.com/docs/storage/vercel-postgres
- In .env.local file update POSTGRES_URL to db url
- OR Local PostgreSQL
- Install it from https://www.postgresql.org/download
- In .env.local file update POSTGRES_URL to db url
- Vercel PostgreSQL
-
Install and Run
npm install npm run dev
-
Seed Data
npx tsx ./db/seed
-
Admin Login
- Open http://localhost:3000
- Click Sign In button
- Enter admin email "[email protected]" and password "123456" and click Sign In
- Introduction
- Install tools
- Create next app
- create website layout
- list products
- setup drizzle orm and postgres database
- load products from database
- deploy on vercel
- create product details page
- implement authentication
- create new user
- implement add to cart
- create shopping cart page
- get shipping address
- select payment method
- place order
- create order details page
- pay order by PayPal
- create orders history page
- create user profile form
- create admin dashboard page
- list orders
- mark orders to paid and delivered
- list products
- edit products
- list users
- edit users
- add home page carousel and sidebar
- create search page
- rate and review products
- add dark and light theme
- pay order by Stripe
- email order receipt by Resend
- find shipping address on Google Map
- signin with magic link
- signin with google
Email: [email protected]