symfony/ai-surreal-db-message-store
SurrealDB Message Store integration for Symfony AI Chat. Persist and retrieve chat messages using SurrealDB, with guidance for HTTP-based SurrealDB setups. Part of the Symfony AI ecosystem; contribute or report issues in the main symfony/ai repo.
HttpClient, Serializer, and MessageStoreInterface. Laravel would require custom abstractions or a Symfony interop layer, adding complexity.MessageStoredEvent) that Laravel’s event system (Illuminate\Events) wouldn’t natively support without translation.symfony/dependency-injection.doctrine/dbal for PostgreSQL, predis/predis for Redis) or packages like spatie/laravel-surreal (if available) might offer better integration with Laravel’s ecosystem.HttpClient vs. Laravel’s Http facade.Serializer vs. Laravel’s Illuminate\Support\Serializer or spatie/array-to-object.Illuminate\Events.HttpClient with Laravel’s Http or Guzzle.MessageStoreInterface to Laravel’s service container.laravel-ai-surreal-message-store). Risk: High maintenance burden if Symfony AI Chat evolves.Symfony\Contracts\HttpClient\Exception\*) wouldn’t map cleanly to Laravel’s Illuminate\Http\Client\ConnectionException.PHPUnit + Mockery vs. Symfony’s PHPUnitBridge).php artisan migrate) wouldn’t apply here, requiring manual SCRIPT updates in SurrealDB.jsonb, Redis, or a custom Eloquent model)?spatie/laravel-surreal (if available)?HttpClient → Http facade, Serializer → spatie/array-to-object). Best for: Teams willing to maintain a custom fork.Http facade or Guzzle. Pros: No SurrealDB driver needed. Cons: Higher latency than native drivers.NS:DB:ROLE) isn’t Laravel-native. Solutions:
app()->bind(MessageStoreInterface::class, SurrealDbMessageStore::class)).MessageStored), these would need to be translated to Laravel’s event system or handled via callbacks.| Step | Action | Tools/Dependencies | Risk |
|---|---|---|---|
| 1 | Assess Feasibility | Evaluate alternatives (PostgreSQL, Redis, custom Eloquent). | Low |
| 2 | Choose Integration Approach | Decide between fork/adapt/custom/hybrid. | Medium |
| 3 | Set Up SurrealDB | Install SurrealDB, configure tables (messages, conversations). |
Low |
| 4 | Replace Symfony Dependencies | Swap HttpClient → Http facade, Serializer → Laravel serializer. |
High |
| 5 | Implement Authentication | Adapt NSM auth to Laravel (e.g., middleware, tokens). | Medium |
| 6 | Create Laravel Service |
How can I help you explore Laravel packages today?