A complete smart shopping assistant application powered by DigitalOcean AI agents and Memori for persistent memory.
- Memory-Enhanced Shopping: Remembers customer preferences and shopping history using Memori
- DigitalOcean AI Integration: Powered by DigitalOcean's AI platform for intelligent responses
- Modern Web Interface: Beautiful Next.js frontend with Tailwind CSS
- Real-time Chat: Interactive chatbot for shopping assistance
- Product Catalog: Browse and search products with filters
- RESTful API: FastAPI backend with comprehensive endpoints
- Persistent Memory: Customer interactions stored and recalled across sessions
βββββββββββββββββββββββ βββββββββββββββββββββββ βββββββββββββββββββββββ
β β β β β β
β Next.js β β FastAPI β β DigitalOcean AI β
β Frontend ββββββ€ Backend ββββββ€ Platform β
β β β β β β
βββββββββββββββββββββββ βββββββββββββββββββββββ βββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββ
β β
β Memori Memory β
β System (SQLite) β
β β
βββββββββββββββββββββββ
smart_shopping_digitalocean/
βββ backend/
β βββ main.py # FastAPI application
β βββ requirements.txt # Python dependencies
β βββ .env.example # Environment configuration template
βββ frontend/
β βββ src/
β β βββ app/
β β β βββ page.tsx # Main page component
β β βββ components/
β β β βββ Chatbot.tsx # Chat interface
β β β βββ ChatInput.tsx # Chat input component
β β β βββ ChatMessage.tsx # Message display
β β β βββ ProductCard.tsx # Product display card
β β β βββ ProductGrid.tsx # Product grid layout
β β βββ lib/
β β βββ api.ts # API service
β βββ package.json # Node.js dependencies
β βββ .env.local # Frontend environment
βββ README.md # This file
- Python 3.8+
- Node.js 18+
- DigitalOcean AI account with API credentials
cd backend
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env with your DigitalOcean AI credentials:
# agent_endpoint=your-digitalocean-agent-endpoint
# agent_access_key=your-digitalocean-agent-access-key
# Start the FastAPI server
uvicorn main:app --reload --host 0.0.0.0 --port 8000cd frontend
# Install dependencies
npm install
# Start the development server
npm run dev- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
- Create a DigitalOcean AI account
- Get your agent endpoint and access key
- Set the environment variables in
backend/.env:
agent_endpoint=https://your-agent-endpoint.digitalocean.com
agent_access_key=your-agent-access-keyThe Memori system automatically creates a SQLite database to store conversation history and customer preferences. No additional setup required.
POST /chat- Send message to AI assistant
GET /products- Get all productsPOST /products/search- Search products with filtersGET /products/{id}- Get specific productGET /categories- Get product categories
GET /memory/search- Search customer memory (admin)
- Real-time messaging with the AI assistant
- Message history with timestamps
- Loading indicators and error handling
- Responsive design for all devices
- Grid layout with product cards
- Search functionality
- Category filtering
- Product images and ratings
- Add to cart functionality
- Customer preferences remembered across sessions
- Personalized product recommendations
- Shopping history recall
- Customer Interaction: User chats with the AI assistant about shopping needs
- Memory Search: System searches previous interactions for context
- AI Processing: DigitalOcean AI generates personalized responses
- Memory Storage: Conversation stored in Memori for future reference
- Product Recommendations: AI suggests relevant products from catalog
- Backend: Add new endpoints in
main.py - Frontend: Create new components in
src/components/ - API Integration: Update
src/lib/api.ts
Edit the PRODUCT_CATALOG in backend/main.py to add your own products with:
- Product information
- Images
- Categories
- Descriptions
- Service not initialized: Check DigitalOcean credentials in
.env - Memory errors: Ensure SQLite database is writable
- CORS errors: Verify frontend URL in CORS middleware
- API connection failed: Verify backend is running on port 8000
- Build errors: Check Next.js and TypeScript configuration
- Styling issues: Ensure Tailwind CSS is properly configured
This project is part of the Memori demonstration suite. Please refer to the main Memori license for usage terms.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
For issues related to:
- Memori: Check the main Memori documentation
- DigitalOcean AI: Consult DigitalOcean AI platform docs
- This Demo: Create an issue in the repository
Smart Shopping with AI Memory - Making every shopping experience personal! ποΈπ€