CaafiHub: Case Study
CaafiHub case study by Rahim Ullah: a B2B healthcare marketplace with a Flutter Android app, Laravel dashboards, verified suppliers and inventory management.
A Flutter Android app and Laravel dashboards connecting verified pharmacies with medical wholesalers in Somalia.
The Challenge
Healthcare retailers in Somalia needed a reliable way to find verified medical wholesalers, check stock and prices, and follow orders through fulfillment. Wholesalers needed tools to publish inventory and manage incoming orders, while administrators needed controlled access to business documents and financial records. The platform also had to prevent unapproved businesses from ordering, respect supplier operating hours and keep inventory consistent when several retailers checked out at once.
The Solution
One platform, three working environments
I designed and developed the Flutter Android retailer app, versioned Laravel REST API, and separate admin and wholesaler dashboards built with Blade. Retailers can register a pharmacy, browse and filter approved products, manage a cart and track orders. Wholesalers manage their catalogue, stock and fulfillment, while administrators oversee verification, product moderation and platform activity.
Business verification and controlled access
I built document submission, review, rejection and resubmission workflows for retailers and wholesalers. Verification files remain in private storage behind authorized routes. Role and approval checks restrict pending businesses to their verification workflow. The Android app uses revocable authentication tokens and encrypted device storage, with email OTP password recovery and session revocation after sensitive account changes.
Inventory and checkout that agree
Product management covers batches, expiry dates, quantities and moderation. Checkout revalidates current prices, stock, product approval and wholesaler availability on the server. PostgreSQL transactions, row locking and inventory reservation protect stock during checkout, while a cart containing several suppliers becomes separate wholesaler orders. Weekly schedules use Somalia's timezone, and temporary closures prevent ordering until a supplier reopens.
Financial records and timely updates
I implemented manually administered payment and escrow status tracking, commission calculations and refund workflows. Administrators record and review payment, escrow and refund states. Database notifications, OneSignal Android push messages and queued Resend emails keep users informed about verification, orders and refunds. Notification taps open the relevant order in the app.
Testing and production delivery
My work included backend feature tests and Flutter tests for authentication, verification, ordering and error handling. I added pagination, retry states, pull to refresh and session handling to the app, then deployed the backend and web dashboards to a Hostinger VPS with Nginx, HTTPS, PostgreSQL and Redis. Persistent queue workers and scheduled jobs handle background delivery and maintenance.
The Result
CaafiHub now provides a deployed Phase 1 marketplace foundation covering verified onboarding, approved product discovery, inventory management, ordering, fulfillment, financial status tracking and refunds. The Android retailer app is coming soon; wholesalers and administrators manage their work through the deployed web portals. The platform brings those workflows together through a shared Laravel backend, with notifications and audit records supporting day to day operations.
Key Features
Delivered capabilities across the retailer app and the two web dashboards.
- Business verification with private documents and resubmission
- Approved product catalogue with search and filters
- Batch, expiry date and stock management
- Inventory reservation and transactional checkout
- Separate orders for each wholesaler in a shared cart
- Server enforced business hours and temporary closures
- Order fulfillment tracking and supplier communication
- Manual payment and escrow status administration
- Commission records and refund workflows
- In-app updates, OneSignal push and Resend emails
- Password recovery and authentication session revocation
- Production VPS deployment with queues and scheduled jobs

