| Feature |
Description |
| 🧠 AI Chatbot |
Intelligent virtual assistant powered by Google Gemini 2.5 Flash with full inventory context |
| 📦 Product Management |
Full CRUD with images, categories, sizes, and stock control |
| 💰 Reservation System |
Product reservations with expiration dates, status tracking |
| 📊 Sales Tracking |
Sales logging, payment methods, period statistics |
| 💬 Customer Inquiries |
Automatic conversation logging, mark as handled |
| 🛡️ Security |
Cookie authentication, rate limiting (Upstash Redis) |
| 📱 Responsive Design |
Mobile and desktop optimized interface |
| ✅ Quality |
88 passing tests, TypeScript strict |
| Desktop |
Mobile |
 |
 |
| Dashboard |
Products |
 |
 |
git clone https://github.com/MarceloAdan73/botShop-AI.git
cd botShop-AI
npm install
cp .env.example .env.local
npm run dev
npm run seed # Load 30 sample products
Open http://localhost:3000
# Google Gemini API (required)
# ⚠️ The example key is a TEST key with very low limits
# Get your own key at: https://aistudio.google.com/app/apikey
GEMINI_API_KEY=your_api_key_here
# Rate limiting (optional)
UPSTASH_REDIS_REST_URL=https://xxx.upstash.io
UPSTASH_REDIS_REST_TOKEN=xxx
# Admin
ADMIN_PASSWORD=demo123
⚠️ The free API key has very low limits. For production, get your own key.
| Model |
Speed |
Intelligence |
| Gemini 2.0 Flash |
⚡⚡⚡ |
⭐⭐ |
| Gemini 2.5 Flash |
⚡⚡ |
⭐⭐⭐ (current) |
| Gemini 2.5 Pro |
⚡ |
⭐⭐⭐⭐ |
Change the model in src/app/api/chat/route.ts line 72.
botShop-AI/
├── src/app/
│ ├── page.tsx # Chat UI
│ ├── admin/ # Admin panel
│ │ ├── productos/ # Product CRUD
│ │ ├── reservas/ # Reservations
│ │ ├── ventas/ # Sales
│ │ └── consultas/ # Conversations
│ └── api/ # API routes
├── src/lib/
│ ├── db.ts # SQLite
│ ├── models.ts # Models
│ ├── redis.ts # Rate limiting
│ └── tienda-config.ts # Store config
├── tests/ # Vitest
├── seed.ts # Sample data
└── package.json
| Category |
Technology |
Purpose |
| Framework |
Next.js 16 |
App Router, Server Actions |
| UI |
React 19 |
Components |
| Language |
TypeScript |
Static typing |
| Styles |
Tailwind CSS 4 |
Utility-first CSS |
| Icons |
Lucide React |
Icons |
| Notifications |
React Hot Toast |
Toasts |
| Database |
better-sqlite3 |
SQLite ORM |
| AI |
Google Gemini SDK |
AI Chatbot |
| Rate Limiting |
Upstash Redis |
API Protection |
| Testing |
Vitest |
Unit tests |
| PostgreSQL |
pg (ready) |
Production migration |
| Runner |
tsx |
Run TypeScript scripts |
- Server Actions - mutations without intermediate API routes
- MVC - typed models in
/lib/models.ts
- Fail-open - optional services (Redis) don't break the app
- WAL Mode - SQLite with write-ahead logging for better performance
| Method |
Endpoint |
Description |
POST |
/api/chat |
Send message to chatbot |
POST |
/api/chat/save |
Save conversation |
| Method |
Endpoint |
GET/POST |
/api/admin/products |
GET/PUT/DELETE |
/api/admin/products/[id] |
GET/POST |
/api/admin/reservas |
GET/POST |
/api/admin/ventas |
GET |
/api/admin/conversaciones |
Category (id, name, slug, icon, talles)
Product (id, name, price, stock, categoryId, imageUrl, talles, estado)
Reserva (id, producto_id, nombre_cliente, fecha_reserva, estado)
Venta (id, producto_id, nombre_cliente, metodo_pago, precio_venta)
Conversation (id, mensajes JSON, necesita_atencion)
Config (id, storeInfo JSON)
npm test # Watch mode
npm run test:run
docker build -t botshop-ai .
docker run -p 3000:3000 botshop-ai
See full guide in the repository to migrate to Supabase + Vercel:
- Create Supabase project
- Configure environment variables
- Update
db.ts for PostgreSQL
- Deploy to Vercel
MIT - see LICENSE
Marcelo Adan
