
Logistics and Financial Optimization for Delivery Businesses: A Tailored Management System
Logistics
Overview
Development of a comprehensive web platform for a delivery company, designed to centralize operations, control cash flow, and optimize order assignment. The system replaced inefficient manual processes, giving the client total control over sales, driver activity, and their customer database in real-time.
Client
Junior Domicilios
Date
February 1, 2026
Services
Logistics
Client Challenge (Identified Problem)
The client operated their business using a disjointed mix of WhatsApp chats, paper notes, and disconnected spreadsheets. This fragmented management caused several critical inefficiencies:
- Cash Balancing Issues: Difficulty accurately calculating how much money each driver owed at the end of their shift, resulting in "phantom losses" or financial disputes.
- Data Loss: Customer data (addresses, preferences) was lost in old chat histories, requiring staff to ask for addresses on every repeat order.
- Limited Visibility: It was impossible to know the real-time status of orders or the financial performance of the day without laborious manual calculations.
- "Purchase" Management: Complications in handling complex orders where the driver must buy products with their own money or float, and then be reimbursed.
Proposed Solution (Key Features Developed)
A custom Progressive Web App (PWA) was developed to digitize 100% of operations. Features were specifically designed to solve the business's logistical and financial pain points:
1. Smart Order Management
- Specialized Order Types: Clear differentiation between "Delivery" (transport only) and "Purchase" (product acquisition + transport), each with distinct financial workflows.
- Real-Time Status: Fluid tracking from "Pending" to "Delivered" or "Cancelled," eliminating operational uncertainty.
- Flexible Payment Methods: Native support and reconciliation for Cash, Bank Transfer, and mixed or pending payments.
2. Driver Financial Control ("Cash Balancing")
- Automatic Account Balancing: The system automatically calculates the exact balance each driver must turn in ("The Base"), factoring in cash collected from customers minus service fees and purchase expenses.
- Payment History: Digital record of every cash drop-off by drivers, maintaining a perpetual and transparent balance.
- Driver Profiles: Status management (Active/Inactive) and individual performance reporting.
3. Integrated Customer CRM
- Persistent Database: Automatic saving of every new customer.
- Recurring Addresses: Multiple address system per customer, speeding up phone orders by auto-completing data for frequent users.
4. Reports & Business Intelligence
- Automated Daily Close: Instant generation of reports for total sales, operational costs, and net daily profits.
- Pending Payments Reports: Dedicated module to track and recover revenue from credit orders or pending transfers.
5. Security and Roles
- Role-Based Access Control (RBAC):
- ADMIN: Full access to finances, settings, and sensitive reports.
- DRIVER: Simplified interface to manage their own orders without access to critical global business data.
Technologies Used
A modern stack ("T3 Stack" equivalent) was selected to ensure performance, scalability, and excellent user experience:
- Frontend: Next.js 16 (React 19) with Tailwind CSS 4. Chosen for its hybrid rendering capabilities (SSR/CSR), ensuring fast loads and a reactive interface ideal for mobile use by drivers.
- Backend: Next.js Server Actions and API Routes. For seamless and secure integration between client and server without the overhead of a separate backend.
- Database: PostgreSQL managed with Prisma ORM. Ensures relational data integrity (vital for financial calculations) and allows for efficient complex queries.
- Authentication: NextAuth.js (Auth.js). Robust implementation of secure sessions and role management.
- UI/UX: Shadcn/ui and Radix UI. Accessible and customizable components for agile development of professional interfaces.
Results and Client Impact
- Operational Efficiency: Reduced daily "cash balancing" time from 30+ minutes to instants, eliminating human calculation errors.
- Data Retention: Creation of a digital asset for the company (its customer database), removing reliance on chat history on a single phone.
- Financial Transparency: Total control over complex cash flows (purchases vs. deliveries), reducing monetary discrepancies to virtually zero.
- Scalability: The system supports unlimited orders and drivers, allowing the business to grow without changing its administrative infrastructure.
Value Statement
"The system transformed manual, chaotic, and error-prone management into an agile, transparent, and profitable digital process. It eliminated financial 'black boxes' and allowed the business owner to focus on growth and service quality instead of wasting hours balancing accounts on paper."
Lessons Learned and Reflections
This project reinforced the importance of faithfully modeling business reality in the database. A key challenge was handling the logic for "Purchases," where the driver temporarily finances the product; solving this required careful design of the financial schema to ensure balances always tallied. I learned that a tailored solution doesn't just digitize processes—it can redefine and professionalize the entire operation of a small business.