{"id":15687105,"url":"https://github.com/basir/next-pg-shadcn-ecommerce","last_synced_at":"2025-05-07T17:01:51.246Z","repository":{"id":239866513,"uuid":"799115232","full_name":"basir/next-pg-shadcn-ecommerce","owner":"basir","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-13T10:43:57.000Z","size":2249,"stargazers_count":75,"open_issues_count":7,"forks_count":24,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-20T00:38:13.692Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://next-pg-shadcn-ecommerce.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/basir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-11T08:15:52.000Z","updated_at":"2025-04-13T22:24:26.000Z","dependencies_parsed_at":"2024-05-30T06:49:27.684Z","dependency_job_id":"3fa50ed5-8c19-4828-a005-b2422b5cc2e9","html_url":"https://github.com/basir/next-pg-shadcn-ecommerce","commit_stats":null,"previous_names":["basir/next-pg-shadcn-ecommerce"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basir%2Fnext-pg-shadcn-ecommerce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basir%2Fnext-pg-shadcn-ecommerce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basir%2Fnext-pg-shadcn-ecommerce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basir%2Fnext-pg-shadcn-ecommerce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basir","download_url":"https://codeload.github.com/basir/next-pg-shadcn-ecommerce/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252921996,"owners_count":21825632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T17:43:26.176Z","updated_at":"2025-05-07T17:01:51.211Z","avatar_url":"https://github.com/basir.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Build Full-ECommerce Website By Next.js, Drizzle, PostgreSQL ORM and Shadcn\n\n|                |                                                          |\n| -------------- | -------------------------------------------------------- |\n| Tech           | Next.js, PostgreSQL, Drizzle Orm, Shadcn, PayPal, Stripe |\n| UI             | Tailwind, Shadcn, recharts                               |\n| Database       | PostgreSQL, Drizzle Orm                                  |\n| Payment        | PayPal, Stripe                                           |\n| Deployment     | Github, Vercel                                           |\n| Authentication | Auth.js, Google Auth, Magic Link                         |\n| Others         | uploadthing, resend, zod                                 |\n\n[![next postgresql amazona](/public/assets/images/app.jpg)](https://next-pg-shadcn-ecommerce.vercel.app/)\n\n## Watch Video Tutorial\n\n[![next postgresql amazona](http://img.youtube.com/vi/M4DrCi8EuYE/0.jpg)](https://www.youtube.com/watch?v=sCFYd1pQBfk\u0026list=PLeh2GWv22bmQhKLSG7DuwptE8BGy8y3lJ\u0026index=1 'Build Ecommerce App By Next.js, Drizzle ORM, Postgres, Shadcn and Stripe')\n\n## View Demo Website\n\nhttps://next-pg-shadcn-ecommerce.vercel.app\n\n## What you will learn\n\n- creating e-commerce website pages by next.js server components\n- designing header, footer, sidebar, menu and search box by shadcn and tailwind\n- quick view products in modals using nextjs parallel routes with intercepting routes\n- create database models by drizzle orm and postgres database\n- handling form inputs by react-hook-forms and zod data validator\n- updating data by server actions without using any api\n- managing shopping cart using http cookies on server side\n- handling authentication and authorization by next-auth\n- creating customer dashboard to update profile and track orders\n- and implement a fully-functional admin dashboard with beautiful charts and handling products, orders and users\n\n## Run Locally\n\n1. Clone repo\n\n   ```shell\n    $ git clone git@github.com:basir/next-pg-shadcn-ecommerce.git\n    $ cd next-pg-shadcn-ecommerce\n   ```\n\n2. Create .env.local File\n\n   - duplicate .env.example and rename it to .env.local\n\n3. Setup PostgreSQL\n\n   - Vercel PostgreSQL\n     - Create database at https://vercel.com/docs/storage/vercel-postgres\n     - In .env.local file update POSTGRES_URL to db url\n   - OR Local PostgreSQL\n     - Install it from https://www.postgresql.org/download\n     - In .env.local file update POSTGRES_URL to db url\n\n4. Install and Run\n\n   ```shell\n     npm install\n     npm run dev\n   ```\n\n5. Seed Data\n\n   ```shell\n     npx tsx ./db/seed\n   ```\n\n6. Admin Login\n\n   - Open http://localhost:3000\n   - Click Sign In button\n   - Enter admin email \"admin@example.com\" and password \"123456\" and click Sign In\n\n## Lessons\n\n1. Introduction\n2. Install tools\n3. Create next app\n4. create website layout\n5. list products\n6. setup drizzle orm and postgres database\n7. load products from database\n8. deploy on vercel\n9. create product details page\n10. implement authentication\n11. create new user\n12. implement add to cart\n13. create shopping cart page\n14. get shipping address\n15. select payment method\n16. place order\n17. create order details page\n18. pay order by PayPal\n19. create orders history page\n20. create user profile form\n21. create admin dashboard page\n22. list orders\n23. mark orders to paid and delivered\n24. list products\n25. edit products\n26. list users\n27. edit users\n28. add home page carousel and sidebar\n29. create search page\n30. rate and review products\n31. add dark and light theme\n32. pay order by Stripe\n33. email order receipt by Resend\n34. find shipping address on Google Map\n35. signin with magic link\n36. signin with google\n\n## Contact Developer\n\nEmail: basir.jafarzadeh@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasir%2Fnext-pg-shadcn-ecommerce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasir%2Fnext-pg-shadcn-ecommerce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasir%2Fnext-pg-shadcn-ecommerce/lists"}