How cunlim/embed works
CL Embed recommends multilingual product categories by embedding input text and ranking category vectors with cosine similarity. Users also manage category hierarchies and run a five-stage translation/embedding workflow; API clients can search with keys, rate limits, and quotas. The graph preserves authentication, administration, and usage-dashboard capabilities documented in the README. Some backend stages and UI/API wiring are unsampled, so only documented or indexed relationships are shown; uncertain links are omitted.
Main entry points: CategoryController.php Category API · AuthController.php Authentication · Category.php Categories and vectors · ApiController.php External search API
Components 22
User experience
- Recommendation UI
nextjs/app/embed/embed-page-inner.tsx - Category management
nextjs/hooks/useCategories.ts - Admin panel
nextjs/app/admin/admin-layout-client.tsx - Usage dashboard
nextjs/app/mypage/page-content.tsx - Login UI
nextjs/components/auth-buttons.tsx
API and domain
- Category API
laravel/app/Http/Controllers/Api/CategoryController.php - Authentication
laravel/app/Http/Controllers/Api/AuthController.php - External search API
laravel/app/Http/Controllers/Api/ApiController.php - API key controls
laravel/app/Http/Middleware/ApiKeyAuth.php - API usage and quotas
laravel/app/Services/ApiUsageService.php - Category filtering
laravel/app/Services/CategoryQueryService.php - Hierarchy and folders
laravel/app/Services/CategoryHierarchyService.php
AI processing
- Translation and embeddings
laravel/app/Services/CategoryProcessingService.php - Similarity ranking
laravel/app/Services/RecommendationService.php - Query embedding cache
laravel/app/Services/EmbeddingCacheService.php - Provider settings
laravel/app/Services/SettingsService.php
Data and integrations
- Categories and vectors
laravel/app/Models/Category.php - Search history
laravel/app/Models/SearchLog.php - AI providers
laravel/app/Services/Providers - OAuth providers
Other components
- User
- API client
Connections 27
- User → Recommendation UI: enters text
README.md - Recommendation UI → Category API: requests API
README.md - Category API → Category filtering: builds listing
laravel/app/Http/Controllers/Api/CategoryController.php - Category API → Similarity ranking: ranks matches
laravel/app/Http/Controllers/Api/CategoryController.php - Category API → Translation and embeddings: runs steps
laravel/app/Http/Controllers/Api/CategoryController.php - Category API → Categories and vectors: reads categories
laravel/app/Http/Controllers/Api/CategoryController.php - Category API → Hierarchy and folders: manages hierarchy
laravel/app/Http/Controllers/Api/CategoryController.php - Category API → Query embedding cache: uses cached vectors
laravel/app/Http/Controllers/Api/CategoryController.php - Similarity ranking → Categories and vectors: searches vectors
README.md - User → Category management: manages categories
README.md - Category management → Category API: requests API
- User → Login UI: signs in
README.md - Login UI → Authentication: authenticates
- Authentication → Provider settings: reads quota settings
laravel/app/Http/Controllers/Api/AuthController.php - Authentication → OAuth providers: supports OAuth
README.md - Authentication → Categories and vectors: creates user
laravel/app/Http/Controllers/Api/AuthController.php - API client → External search API: submits search
README.md - External search API → API key controls: checks API key
- External search API → API usage and quotas: records usage
- User → Admin panel: administers system
README.md - Admin panel → Provider settings: changes providers
README.md - User → Usage dashboard: checks usage
README.md - Query embedding cache → Search history: reads and writes
laravel/app/Services/EmbeddingCacheService.php - Query embedding cache → AI providers: generates vector
- Translation and embeddings → AI providers: translates and embeds
README.md - Provider settings → AI providers: selects provider
- Category filtering → Categories and vectors: queries categories
laravel/app/Services/CategoryQueryService.php