A full-featured e-commerce platform built with Next.js 16, featuring a modern shopping experience with cart management, user authentication, order processing, and an admin dashboard.
| Category | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript |
| Database | SQLite with Prisma ORM |
| Authentication | NextAuth.js v5 |
| State Management | Zustand |
| Styling | Tailwind CSS v4 |
| Payments | Stripe |
| Testing | Vitest (unit) + Playwright (e2e) |
| Error Tracking | Sentry |
Before you begin, ensure you have the following installed:
git clone https://github.com/arya-dev2005/ebazaar.git
cd ebazaar
npm install
# or
yarn install
# or
pnpm install
Create a .env file in the root directory:
# Database
DATABASE_URL="file:./dev.db"
# NextAuth
AUTH_SECRET="your-secret-key-here-generate-with-openssl-rand-base64-32"
AUTH_URL="http://localhost:3000"
# Stripe (get keys from https://dashboard.stripe.com)
STRIPE_SECRET_KEY="sk_test_..."
STRIPE_PUBLISHABLE_KEY="pk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
# Sentry (optional, get from https://sentry.io)
SENTRY_DSN=""
# Push schema to database
npm run db:push
# Seed with sample data (optional)
npm run db:seed
npm run dev
Open http://localhost:3000 in your browser.
After starting the server:
npm run db:studio)role field to "ADMIN"ebazaar/
βββ prisma/
β βββ schema.prisma # Database schema
β βββ seed.ts # Seed data
βββ src/
β βββ actions/ # Server actions
β β βββ admin.ts
β β βββ auth.ts
β β βββ cart.ts
β β βββ category.ts
β β βββ order.ts
β β βββ product.ts
β βββ app/ # Next.js App Router
β β βββ (auth)/ # Auth routes (sign-in, sign-up)
β β βββ (shop)/ # Shop routes (products)
β β βββ admin/ # Admin dashboard
β β βββ api/ # API routes
β β βββ cart/ # Cart page
β β βββ checkout/ # Checkout flow
β β βββ orders/ # Order history
β βββ components/ # React components
β β βββ cart/
β β βββ home/
β β βββ layout/
β β βββ products/
β β βββ ui/
β βββ lib/ # Utilities and configs
β β βββ auth.ts
β β βββ prisma.ts
β β βββ sentry.ts
β β βββ stripe.ts
β β βββ utils.ts
β βββ services/ # Business logic
β β βββ cart.ts
β β βββ order.ts
β β βββ product.ts
β β βββ review.ts
β β βββ user.ts
β βββ types/ # TypeScript types
βββ e2e/ # Playwright tests
βββ tests/ # Unit tests
βββ public/ # Static assets
The application uses the following main models:
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm run test |
Run unit tests |
npm run test:watch |
Run tests in watch mode |
npm run test:e2e |
Run end-to-end tests |
npm run db:push |
Push schema to database |
npm run db:seed |
Seed database with sample data |
npm run db:studio |
Open Prisma Studio |
We welcome contributions! Please follow these steps:
Click the βForkβ button on GitHub.
git clone https://github.com/YOUR_USERNAME/ebazaar.git
cd ebazaar
git checkout -b feature/your-feature-name
# or
git checkout -b fix/bug-description
git add .
git commit -m "feat: Add new feature"
git push origin feature/your-feature-name
We follow Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types:
feat - New featurefix - Bug fixdocs - Documentationstyle - Formattingrefactor - Code restructuringtest - Testingchore - MaintenanceThis project is licensed under the MIT License - see the LICENSE file for details.
If you have questions or need help: