crud-http

Validate PowerX CRUD HTTP implementations for multi-tenant compliance and standardized routing.

357|65|Updated Jul 29, 2022
One-click install
npx skills add https://github.com/ArtisanCloud/PowerX --skill crud-http
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: crud-http
Source: https://github.com/ArtisanCloud/PowerX/tree/main/.codex/skills/crud/http
Command: npx skills add https://github.com/ArtisanCloud/PowerX --skill crud-http

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PowerX projects often suffer from inconsistent CRUD HTTP implementations, leading to maintenance burdens, security gaps, and multi-tenant violations.

Core Features & Use Cases

  • Unified Migration: Centralized cmd/database/migrate.go entry with AutoMigrate only, no raw SQL.
  • Model Conventions: Base models with tenant ID, timestamps, JSON handling, and schema-aware table names.
  • Repository & Service Patterns: BaseRepository composition, context-aware methods, DI registration in deps.go, and audit-logged write operations.
  • Handler & Routing Standards: /api/v1/admin/** prefix, RESTful verbs, DTO validation, and uniform response structures.
  • Testing Requirements: Contract and integration tests covering CRUD, pagination, and soft-delete behavior.

Quick Start

Use the crud-http skill to check that your module follows PowerX CRUD HTTP standards.

Frequently Asked Questions about crud-http

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize CRUD HTTP API implementations in a Golang backend project?

Standardize CRUD HTTP API implementations in Golang by enforcing consistent repository and handler patterns. This ensures multi-tenant compliance, audit logging, and unified response structures across backend modules.

How do I enforce multi-tenant compliance in GORM models?

Enforce multi-tenant compliance in GORM models by validating base model conventions that require tenant IDs, timestamps, schema-aware table names, and proper JSON handling to maintain data isolation across modules.

Does PowerX support centralized database migration without raw SQL?

PowerX supports centralized database migration without raw SQL by using a unified migrate.go entry point. This approach relies exclusively on GORM AutoMigrate to ensure consistent schema updates across the ecosystem.

What is the best way to structure RESTful routes and handlers for admin APIs?

The best way to structure RESTful admin APIs is by enforcing /api/v1/admin/** route prefixes and RESTful verbs. Handler methods must validate DTOs and return uniform response structures to maintain consistency.

Why do I need dependency injection registration in my CRUD service layer?

You need dependency injection registration in your CRUD service layer to properly wire context-aware methods and BaseRepository composition. This ensures audit-logged write operations and consistent dependency management across modules.

What testing requirements apply to CRUD HTTP implementations handling soft-delete behavior?

CRUD HTTP implementations handling soft-delete behavior require contract and integration tests. These tests must cover standard CRUD operations, pagination behavior, and soft-delete functionality to ensure module reliability.