Minimalist ecommerce built with Nextjs, Tailwind and Zustand. Server components, server actions, integrated with PayPal for payments, and Cloudinary for product image storage.
Things Shop is a high-performance, minimalist ecommerce application built with Next.js 14 and Tailwind. Server-rendered Next.js App Router pages. With users, products and inventory managements systems powered by Prisma and integrates PayPal for secure payment processing. Product images are handled by Cloudinary, ensuring fast and efficient image delivery.
See the demo here.
- 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
- ποΈ Ecommerce Essentials: Add products to a cart, manage inventory, and process payments securely with PayPal.
- π¦ 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.
- π₯ 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.
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
-
Clone the project:
git clone https://github.com/USpiri/things-shop.git
Or just click here.
-
Go to the folder application.
cd things-shop
-
Copy
.env.template
and rename it to.env
. -
Update the
.env
file with your environment variables. -
Install dependencies:
npm install
-
Set up the database using Docker:
docker compose up -d
-
Apply Prisma migrations:
npx prisma migrate dev
-
Seed the database with sample data:
npm run seed
Note: After running the seed script, clear your browser's local storage and cookies to avoid data conflicts.
-
Start the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
-
Clear Local Storage and Cookies.
npm run build
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
Special thanks to Fernando Herrera for his Nextjs course.