You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Full-Stack E-Commerce Platform with AI-Powered Shopping Assistant
A sophisticated, multi-vendor e-commerce marketplace built with Spring Boot 4.1, featuring an intelligent AI chat assistant powered by LangChain4j and NVIDIA NIM, with Retrieval-Augmented Generation (RAG) for semantic product search.
git clone https://github.com/your-username/shoppiq.git
cd shoppiq
2. Set Up Environment Variables
# Copy the example environment file
cp .env.example .env
# Edit .env with your configuration# Required:# DATASOURCE_URL, DATASOURCE_USERNAME, DATASOURCE_PASSWORD# JWT_SECRET# GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET# NVIDIA_API_KEY (for AI features)
3. Start Infrastructure
# Start Qdrant vector database
docker-compose up -d
4. Set Up Database
# Create MySQL database
mysql -u root -p -e "CREATE DATABASE shoppiq_schema"# Flyway will auto-create tables on first run
5. Build & Run
# Build the project
./mvnw clean install
# Run the application
./mvnw spring-boot:run
# Or with AI features enabled
SPRING_PROFILES_ACTIVE=default,ai-enabled ./mvnw spring-boot:run
User Query → Embedding (384-dim) → Vector Search (Qdrant) → Top-5 Results → LLM Context
│ │ │ │
│ Local ONNX Cosine Similarity maxResults=5
│ BGE-small-en minScore=0.75
│
└──► LLM Response with real product data
Tool Calling (6 Tools)
Tool
Description
getProductDetail
Fetch product info by slug or name
getOrderStatus
Check user's recent orders
getCartContents
Get shopping cart contents
getUserReviews
Retrieve user's product reviews
semanticProductSearch
Vector-based product search
resolveCurrentConversation
Close the conversation
Available Models
Model
Label
Use Case
nvidia/nemotron-3-nano-omni-30b-a3b-reasoning
Nemotron Nano Omni 30B
Default, reasoning-capable
nvidia/nemotron-3-nano-30b-a3b
Nemotron Nano 30B
Fast, lightweight
nvidia/llama-3.3-nemotron-super-49b-v1.5
Nemotron 49B
Best quality
Security
Authentication Flow
1. User → POST /auth/login { email, password }
2. AuthService.authenticate() → validates credentials
3. JwtAuthenticationUtils.generateToken() → HMAC-SHA signed JWT
4. JwtCookieFactory.create() → HttpOnly cookie (never in body)
5. JwtAuthenticationFilter → validates on every request
Security Features
Feature
Implementation
JWT Cookie-Only
HttpOnly, Secure, SameSite=Lax
OAuth2 Google
Stateless with HMAC-signed cookies
CSRF Protection
SPA mode with X-XSRF-TOKEN
Rate Limiting
Bucket4j token-bucket (per-path rules)
Account Lockout
5 failed attempts → 30-min lock
Role-Based Access
CUSTOMER, SELLER, ADMIN
Configuration
Environment Variables
Variable
Required
Description
DATASOURCE_URL
Yes
MySQL connection URL
DATASOURCE_USERNAME
Yes
MySQL username
DATASOURCE_PASSWORD
Yes
MySQL password
JWT_SECRET
Yes
JWT signing secret (min 32 chars)
GOOGLE_CLIENT_ID
Yes
Google OAuth2 client ID
GOOGLE_CLIENT_SECRET
Yes
Google OAuth2 client secret
NVIDIA_API_KEY
For AI
NVIDIA NIM API key
RAZORPAY_KEY_ID
For payments
Razorpay API key
RAZORPAY_KEY_SECRET
For payments
Razorpay API secret
SMTP_HOST
For email
SMTP server host
SMTP_USERNAME
For email
SMTP username
SMTP_PASSWORD
For email
SMTP password
Application Ports
Port
Service
8090
Shoppiq Application
3306
MySQL Database
6333
Qdrant REST API
6334
Qdrant gRPC API
Contributing
Development Setup
Fork the repository
Create a feature branch (git checkout -b feature/amazing-feature)
Make your changes
Run tests (./mvnw test)
Commit your changes (git commit -m 'Add amazing feature')
Push to the branch (git push origin feature/amazing-feature)
Open a Pull Request
Code Standards
Follow Java coding conventions
Use Lombok annotations where appropriate
Write comprehensive Javadoc for public APIs
Add unit and integration tests for new features
Update documentation for any API changes
⚠️ Note: this project is source-available, not open-source in the OSI sense — commercial use requires the Author's written permission (see License). Contributions are welcome under the terms described there.
License
This project is licensed under the Shoppiq Custom Source-Available License v1.0 — free for personal, educational, and non-commercial use; commercial use requires prior written permission from the Author. The license automatically converts to Apache-2.0 on the Change Date (four years from first public release, or December 31, 2030, whichever comes first).
See the LICENSE.md file for full terms, or contact Prabhat Kumar Mishra at mprabhat774@gmail.com for commercial licensing inquiries.
A sophisticated, multi-vendor e-commerce marketplace built with Spring Boot 4.1, featuring an intelligent AI chat assistant powered by LangChain4j and NVIDIA NIM, with Retrieval-Augmented Generation (RAG) for semantic product search.