A headless Product Information Management system for promotional products with AI-powered semantic search via Google Gemini RAG.
- Node.js 18+
- PostgreSQL 14+ (or Neon account)
- Redis (or Upstash account)
- Gemini API key
# Clone the repository
git clone <repo-url>
cd PromovereAtlasPim
# Backend setup
cd backend
npm install
cp .env.example .env # Configure your environment variables
npm run develop
# Frontend setup (in another terminal)
cd frontend
npm install
npm run dev# Required
DATABASE_URL=postgresql://...
REDIS_URL=redis://...
GEMINI_API_KEY=AIzaSy...
# Optional (for full features)
R2_ACCOUNT_ID=...
MEILISEARCH_HOST=...- Semantic Search: Natural language product queries via Gemini File Search
- Persistent Embeddings: FileSearchStore for long-term RAG storage
- Auto-Sync: Products automatically indexed on update
- 5/5 Products Verified: Production-ready implementation
- Two-Level Hierarchy: Product β Product Variants (sizes/colors)
- Multilingual: EN/DE/FR/ES support with fallback chains
- 56 Suppliers: Promidata integration with 56 suppliers
- Hash-Based Sync: 89% efficiency with incremental updates
- Meilisearch: Typo-tolerant exact search with facets
- Filters: Category, supplier, price range, brand, status
- Pagination: 12 products per page with sorting
- Real-time: Auto-indexed on product changes
- Cloudflare R2: Zero-egress-fee storage with CDN
- Adaptive Fitting: Smart cover/contain based on aspect ratio
- Automated Upload: Images auto-uploaded during sync
- BullMQ Queue: Background job processing with retries
- Redis Caching: Fast data access
- Batch Operations: Efficient bulk product processing
βββββββββββββββββββ
β Frontend β (Separate Next.js repo - planned)
β (Vercel AI) β
ββββββββββ¬βββββββββ
β Tool Calling
ββββββ΄ββββββ¬βββββββββββ
βΌ βΌ βΌ
ββββββββββ ββββββββββ βββββββββββ
β Gemini β β Meili β β Strapi β
β RAG β β search β β API β
ββββββββββ ββββββββββ βββββββββββ
Why This Architecture?
- Gemini β Semantic understanding ("blue t-shirts under 20β¬")
- Meilisearch β Exact search, filters, facets
- Strapi β Source of truth, admin, write operations
- Frontend β Orchestrates all three intelligently
Promidata API
β
βΌ
ββββββββββββββββ
β Promidata β
β Sync Service β
ββββββββ¬ββββββββ
β
βββββ΄βββββ¬βββββββββββ
βΌ βΌ βΌ
Strapi Meilisearch Gemini
DB Index FileStore
| Layer | Technology | Why |
|---|---|---|
| Backend | Strapi 5 | Headless CMS with built-in admin |
| Database | PostgreSQL (Neon) | Relational + JSON support |
| Queue | BullMQ + Redis | Async processing with retries |
| Search | Meilisearch | Fast typo-tolerant search |
| RAG | Google Gemini | Semantic search & embeddings |
| Storage | Cloudflare R2 | Zero egress fees |
| Frontend | React 18 + Vite | Fast builds, great DX |
See .Gemini/STACK.md for detailed rationale.
PromovereAtlasPim/
βββ backend/ # Strapi 5 backend
β βββ src/
β β βββ api/
β β β βββ product/ # Product content type
β β β βββ promidata-sync/ # Sync orchestration
β β β βββ gemini-sync/ # RAG admin endpoints
β β βββ services/
β β βββ gemini/ # Gemini RAG service β
β β βββ promidata/ # Promidata integration
β β βββ queue/ # BullMQ workers
β βββ config/ # Strapi configuration
β
βββ frontend/ # React frontend
β βββ src/
β βββ components/ # Reusable components
β βββ pages/ # Product list/detail
β βββ hooks/ # Custom hooks
β
βββ .Gemini/ # Documentation
βββ INDEX.md # Documentation index
βββ STACK.md # Tech stack details
βββ DECISIONS.md # Architectural decisions
cd backend
# Test with mock products
node test-gemini-simple.js
# Test with real database products
node test-sync-direct.jsExpected Output:
β
Complete: 5/5 synced
| Document | Purpose |
|---|---|
| CLAUDE.md | System overview & commands |
| .Gemini/INDEX.md | Documentation index |
| .Gemini/STACK.md | Tech stack details |
| .Gemini/DECISIONS.md | Architecture decisions |
| Walkthrough | Gemini RAG implementation |
- β 89% Sync Efficiency: Hash-based incremental updates
- β 5/5 Products Synced: Gemini RAG production-ready
- β 56 Suppliers: Full Promidata integration
- β Multilingual: 4 languages with fallback
- β Headless Architecture: Flexible frontend options
- Strapi 5 setup with PostgreSQL
- Product β ProductVariant hierarchy
- Promidata sync with hash optimization
- Meilisearch integration
- Gemini RAG integration
- BullMQ queue system
- Separate Next.js repo with Vercel AI SDK
- Tool calling orchestration
- Semantic search UI
- Multi-brand support
- Product recommendations via Gemini
- Advanced analytics
- Multi-tenant support
- API rate limiting & caching
This project follows a strict feature branch workflow:
- Create feature branch:
feature/your-feature - Make changes with clear commits
- Create Pull Request
- Never push directly to main
See CLAUDE.md for detailed contribution guidelines.
[Your License Here]
For questions or issues:
- π Check CLAUDE.md for common solutions
- π Review .Gemini/DECISIONS.md for architecture context
- π Open an issue with detailed reproduction steps
Built with β€οΈ using Strapi, React, and Google Gemini
Last updated: 2025-11-19