A comprehensive B2B e-commerce platform facilitating seamless interactions between buyers and suppliers, featuring RFQ management, real-time messaging, order processing, and supplier verification.
This enterprise-grade B2B platform connects buyers with verified suppliers, streamlining the procurement process through a robust set of features including Request for Quotation (RFQ) management, supplier verification, bulk pricing, and real-time communication.
- For Buyers: Streamlined procurement, competitive quotes, and transparent supplier interactions
- For Suppliers: Expanded market reach, efficient quote management, and sales analytics
- For Admins: Complete oversight, verification controls, and comprehensive reporting
- Multi-role authentication (Admin, Buyer, Supplier)
- Email verification and password reset
- Role-based access control (RBAC)
- Session management
- Pending approval state for new suppliers
- Comprehensive product catalog with bulk pricing tiers
- Supplier-specific product listings
- Stock management and tracking
- Category-based organization
- Product approval workflow
- Create and manage RFQs with detailed specifications
- Multi-supplier quote submission
- Quote comparison tools
- Automated RFQ numbering
- Status tracking (Open, Quoted, Closed)
- Real-time conversation between buyers and suppliers
- RFQ-specific communication threads
- Read/unread message tracking
- Conversation history
- Message search functionality
- Streamlined order creation from accepted quotes
- Comprehensive order lifecycle (Pending β Confirmed β Processing β Shipped β Delivered)
- Payment status tracking
- Order confirmation workflow
- Invoice generation
- Sales analytics for suppliers
- Buyer purchasing patterns
- Quote success rates
- Product performance metrics
- Financial reporting
- Complete user lifecycle management
- Role assignment and modification
- Account activation/deactivation
- User profile management
- Document verification workflow
- Trade license validation
- Verification status tracking
- Rejection with reason
- Cross-supplier order monitoring
- Order status management
- Dispute resolution
- Payment verification
- New product moderation
- Price validation
- Category assignment
- Quality control
- Sales performance metrics
- Quote response rates
- Active RFQs
- Recent orders
- Bulk price configuration
- Inventory management
- Product image uploads
- Product status control
- RFQ browsing and filtering
- Quote submission with product breakdown
- Quote editing and updates
- Expired quote handling
- Active RFQs overview
- Recent quotes
- Order status tracking
- Saved suppliers
- RFQ creation with product specifications
- Quote comparison tool
- Quote acceptance/rejection
- RFQ status tracking
- Framework: Laravel 10.x
- Database: MySQL 8.0+
- Authentication: Laravel Sanctum
- API: RESTful API with API Resources
- Queue: Redis (for jobs and messaging)
- Framework: React 18.x
- State Management: React Context API / Redux
- Routing: React Router v6
- Styling: Tailwind CSS
- HTTP Client: Axios
- Real-time: Laravel Echo with Pusher
Users
βββ id (PK)
βββ name, email, password
βββ role (admin/buyer/supplier)
βββ is_active
Suppliers
βββ id (PK)
βββ user_id (FK)
βββ company_name, trade_license
βββ verification_status
βββ contact information
Products
βββ id (PK)
βββ supplier_id (FK)
βββ name, description
βββ base_price, bulk_prices (JSON)
βββ stock_quantity
βββ status
ProductBulkPrices
βββ id (PK)
βββ product_id (FK)
βββ min_quantity, max_quantity
βββ price
RFQs
βββ id (PK)
βββ rfq_number
βββ buyer_id (FK)
βββ title, description
βββ products_requested (JSON)
βββ status
RFQQuotes
βββ id (PK)
βββ quote_number
βββ rfq_id (FK)
βββ supplier_id (FK)
βββ total_amount
βββ product_breakdown (JSON)
βββ status
Orders
βββ id (PK)
βββ order_number
βββ buyer_id (FK)
βββ supplier_id (FK)
βββ rfq_id (FK)
βββ total_amount
βββ payment_status
βββ order_status
OrderItems
βββ id (PK)
βββ order_id (FK)
βββ product_id (FK)
βββ product_name
βββ quantity, unit_price, total_price
βββ (snapshot data)
Messages
βββ id (PK)
βββ sender_id (FK)
βββ receiver_id (FK)
βββ rfq_id (FK)
βββ message
βββ is_read
Carts
βββ id (PK)
βββ user_id (FK)
βββ session_id
βββ amounts breakdown
βββ shipping information
CartItems
βββ id (PK)
βββ cart_id (FK)
βββ product_id (FK)
βββ supplier_id (FK)
βββ quantity
βββ unit_price
- PHP 8.1+
- Composer
- Node.js 18+
- MySQL 8.0+
- Redis (optional, for queues)
# Clone the repository
git clone https://github.com/yourcompany/b2b-platform.git
cd b2b-platform
# Install PHP dependencies
composer install
# Copy environment file
cp .env.example .env
# Configure database in .env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=b2b_platform
DB_USERNAME=root
DB_PASSWORD=
# Generate application key
php artisan key:generate
# Run migrations and seeders
php artisan migrate --seed
# Create storage link
php artisan storage:link
# Start development server
php artisan serve# Install NPM dependencies
npm install
# Compile assets for development
npm run dev
# For production
npm run buildphp artisan queue:workb2b-platform/
βββ app/
β βββ Http/
β β βββ Controllers/
β β β βββ Admin/
β β β βββ Auth/
β β β βββ Buyer/
β β β βββ Supplier/
β β βββ Middleware/
β βββ Models/
β βββ Services/
βββ database/
β βββ migrations/
β βββ seeders/
βββ resources/
β βββ js/
β βββ Components/
β βββ Layouts/
β βββ Pages/
β β βββ Admin/
β β βββ Auth/
β β βββ Buyer/
β β βββ Supplier/
β β βββ Profile/
β βββ app.jsx
βββ routes/
β βββ web.php
β βββ api.php
βββ tests/
βββ Feature/
βββ Unit/
- CSRF Protection: Enabled for all routes
- XSS Prevention: Input sanitization and output encoding
- SQL Injection Prevention: Eloquent ORM with parameter binding
- Authentication: Sanctum tokens with proper expiration
- Authorization: Policies and gates for all models
- Rate Limiting: API rate limiting per user role
- Session Security: Secure session configuration
# Run all tests
php artisan test
# Run specific test suite
php artisan test --testsuite=Feature
php artisan test --testsuite=Unit- Caching: Redis for session and cache
- Database Indexing: Optimized indexes for frequent queries
- Lazy Loading: Prevent N+1 queries with eager loading
- Pagination: All listings use pagination
- Asset Minification: Compiled and minified assets
- Image Optimization: Automatic image resizing and caching
The API follows RESTful principles with JSON responses. Key endpoints:
POST /api/login- User authenticationPOST /api/register- New registrationPOST /api/forgot-password- Password reset request
GET /api/buyer/rfqs- List buyer's RFQsPOST /api/buyer/rfqs- Create new RFQGET /api/supplier/quotes- List supplier's quotesPOST /api/supplier/quotes- Submit quoteGET /api/messages/conversations- List conversationsPOST /api/messages/send- Send message
The frontend is fully responsive and optimized for:
- Desktop (1200px+)
- Tablet (768px - 1199px)
- Mobile (320px - 767px)
Currently supports:
- English (default)
- Additional languages can be added via Laravel's localization system
- Error Tracking: Laravel log files
- Performance Monitoring: Laravel Telescope (development)
- User Activity: Activity log model for critical actions
Example GitHub Actions workflow for testing and deployment:
name: Tests
on: [push, pull_request]
jobs:
laravel-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Execute tests
run: php artisan testThis project is proprietary software owned by [Your Company Name]. All rights reserved.
- [Developer Name] - Lead Developer
- [Developer Name] - Frontend Specialist
- [Developer Name] - QA Engineer
For technical support or inquiries:
- Email: [email protected]
- Documentation: https://docs.yourcompany.com
- Issue Tracker: https://github.com/yourcompany/b2b-platform/issues
- Multi-currency support
- Advanced analytics dashboard
- API rate limiting improvements
- Webhook integrations
- Mobile applications (iOS/Android)
- AI-powered quote recommendations
- Automated supplier matching
- Blockchain-based contract verification
Built with β€οΈ using Laravel and React