A comprehensive e-commerce platform featuring a multi-vendor marketplace, chatbot support, order tracking, advanced analytics, and full customer, vendor, and admin management.
- Product Catalog: Browse products with advanced filtering and search
- Shopping Cart: Persistent cart with real-time updates
- Order Management: Track orders with real-time status updates
- Product Reviews: Rate and review products with photo uploads
- Wishlist: Save favorite products for later
- Real-time Chat: Get instant support from vendors
- Email Verification: Secure account creation with email verification
- Password Reset: Secure password recovery system
- Store Management: Create and manage your own store
- Product Management: Add, edit, and manage product inventory
- Order Processing: Handle customer orders with status updates
- Sales Analytics: Track sales performance and revenue
- Payment Tracking: Monitor payment status and history
- Customer Support: Chat with customers in real-time
- User Management: Manage customers, vendors, and admins
- Store Oversight: Monitor and manage all vendor stores
- Order Management: Oversee all platform orders
- Analytics Dashboard: Comprehensive platform analytics
- Report Management: Handle user reports and disputes
- System Notifications: Send platform-wide announcements
- Next.js 15 - React framework with App Router
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- Framer Motion - Animation library
- Redux Toolkit - State management
- React Hook Form - Form handling
- Zod - Schema validation
- Next.js API Routes - Server-side API endpoints
- Prisma - Database ORM
- PostgreSQL - Primary database
- NextAuth.js - Authentication system
- Nodemailer - Email service
- Cloudinary - Image and file storage
- OpenRouter AI - AI-powered chat support
- Supabase - Database hosting
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- npm or yarn
- PostgreSQL database
- Git
-
Clone the Repository
git clone https://github.com/lyes-mersel/megashop.git cd megashop -
Install Dependencies
npm install
-
Set Up Environment Variables
Create a
.envfile in the root directory:# Local Development NEXT_PUBLIC_BASE_URL="http://localhost:3000" NEXT_PUBLIC_API_URL="http://localhost:3000/api" # Production PROD_API_URL="https://project-megashop.vercel.app" PROD_BASE_URL="https://project-megashop.vercel.app/api" # Database Connection DATABASE_URL="postgresql://postgres.fallhpfxzcmhrvtticfn:[YOUR-PASSWORD]@aws-0-eu-central-1.pooler.supabase.com:6543/postgres?pgbouncer=true&connection_limit=200&pool_timeout=10" DATABASE_DIRECT_URL="postgresql://postgres.fallhpfxzcmhrvtticfn:[YOUR-PASSWORD]@aws-0-eu-central-1.pooler.supabase.com:5432/postgres?connection_limit=200&pool_timeout=10" # Cloudinary Configuration NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="dzmbj5d0b" NEXT_PUBLIC_CLOUDINARY_API_KEY="****" CLOUDINARY_API_SECRET="****" # Authentication AUTH_SECRET="****" # Chatbot OpenRouter API Key OPENROUTER_API_KEY="****" # Email Configuration EMAIL_USER="noreply.megashop@gmail.com" EMAIL_APP_PASSWORD="****" # Default User Password DEFAULT_PASSWORD="****"
-
Database Setup
# Generate Prisma client npx prisma generate # Run database migrations npx prisma migrate dev # Seed the database with initial data npx prisma db seed
-
Run the Development Server
npm run dev
Open http://localhost:3000 in your browser.
The application uses PostgreSQL with the following main entities:
- Users: Customers, vendors, and admins
- Products: Product catalog with variants
- Orders: Order management and tracking
- Carts: Shopping cart functionality
- Reviews: Product reviews and ratings
- Notifications: System notifications
- Reports: User reports and disputes
megashop/
βββ app/ # Next.js App Router
β βββ (portal)/ # Admin, vendor, and client portals
β βββ (store)/ # Public store pages
β βββ api/ # API routes
β βββ auth/ # Authentication pages
βββ components/ # Reusable UI components
β βββ auth/ # Authentication components
β βββ common/ # Shared components
β βββ layout/ # Layout components
β βββ portal/ # Portal-specific components
β βββ store/ # Store-specific components
β βββ ui/ # Base UI components
βββ lib/ # Utility libraries
β βββ auth/ # Authentication utilities
β βββ helpers/ # Helper functions
β βββ types/ # TypeScript type definitions
β βββ validations/ # Form validations
βββ prisma/ # Database schema and migrations
βββ redux/ # State management
βββ styles/ # Global styles
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpx prisma studio- Open Prisma Studionpx prisma migrate dev- Run database migrationsnpx prisma db seed- Seed database with initial data
The application uses NextAuth.js with the following authentication methods:
- Email/Password authentication
- Email verification
- Password reset functionality
- Role-based access control (Customer, Vendor, Admin)
- Push your code to GitHub
- Connect your repository to Vercel
- Set up environment variables in Vercel dashboard
- Deploy automatically on push
-
Build the application:
npm run build
-
Start the production server:
npm start
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MEGA SHOP Β© 2025 β Academic project developed by Master 1 Software Engineering students from the University of BΓ©jaΓ―a. This project serves as a comprehensive e-commerce solution that demonstrates modern web development practices, full-stack architecture, and real-world application development skills.
π« Institution: University of BΓ©jaΓ―a
π Program: Master 1 Software Engineering
π₯ Team: 4 students
π
Year: 2025
π¨βπ« Supervisor: Mr Z.Farah
Note: The user experience (UI) and all project documentation are provided in French.
- π Diagrams & Models
- π Final Report (PDF)
- MERSEL Lyes - @lyes-mersel
- BRAHIMI Rayan - @BrahimiRayan
- MECHKOUR Billal - @Billalmechekour
- MESSAOUDENE SaΓ―d - @Messaoudene-Said
Explore the complete visual showcase in the π Screenshots Gallery, featuring main store interface, admin portal, vendor portal, client portal, and mobile responsive design.
For detailed API documentation, please refer to the API Documentation README.
This project is licensed under the MIT License - see the LICENSE file for details.
MEGA SHOP - Your complete e-commerce solution! ποΈβ¨