A scalable REST API powering the Usta service marketplace, connecting customers with artisans through real-time communication, geolocation, payments, and secure service workflows.
Gallery
No documented highlights yet.
Usta Backend API is the backend engine powering the Usta service marketplace, connecting customers with professional artisans through a secure, scalable, and real-time platform.
Built with Node.js, Express.js, and MongoDB, the API handles the platform's core business operations while integrating real-time communication, geolocation, identity verification, notifications, and financial workflows.
The backend follows a domain-oriented structure organized around the platform's primary actors:
Admin · Artisan · Customer · Shared
Controllers, routes, services, models, middlewares, and validation layers are separated to keep business logic organized and maintainable.
Express.js powers the REST API, MongoDB and Mongoose handle data persistence, Redis provides caching and high-performance operations, and Socket.io enables real-time communication.
The project also includes role-based Postman Collections for API testing and documentation.
Problem
The Usta platform required a scalable backend capable of powering a multi-sided marketplace connecting customers with professional artisans while handling complex workflows such as nearby provider discovery, service requests, ratings, payments, chat, and notifications. The system also needed reliable identity verification for artisans, secure handling of sensitive data, real-time communication, and a performance-oriented architecture capable of supporting growing traffic and data volume.
Solution
**Usta Backend API** was developed using Node.js, Express.js, and MongoDB as the central backend layer for the entire platform. MongoDB geospatial queries were implemented for location-based artisan discovery, AWS Rekognition was integrated for KYC and face verification workflows, Socket.io powers real-time communication, and Firebase Cloud Messaging handles push notifications. Redis was introduced for caching and queue-related operations, while security was strengthened through JWT authentication, bcryptjs, Helmet, and rate limiting.
Architecture
The backend follows a domain- and role-oriented architecture organized around **Admin, Artisan, Customer, and Shared** domains. Routes are separated from controllers, while complex business logic is encapsulated inside services. Data structures are defined through Mongoose models, with dedicated middlewares handling authentication, security, rate limiting, and file uploads. Validation layers ensure incoming request data is properly validated. This separation keeps business logic organized and allows individual domains to evolve without tightly coupling the entire backend.
Challenges
One of the main challenges was efficiently handling geolocation queries and discovering nearby artisans while maintaining responsive API performance. Integrating KYC and face verification through AWS Rekognition was another significant challenge due to the sensitive nature of identity data and the need to handle different verification states reliably. Supporting real-time chat, media attachments, notifications, and caching also required an architecture that balanced performance, security, and scalability across multiple user roles and business workflows.
Results
The Usta backend provides a unified foundation for the marketplace's core workflows, from user registration and identity verification to artisan discovery, service requests, communication, payments, and reviews. The domain-oriented structure, combined with Redis, MongoDB geospatial queries, and Socket.io, provides an organized backend capable of supporting real-time and location-aware operations. The platform also benefits from dedicated security layers and specialized third-party integrations for identity verification and notifications, while the modular structure provides room for future features and continued platform growth.