Shopify Import

Objective:

Develop a Laravel application with a frontend dashboard for importing a Shopify store's data into Laravel. The app must integrate Shopify's API, process large datasets efficiently, and provide a seamless UI for monitoring and managing the import process.


Key Features:

1. Shopify API Integration

2. Frontend Dashboard

Build a responsive dashboard using Laravel with UI (You can use either Inertia, Livewire, or Pure blade components with Jquery):

3. Conflict Resolution

4. Custom Field Mapping

5. Progress Tracking

6. Data Storage

Design a normalized schema for imported data:

7. Error Handling & Logs


Requirements:

Database Schema

Design a relational schema to store Shopify data:

sql
Copy code
products
- id
- shopify_id
- title
- description
- price
- inventory
- collection_id

collections
- id
- shopify_id
- name
- description

orders
- id
- shopify_id
- customer_id
- total_price
- status

customers
- id
- shopify_id
- name
- email
- phone

Frontend Dashboard Pages

  1. Connect Shopify Store:
    • Step-by-step OAuth integration with a button to connect the store.
    • Store the access_token securely in the database.
  1. Import Status Page:
    • Progress bar showing import completion percentage.
    • Real-time logs of import events (e.g., "Imported product ID 123").
  1. Conflict Resolution Page:
    • Table displaying conflicts with options to resolve.
  1. Data Management:
    • Paginated tables for viewing products, orders, and customers with search and filter functionality.

Endpoints:

Backend API Endpoints

  1. POST /api/shopify/connect: Handle OAuth and store the access token.
  1. POST /api/shopify/import: Start the import process for a Shopify store.
  1. GET /api/shopify/progress: Fetch real-time progress of the import process.
  1. GET /api/shopify/logs: Fetch logs for the current import session.
  1. POST /api/shopify/conflicts/resolve: Handle conflict resolutions.

Features to Implement in the Frontend:


Bonus Challenges:

  1. Webhooks:
    • Set up Shopify webhooks to sync data in real-time after the import.
  1. Export Data:
    • Allow users to export imported data to CSV from the dashboard.
  1. Multi-Tenancy:
    • Support multiple Shopify stores per Laravel instance.

Evaluation Criteria:

  1. Code Quality:
    • Use PSR standards, SOLID principles, and clean architecture.
  1. UI/UX:
    • User-friendly and responsive frontend.
  1. Performance:
    • Handle large datasets efficiently using queues and chunked processing.
  1. Testing:
    • Write PHPUnit tests for backend logic and tests for frontend components.