TinyTreasure is a modern, full‑stack e‑commerce application built with a scalable architecture, secure payment integration, and AI‑powered features. The platform supports product browsing, cart management, secure checkout, user reviews, and intelligent search using vector databases.
- User Authentication & Authorization - Secure JWT-based auth
- Product Browsing - Advanced filtering and search capabilities
- Shopping Cart - Persistent cart management with Redux
- Secure Checkout - Integration with Khalti ePayment Gateway
- Order Tracking - View order history and real-time status
- Product Reviews - Leave and view ratings on products
- AI Chat Assistant - RAG-based chatbot (April) for product discovery and support
- Product Management - Full CRUD operations for products
- Order Management - Status updates and order tracking
- User Management - Manage users and permissions
- Review Analytics - Aggregate reviews using MongoDB pipelines
- Retrieval‑Augmented Generation (RAG) for intelligent responses
- Vector Database for semantic search
- AI Chat Interface - Powered by Gemini API & Groq
- Contextual product retrieval and support
- React 19 - UI framework
- Redux Toolkit - Global state management
- TanStack React Query - Server state & caching
- React Router - Client-side routing
- React Hook Form - Form state management
- Tailwind CSS - Utility-first styling
- React Icons - Icon library
- React Hot Toast - Toast notifications
- Vite - Build tool
- Node.js - JavaScript runtime
- Express.js - Web framework
- MongoDB - NoSQL database
- Mongoose - MongoDB ODM
- JWT - Authentication & authorization
- Cloudinary - Image storage & management
- Nodemailer - Email service
- Multer + Sharp - Image processing & upload
- Groq & Google Genai - AI model integration
- Khalti ePayment Gateway
- Secure payment processing
- Payment verification
- Real-time transaction updates
- Docker - Container orchestration
- Docker Compose - Multi-container setup
- ESLint - Code linting
- Prettier - Code formatting
Before you begin, ensure you have the following installed:
- Node.js (v16 or higher) - Download
- npm or yarn - Comes with Node.js
- MongoDB - Setup Guide
- Docker & Docker Compose (optional) - Installation Guide
- Git - Version control
git clone <repository-url>
cd ProjectsNavigate to the Backend directory:
cd BackendInstall dependencies:
npm installCreate config.env file in the Backend directory:
Create a new file Backend/config.env with the following structure:
# Server Configuration
PORT=3000
NODE_ENV=development
# MongoDB Configuration
DATABASE=mongodb+srv://your-username:your-password@cluster.mongodb.net/database-name?retryWrites=true&w=majority&appName=ClusterName
DATABASE_PASSWORD=your-mongodb-password
# JWT Configuration
JWT_SECRET=your-super-secret-jwt-key-min-32-characters-long
JWT_EXPIRES_IN=120d
JWT_COOKIE_EXPIRES_IN=90
# Email Configuration (Gmail)
GMAIL_USER=your-email@gmail.com
GMAIL_PASS=your-app-specific-password
# Cloudinary Configuration (Image Upload)
CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-api-key
CLOUDINARY_API_SECRET=your-api-secret
# Khalti Payment Gateway (ePayment)
KHALTI_LIVE_SECRET_KEY=your-khalti-secret-key
KHALTI_LIVE_PUBLIC_KEY=your-khalti-public-key
KHALTI_RETURN_URL=http://localhost:5173/payment-success
# Website URLs
WEBSITE_URL=http://localhost:5173
# AI APIs
GEMINI_API_KEY=your-google-gemini-api-key
GROQ_API_KEY=your-groq-api-keyEnvironment Variables Explanation:
| Variable | Purpose | How to Get |
|---|---|---|
| PORT | Backend server port | Default: 3000 |
| NODE_ENV | Environment mode | development / production |
| DATABASE | MongoDB connection string | Create cluster at MongoDB Atlas |
| JWT_SECRET | Secret key for JWT tokens | Generate a random string (32+ chars) |
| JWT_EXPIRES_IN | Token expiration time | e.g., 120d (120 days) |
| GMAIL_USER | Gmail address for sending emails | Your Gmail account |
| GMAIL_PASS | Gmail app password | Generate here (2FA required) |
| CLOUDINARY_* | Image hosting credentials | Create account at Cloudinary |
| KHALTI_* | Payment gateway keys | Create account at Khalti |
| GEMINI_API_KEY | Google's AI model | Get from Google AI Studio |
| GROQ_API_KEY | Groq's AI model | Get from Groq Console |
Start the backend server:
npm start
# or for development with auto-reload
npm run dev # if nodemon is configuredThe backend will run on http://localhost:3000
Open a new terminal and navigate to Frontend:
cd FrontendInstall dependencies:
npm installStart the development server:
npm run devThe frontend will be available at http://localhost:5173
git clone <repository-url>
cd ProjectsFollow the same process as above and fill in all required environment variables.
Development Environment:
docker compose -f docker-compose.yaml up -d --buildProduction Environment:
docker compose -f docker-compose.prod.yaml up -d --buildCheck container status:
docker compose psView logs:
docker compose logs -fStop containers:
docker compose downBelow are UI previews of TinyTreasure displayed in a clean 2‑column grid.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |


















