Full Stack E-Commerce Website (+ Dashboard) with Next.js 14: React, Typescript, Tailwindcss, Prisma, Supabase, NextAuth, Redux.
Bitex is a full-stack E-Commerce project developed with Next.js 14, featuring a range of technologies including React, Typescript, Tailwindcss, Prisma, Supabase (PostgreSQL), NextAuth, and Redux. Now enhanced with advanced search functionality and bulk import capabilities.
Note:
This project is a personal endeavor created for portfolio purposes and is not associated with any real business or project.
- β Migrated from MongoDB to Supabase (PostgreSQL) for better performance and scalability
- π Enhanced Search Engine with full-text search and advanced filtering
- π€ Bulk Import System for products, categories, and brands
- π Search Analytics with query logging and performance tracking
- π― Optimized Database Schema with proper indexes and relationships
https://bitex.namvar.dev
- Credential authentication for Dashboard using NextAuth.
- Advanced category management, including combining categories.
- Add, update, and delete categories and subcategories.
- Dedicated specifications for every category.
- Add and delete products with category-specific specifications.
- Add, update, and delete brands.
- Reports on user page visits.
-
Full responsiveness
-
CSS animations and effects
-
Skeleton loadings (without using external library )to have seamless page navigation experience.
-
Custom made UI Components (no external library):
- Price range slider
- CheckBox
- DropDownList
- Popups
- Button
-
Interactive Homepage Slider
- Crafted from scratch without using any Library
- Supports both Mouse Drag and
TouchInput
-
Shopping cart management with Redux.
-
Product gallery to showcase items attractively.
-
Dynamically Loading Categories (List) from Database
- π Advanced Search Engine with full-text search across products, brands, and categories
- π― Smart Filtering by price range, brand, category, availability, and discounts
- π Search Analytics with query logging and result tracking
- β‘ Real-time Search with instant results and suggestions
- Advanced filters products by Price, Brand, and Availability.
- Sorting options in product list page (sort by name, price, and relevance).
- π Supabase Integration with PostgreSQL for enhanced performance
- π€ Bulk Import APIs for efficient data management
- Database integration using Supabase (PostgreSQL) with Prisma ORM.
- Server-side form data validation using ZOD.
- π Search APIs with advanced filtering and pagination
- Node.js 18+
- Supabase account (supabase.com)
- npm or yarn package manager
git clone https://github.com/HosseinNamvar/bitex.git
cd bitex
npm install
Copy .env.example
to .env
and configure:
# Supabase Database URL (PostgreSQL)
DATABASE_URL="postgresql://postgres:[YOUR-PASSWORD]@db.[YOUR-PROJECT-REF].supabase.co:5432/postgres"
# NextAuth Configuration
NEXTAUTH_SECRET="your-super-secret-nextauth-key"
NEXTAUTH_URL="http://localhost:3000"
# Optional: Cloudinary for image uploads
CLOUDINARY_URL="cloudinary://api_key:api_secret@cloud_name"
# Optional: Supabase keys for advanced features
NEXT_PUBLIC_SUPABASE_URL="https://your-project-ref.supabase.co"
NEXT_PUBLIC_SUPABASE_ANON_KEY="your-anon-key"
# Generate Prisma client
npm run db:generate
# Run database migrations
npm run db:migrate
# Seed database with sample data
npm run db:seed
npm run dev
Visit http://localhost:3000 to see your store!
cd examples
node bulk-import.js
POST /api/products/bulk
- Import productsPOST /api/categories
- Import categoriesPOST /api/brands
- Import brandsGET /api/search
- Search products with filters
See examples/
directory for sample data and import scripts.
GET /api/search?q=iPhone&category=smartphones&minPrice=500&maxPrice=1000
POST /api/search
{
"query": "iPhone",
"filters": {
"categories": ["cat-id-1"],
"brands": ["brand-id-1"],
"priceRange": { "min": 500, "max": 1000 },
"hasDiscount": true,
"inStock": true
},
"sort": { "field": "price", "order": "asc" },
"pagination": { "page": 1, "limit": 20 }
}
- Migration Guide - Complete migration from MongoDB to Supabase
- Bulk Import Examples - Sample data and scripts
- API Documentation - Detailed API reference
# Development
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
# Database
npm run db:migrate # Run Prisma migrations
npm run db:generate # Generate Prisma client
npm run db:seed # Seed database with sample data
npm run db:studio # Open Prisma Studio
npm run db:reset # Reset and reseed database
# Code Quality
npm run lint # Run ESLint
npm run lint:fix # Fix ESLint errors