nazim-api-domain-types

Enforce snake_case API types and camelCase domain models with mapper functions.

Updated Nov 15, 2025
One-click install
npx skills add https://github.com/AHMADJAN-New/nazim-web --skill nazim-api-domain-types
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nazim-api-domain-types
Source: https://github.com/AHMADJAN-New/nazim-web/tree/main/.cursor/skills/nazim-api-domain-types
Command: npx skills add https://github.com/AHMADJAN-New/nazim-web --skill nazim-api-domain-types

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces a strict separation between API data structures and internal domain models, preventing type inconsistencies and improving code maintainability in the Nazim frontend.

Core Features & Use Cases

  • Type Safety: Ensures that data coming from the API (snake_case) is correctly mapped to the frontend's internal domain models (camelCase).
  • Maintainability: Simplifies updates by isolating API changes from domain logic.
  • Use Case: When developing a new feature that displays student information, this Skill guides you to define API types, domain types, and a mapper function to ensure seamless data flow and consistent naming conventions.

Quick Start

Follow the file structure and mapping guidelines outlined in the SKILL.md to create new API and domain types for a resource.

Frequently Asked Questions about nazim-api-domain-types

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

FAQPage Schema
How do I separate API types from domain models in TypeScript?

Separating API types from domain models involves defining API data structures in snake_case and internal domain models in camelCase, then using mapper functions for bidirectional conversion to isolate API contracts from domain logic.

Why does my frontend break when the API response changes its naming convention?

Frontend breaks because API changes leak directly into domain logic. Enforcing type separation with dedicated mappers isolates API contracts, preventing naming convention mismatches from breaking internal TypeScript domain models.

What's the best way to map snake_case API responses to camelCase in frontend architecture?

The best way is defining explicit mapper functions that handle bidirectional conversion between API types and domain models, ensuring type safety and preventing inconsistent data flow across frontend components.

How do I create mapper functions for API to domain type conversion?

Creating mapper functions requires defining both API and domain types for a resource, then writing functions that convert data bidirectionally, following file structure guidelines to ensure seamless data flow and consistent naming.

Does nazim-api-domain-types work with existing hook and component patterns?

Yes, the Skill manages hook and component usage patterns alongside type definitions and mapper functions, guiding integration of API and domain types into existing frontend workflows.

When do I need to enforce strict API and domain type separation?

Strict type separation is needed when developing features displaying API data, to simplify updates and improve maintainability by isolating API contract changes from internal frontend domain logic.