How usmonabdullaev/smarttj-backend works
SmartTJ is a marketplace REST API serving shoppers, partners, and administrators. The shopper journey centers on browsing and searching the catalog, managing a cart, placing an order, and paying through the Alif integration; accounts, delivery regions, and reviews support that journey. Separate partner and admin surfaces manage listings, fulfillment, moderation, and reporting. The README documents these capabilities and the principal integrations; many implementation files were not sampled, so subsystem-level links are limited to documented relationships.
Main entry points: bullmq Background jobs · orders Order checkout · reviews.service.ts Customer reviews · admin Admin operations
Components 22
Shopper marketplace
- Product catalog
src/modules/products/products.service.ts - Catalog search
src/modules/search - Shopping cart
src/modules/carts - Order checkout
src/modules/orders - Payment gateway
src/modules/payments - Customer reviews
src/modules/reviews/reviews.service.ts
Partner and admin
- Partner operations
src/modules/partner - Admin operations
src/modules/admin - Customer support
src/modules/support
Identity and data
- Authentication
src/modules/auth - Access guards
src/auth/guards/roles.guard.ts - Database access
src/database/prisma/prisma.service.ts
External services
- Alif acquiring
- SMS gateway
src/sms/providers/smsgate.provider.ts - Media storage
src/cloudinary/cloudinary.service.ts - AI services
src/ai/ai.service.ts
Async capabilities
- Background jobs
src/bullmq - Notifications
src/bullmq/notification - PDF generation
src/pdf/pdf.service.ts
Other components
- Shopper
- Partner
- Administrator
Connections 23
- Shopper → Product catalog: browses
- Shopper → Catalog search: searches
- Shopper → Shopping cart: manages cart
- Shopper → Order checkout: checks out
- Shopper → Payment gateway: initiates payment
- Payment gateway → Alif acquiring: uses gateway
- Shopper → Customer reviews: reviews products
- Partner → Partner operations: manages store
- Administrator → Admin operations: administers platform
- Admin operations → Media storage: uploads media
- Admin operations → Background jobs: queues moderation
- Partner operations → Background jobs: queues notifications
- Shopper → Customer support: requests support
- Customer support → AI services: uses AI support
- Authentication → SMS gateway: sends OTP
- Shopper → Authentication: authenticates
- Access guards → Authentication: guards routes
- Order checkout → PDF generation: exports receipts
- Product catalog → Database access: reads catalog data
- Order checkout → Database access: persists orders
- Customer reviews → Background jobs: queues moderation
src/modules/reviews/reviews.service.ts - Customer reviews → Database access: reads and writes
src/modules/reviews/reviews.service.ts - Background jobs → Notifications: dispatches jobs