project_viewer.sh
user@portfolio:~$ cat dejavu-crm-backend.project

DEJAVU CRM BACKEND

Enterprise-grade REST API for managing consignment workflows, sales orders, delivery logistics, and payment processing with granular role-based permissions

[STATUS] completed
[TYPE] api
[DATE] 01.01.2024 → 07.20.2025

[TECH_STACK]

Laravel 10 PHP 8.1 MySQL AWS S3 Laravel Sanctum Spatie Permissions Laravel WebSockets DomPDF L5 Swagger Maatwebsite Excel Twilio Pusher
[PROJECT_DETAILS]

Dejavu CRM Backend - Consignment & E-commerce Management System

A comprehensive Laravel-based REST API backend powering a full-featured consignment and e-commerce CRM platform. The system orchestrates complex business workflows from product consignment and appraisal through sales, delivery, and payment processing, serving both internal staff and external customers.

Key Features

  • Complete Consignment Workflow - End-to-end management from item submission → appraiser assignment → proposal generation → contract signing → product listing for sale
  • Advanced Sales Engine - Shopping cart system, multi-payment methods, order status tracking, and automated delivery order generation
  • Logistics Management - Delivery order tracking with logistic staff assignment, scheduled deliveries, status updates, and receipt uploads
  • Payment Processing - Payment order creation, voucher generation (PDF), status tracking (pending/approved/rejected), and multi-payment method support
  • Granular RBAC - Hierarchical role-based access control using Spatie Permissions with 40+ custom permissions and role management capabilities
  • Real-time Notifications - Multi-channel notifications (Email, SMS via Twilio, WhatsApp) for workflow events
  • E-commerce Integration - Bidirectional sync with external e-commerce platform (V2 & V3 APIs) for user accounts and orders
  • Electronic Billing - Integration with EBI electronic billing system for invoice generation
  • Document Generation - Automated PDF generation for contracts, vouchers, sale receipts, and product stickers
  • Excel Reporting - Comprehensive export functionality for users, products, sales, deliveries, and statistical reports
  • Statistics Dashboard - Advanced analytics for sales, consignors, and payment orders with filtering and date range support
  • Automated Workflows - Scheduled tasks for product expiry tracking, abandoned cart cleanup, auto-accept proposals, and payment status updates

Technical Highlights

Built with Laravel 10 and PHP 8.1, leveraging enterprise-grade packages and services for scalability and reliability:

Architecture

  • RESTful API Design - Clean, resource-based endpoints with comprehensive OpenAPI/Swagger documentation
  • Token-based Authentication - Laravel Sanctum for secure, stateless API authentication
  • Custom Permission System - Route-to-permission mapping via config/api_permissions.php with middleware enforcement
  • Eloquent ORM - Complex relationships and eager loading optimization to prevent N+1 queries
  • Service-oriented Controllers - Large-scale controllers (100KB+) handling complete feature workflows

Key Integrations

  • AWS S3 - Cloud storage for product images, legal documents, and delivery receipts
  • Laravel WebSockets - Real-time updates using Pusher-compatible WebSocket server
  • Twilio API - SMS notifications for critical workflow events
  • External APIs - E-commerce platform integration with Basic Auth and API versioning support
  • EBI System - Electronic billing integration for compliance

Data Management

  • MySQL Database - Optimized schema with 50+ tables handling complex business relationships
  • Database Migrations - 80+ migration files including permission/role seeding
  • Soft Deletes - User data retention with soft delete patterns
  • Custom Validation - Luhn algorithm for Panama RUC/legal document validation

Developer Experience

  • Laravel Pint - Automated code formatting
  • PHPUnit Testing - Unit and feature test suites
  • API Documentation - Auto-generated from PHPDoc annotations
  • Scheduled Commands - 10+ custom Artisan commands for maintenance and automation
  • Comprehensive Logging - Laravel logging for debugging and monitoring

Business Impact

This system powers critical business operations for a consignment and e-commerce company, handling:

  • Multi-role user management (Admin, Sales Manager, Appraiser, Logistics, Consignor, Customer)
  • Complex approval workflows with email/SMS notifications at each stage
  • Financial transaction tracking and payment order processing
  • Inventory management through product lifecycle (consignment → active → sold → delivered)
  • Statistical reporting for business intelligence and decision-making

The modular architecture and extensive permission system allow for flexible business rule configuration while maintaining data security and workflow integrity.

EOF: Data loaded