How mohamed2007sarhan/movexbackend works
MoveX is a unified backend for on-demand services. Its main workflow is a user request entering the API, being handled by a vertical-specific service, becoming an order, progressing through fulfillment, and—where applicable—settling through the wallet. The README also documents bidding and AI matching, identity and role switching, safety/KYC, administration, tracking, promotions, and reviews. The excerpts show selected wiring; links for unsampled subsystems are included only where the README or sampled code supports them.
Main entry points: app.ts API application · db.ts PostgreSQL via Prisma · wallet.service.ts Wallet and ledger · admin.router.ts Admin suite
Components 25
API and identity
- HTTP and socket server
src/server.ts - API application
src/app.ts - Authentication
src/core/auth/auth.service.ts - Role gateway
src/modules/gateway/gateway.router.ts
Service verticals
- Food delivery
src/modules/food/food.service.ts - Ride-hailing
src/modules/ride/ride.service.ts - Handyman services
src/modules/handyman/handyman.service.ts - Moving logistics
src/modules/moving/moving.service.ts - Offers and bidding
src/bidding/offers.controller.ts
Shared services
- AI matching and mediation
src/core/ai/ai.service.ts - Order lifecycle engine
src/core/order-engine/order-engine.service.ts - PostgreSQL via Prisma
src/db.ts - System configuration
src/core/config/system-config.service.ts - Event bus
src/core/events/event-bus.ts
Wallet and finance
- Wallet and ledger
src/core/wallet/wallet.service.ts - Wallet top-up
src/core/wallet/wallet-topup.service.ts
Operations
- Socket service
src/core/sockets/socket.service.ts - Safety and KYC
src/modules/safety/safety.router.ts - Delivery tracking
src/modules/tracking/tracking.router.ts - Delivery ETA
src/core/delivery/delivery-eta.service.ts - Admin suite
src/modules/admin/admin.router.ts - Reviews
src/modules/reviews/reviews.router.ts - Promotions
src/modules/promotions/promotions.router.ts
Other components
- Customer / provider
- Administrator
Connections 33
- Customer / provider → HTTP and socket server: requests
- Administrator → HTTP and socket server: administers
- HTTP and socket server → API application: serves API
- HTTP and socket server → Socket service: initializes
- API application → Authentication: authenticates
- API application → Role gateway: routes context
- API application → Food delivery: routes requests
- API application → Ride-hailing: routes requests
- API application → Handyman services: routes requests
- API application → Moving logistics: routes requests
- API application → Offers and bidding: routes offers
- API application → AI matching and mediation: routes AI requests
- API application → Wallet top-up: initiates top-up
- Food delivery → Order lifecycle engine: creates orders
- Food delivery → PostgreSQL via Prisma: reads and updates
- Offers and bidding → AI matching and mediation: requests mediation
- Offers and bidding → PostgreSQL via Prisma: updates offers
- Order lifecycle engine → PostgreSQL via Prisma: reads and writes
- Order lifecycle engine → Wallet and ledger: settles completion
- Wallet and ledger → PostgreSQL via Prisma: records ledger
- Wallet and ledger → System configuration: reads limits
- Wallet and ledger → Event bus: publishes events
- Admin suite → Order lifecycle engine: advances status
- Admin suite → Wallet and ledger: adjusts balances
- Admin suite → System configuration: manages settings
- Admin suite → PostgreSQL via Prisma: manages records
- Delivery ETA → System configuration: reads parameters
- Delivery ETA → PostgreSQL via Prisma: reads and updates
- Safety and KYC → PostgreSQL via Prisma: records incidents
- Safety and KYC → Socket service: dispatches alerts
- Delivery tracking → PostgreSQL via Prisma: reads tracking data
- Reviews → PostgreSQL via Prisma: stores and reads
- Promotions → PostgreSQL via Prisma: manages promotions