commerce-api-build

Standardize NestJS commerce backend architecture with Prisma, PostgreSQL, and PortOne integration.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/hobbong21/nuxia2 --skill commerce-api-build
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commerce-api-build
Source: https://github.com/hobbong21/nuxia2/tree/main/.claude/skills/commerce-api-build
Command: npx skills add https://github.com/hobbong21/nuxia2 --skill commerce-api-build

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill defines a standardized blueprint for building a robust commerce backend using NestJS, Prisma, and PostgreSQL, ensuring consistent module design and integration points with payment services like PortOne.

Core Features & Use Cases

  • Modular architecture: Defines apps/api/modules for auth, product, cart, order, payment, referral, payout, webhook.
  • End-to-end payment flow: Describes PortOne payment verification, webhook handling, order confirmation, and referral ledger distribution.
  • OpenAPI and shared types: Instructions to generate OpenAPI and publish shared types for front-end consumption.
  • Security and data integrity: Emphasizes Prisma schema, BigInt for amounts, ci encryption, idempotent webhooks.

Quick Start

Follow this blueprint to scaffold the API modules, wire PortOne integration, run migrations, and publish the OpenAPI docs.

Frequently Asked Questions about commerce-api-build

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

FAQPage Schema
How do I structure a NestJS commerce backend with Prisma and PostgreSQL?

A NestJS commerce backend requires modular architecture for auth, product, cart, order, and payment domains. Using Prisma ORM with PostgreSQL ensures consistent module design, enforcing BigInt for monetary values and encrypted customer identifiers for data integrity.

How to handle PortOne payment webhooks in a NestJS API?

Handling PortOne payment webhooks requires implementing idempotent webhook endpoints within your NestJS API. The process involves verifying payment status through PortOne, confirming orders, and distributing referral ledger payouts while ensuring robust idempotency to prevent duplicate processing.

What is the best way to represent monetary values in a Prisma PostgreSQL schema?

The best way to represent monetary values in a Prisma PostgreSQL schema is using BigInt. This approach prevents floating-point precision errors common in financial calculations, ensuring robust data integrity for commerce backend operations like order totals and payouts.

How do I generate OpenAPI schemas and shared types from a NestJS backend?

Generating OpenAPI schemas and shared types from a NestJS backend involves standardizing your API module design. You scaffold the apps/api modules, configure OpenAPI generation, and publish the resulting shared types for front-end consumption to maintain API contract consistency.

Does this NestJS commerce blueprint support a referral payout system?

Yes, the NestJS commerce blueprint supports a referral payout system. It defines specific modules for referral and payout domains, describing how to distribute referral ledger entries after successful PortOne payment verification and order confirmation.

Why should I use BigInt for commerce API design instead of standard numbers?

You should use BigInt for commerce API design to avoid floating-point rounding errors during financial calculations. Standard numbers lose precision with large values, whereas BigInt enforces strict data integrity for monetary amounts in your PostgreSQL database via Prisma.