An open API service indexing awesome lists of open source software.

https://github.com/uspiri/things-shop

πŸ“¦Minimalist ecommerce built with Nextjs, Tailwind and Zustand.
https://github.com/uspiri/things-shop

e-commerce minimal nextjs payments taiwindcss zustand

Last synced: 3 months ago
JSON representation

πŸ“¦Minimalist ecommerce built with Nextjs, Tailwind and Zustand.

Awesome Lists containing this project

README

          

# πŸ›’ Things Shop - ecommerce


Things shop icon


Minimalist ecommerce built with Nextjs, Tailwind and Zustand. Server components, server actions, integrated with PayPal for payments, and Cloudinary for product image storage.




β€’

β€’

β€’




β€’

β€’


Preview here

## About Things Shop

Things Shop is a high-performance, minimalist ecommerce application built with [Next.js](https://nextjs.org) 14 and [Tailwind](https://tailwindcss.com/). Server-rendered Next.js App Router pages. With users, products and inventory managements systems powered by [Prisma](https://www.prisma.io/) and integrates PayPal for secure payment processing. Product images are handled by Cloudinary, ensuring fast and efficient image delivery.

See the [demo here](https://thingsshop.vercel.app/).

![438_1x_shots_so](https://github.com/user-attachments/assets/5f491e14-5c6a-41bb-a084-b825b915ed6b)

## πŸ› οΈ Tech Stack

- **Framework**: Next.js 14 (App Router)
- **Styling**: Tailwind CSS
- **Database**: PostgreSQL with Prisma ORM
- **State Management**: Zustand
- **Payments**: PayPal Integration
- **Image Hosting**: Cloudinary
- **Language**: TypeScript
- **Authentication**: Custom implementation

## πŸš€ Features

- πŸ›οΈ **Ecommerce Essentials**: Add products to a cart, manage inventory, and process payments securely with [PayPal](https://www.paypal.com/).
- πŸ“¦ **Dynamic Product Management**: Easily manage products and stock with the Prisma ORM.
- 🌐 **Server Actions**: Optimized with server components for fast rendering.
- πŸ–ΌοΈ **Efficient Image Handling**: Product images stored and delivered via Cloudinary.
- πŸ” **Authentication**: Custom auth implementation for login with [Auth.js](https://authjs.dev/).
- πŸ‘₯ **Role based route protection**: Allows certain users to get specific pages based on the user's role.
- πŸ“± **Responsive Design**: Ensure accesibility from all devices.
- πŸ”Ž **Search page**: Quickly find products, user-friendly search interface, using search params.

## πŸ–ΌοΈ Screenshoots









## πŸ—ƒοΈ Folder structure

```bash
prisma/ # Prisma ORM Configs
public/
└── images/ # Seed products images
└── ...
src/
β”œβ”€β”€ actions/ # Server actions
β”œβ”€β”€ app/ # App routing folder
β”œβ”€β”€ components/ # Components
β”œβ”€β”€ config/ # Configuration files
β”œβ”€β”€ lib/ # Prisma utilities
β”œβ”€β”€ models/ # Interfaces and types
β”œβ”€β”€ seed/ # Development seed script
β”œβ”€β”€ store/ # Zustand global state
β”œβ”€β”€ utils/ # Utility functions
β”œβ”€β”€ auth.ts
└── middleware.ts

```

## Getting Started

### Development:

1. Clone the project:

```bash
git clone https://github.com/USpiri/things-shop.git
```

Or just [click here](https://github.com/USpiri/things-shop/fork).

2. Go to the folder application.

```bash
cd things-shop
```

3. Copy `.env.template` and rename it to `.env`.
4. Update the `.env` file with your environment variables.
5. Install dependencies:

```bash
npm install
```

6. Set up the database using Docker:

```bash
docker compose up -d
```

7. Apply Prisma migrations:

```bash
npx prisma migrate dev
```

8. Seed the database with sample data:

```bash
npm run seed
```
> **Note:** After running the seed script, clear your browser's local storage and cookies to avoid data conflicts.

9. Start the development server:

```bash
npm run dev
```

10. Open [http://localhost:3000](http://localhost:3000) in your browser.
11. Clear Local Storage and Cookies.

### Build:

```
npm run build
```

# 🀝 Contribution Guidelines

Contributions are welcome! Please fork the repository and submit a pull request with your changes.

Back to top ⬆️

Special thanks to [Fernando Herrera](https://github.com/klerith) for his Nextjs course.