/lazora

An open source e-commerce project build with Next.js 14

Primary LanguageTypeScriptMIT LicenseMIT

Lazora | Open Source E-commerce Project

Lazora is a powerful and user-friendly e-commerce application built with Next.js and Prisma ORM. It offers a seamless shopping experience with features like user authentication, product management, favourites, filtering products, and more.

Concept Application:

Unlike multi-vendor platforms where each user can create their own store, Lazora focuses on providing a unified store managed by a single seller. The seller has the ability to perform CRUD (Create, Read, Update, Delete) operations on products and banners, ensuring a streamlined and controlled shopping experience for customers. This app offers user authentication, product management, and secure payment processing (planning feature), making it an ideal solution for businesses looking to manage their e-commerce operations efficiently.

Warning! This app is still in development and not ready for production.

Before you clone, please see my Roadmap

Live Demo

https://lazora.vercel.app

Preview Image

homepage view register view detail product view dashboard products view

Run Locally

1. Install Dependencies

npm install

2. Configure ENV file

Create an .env file and add the following variables. See file example.env for more information. For a detailed guide on setting up these variables, read my article.

DATABASE_URL=""
NEXTAUTH_SECRET=""
NEXTAUTH_URL=""
PROD_URL=""
DEV_URL="htpp://locahost:3000"
UPLOADTHING_SECRET=""
UPLOADTHING_APP_ID=""
REDIS_URL=""
GOOGLE_SITE_VERIFICATION=""
CI=false

3. Generate and Push Database Schema

Run the following command to generate and push your prisma model to the database.

npx prisma generate && npx prisma db push

4. Run Development Server

npm run dev

Deploy to Vercel

Read my article to see how to deploy this app to Vercel. Read here.


How to Access the Dashboard to Perform CRUD Operations

  1. Navigate to your site at /register.
  2. Create an account for yourself.
  3. Go to your MongoDB database, then go to the users collection and edit the account you've just created. Change the role from BUYER to SELLER and save.
  4. Finally, go to your site, log out, and sign in again to see the changes.
  5. Congratulations, you can now access the dashboard.

License

Licensed under the MIT License. Check the LICENSE file for details.

API spec

read API spec