Problem
@nestjs/bull and bull are in package.json but BullModule is never configured. Long-running operations - Cloudinary image uploads, email notifications, and Stellar blockchain transactions - currently block the HTTP request thread. A slow Cloudinary upload or Stellar network delay causes the entire request to time out.
Proposed Solution
- Configure
BullModule.forRootAsync() in AppModule with Redis connection from ConfigService
- Create a
QueueModule with processors for:
image-upload queue: moves Cloudinary uploads out of the request handler
notification queue: placeholder for future email/push notifications
blockchain queue: placeholder for Stellar transaction submission
POST /api/cloudinary/upload enqueues a job and returns { jobId } immediately
- Add
GET /api/admin/queue/stats (admin-only) returning { waiting, active, completed, failed, delayed }
Acceptance Criteria
Problem
@nestjs/bullandbullare inpackage.jsonbutBullModuleis never configured. Long-running operations - Cloudinary image uploads, email notifications, and Stellar blockchain transactions - currently block the HTTP request thread. A slow Cloudinary upload or Stellar network delay causes the entire request to time out.Proposed Solution
BullModule.forRootAsync()inAppModulewith Redis connection fromConfigServiceQueueModulewith processors for:image-uploadqueue: moves Cloudinary uploads out of the request handlernotificationqueue: placeholder for future email/push notificationsblockchainqueue: placeholder for Stellar transaction submissionPOST /api/cloudinary/uploadenqueues a job and returns{ jobId }immediatelyGET /api/admin/queue/stats(admin-only) returning{ waiting, active, completed, failed, delayed }Acceptance Criteria
POST /api/cloudinary/uploadreturns within 200ms regardless of Cloudinary latencyGET /api/admin/queue/statsFAILEDGET /api/admin/queue/statsreturns 403 for non-admin users