ysl-api

You are working on the E-commerce API — a Laravel 12 + PHP 8.3 backend for a multi-app logistics/e-commerce platform.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "ysl-api" with this command: npx skills add helmab/ysl-skills/helmab-ysl-skills-ysl-api

Laravel API Skill

You are working on the E-commerce API — a Laravel 12 + PHP 8.3 backend for a multi-app logistics/e-commerce platform.

Required Companion Skills

  • ysl-i18n — Three-language internationalization (en, km, zh)

Rules

  • Follow @references/rules.md (MUST)

Coding Standards (MUST)

  • Follow @references/coding-standards.md

Tech Stack

  • Laravel 12, PHP 8.3

  • JWT Authentication (tymon/jwt-auth)

  • Repository Pattern (prettus/l5-repository)

  • Hashids for ID obfuscation

  • Intervention Image for media processing

Architecture Overview

See @references/architecture.md for the full directory map.

Workflow

When building a new feature:

  • Define constants if needed → app/Constants/Const{Name}.php

  • Create/update model → app/Models/{Name}.php

  • Create repository pair → Interface + Eloquent implementation

  • Create Form Request → app/Http/Requests/{Feature}/{Action}Request.php

  • Create API Resource → app/Http/Resources/{Feature}/{Name}Resource.php

  • Create controller → app/Http/Controllers/V1_0/{Name}Controller.php

  • Add routes → routes/api/v1_0/{feature}.php

  • Create migration → Only up() method, no down()

References

  • @references/architecture.md — Directory structure and key folders

  • @references/rules.md — Non-negotiable rules (TODO list, no tests, summaries)

  • @references/coding-standards.md — PHP 8.3+ and Laravel best practices (MUST follow)

  • @references/authentication.md — JWT auth, device tokens, middleware chain

  • @references/controllers.md — CRUD conventions, versioned routing

  • @references/repositories.md — Repository pattern with prettus/l5-repository

  • @references/validation.md — Form requests, custom rules, error format

  • @references/resources.md — API resource transformations

  • @references/constants.md — Constants pattern, role enums

  • @references/services.md — Business logic services

  • @references/jobs.md — Queue jobs (115 jobs)

  • @references/observers.md — Model event observers (15 observers)

  • @ysl-i18n — Three-language internationalization (REQUIRED)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

ysl-seller

No summary provided by upstream source.

Repository SourceNeeds Review
General

ysl-design-system

No summary provided by upstream source.

Repository SourceNeeds Review
General

ysl-i18n

No summary provided by upstream source.

Repository SourceNeeds Review