Skip to content
Agentmart
Submit a tool

sync-types

Sincronización de tipos entre backend y frontend.

Skill by myquota

IndexedMIT★ 2
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/cabrerojas-sync-types

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Sincronización de tipos entre backend y frontend. Mapeo de modelos a interfaces. Trigger: Cuando se modifican tipos compartidos o se sincronizan con modelos del backend.

Use cases: frontend, backend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/sync-types

What's inside

Skill name
sync-types
Description
Sincronización de tipos entre backend y frontend. Mapeo de modelos a interfaces. Trigger: Cuando se modifican tipos compartidos o se sincronizan con modelos del backend.
License
MIT
Metadata
author: myquota · version: 1.0
Instructions
194 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

## Propósito

Mantener sincronizados los tipos entre `myquota-backend` y `myquota-app`.

---

## Mapeo de Tipos

| Modelo Backend (`myquota-backend/src/modules/*/model.ts`) | Tipo Frontend (`src/shared/types/`) |
|-----------------------------------------------------------|-------------------------------------|
| `CreditCard` | `creditCard.ts` → `CreditCard` |
| `Transaction` | `transaction.ts` → `Transaction` |
| `Quota` | `quota.ts` → `Quota` |
| `BillingPeriod` | `billingPeriod.ts` → `BillingPeriod` |
| `User` | `user.ts` → `UserInfo` |
| `Category` | `category.ts` → `Category` |

---

## Regla Principal

> Cuando se agrega, renombra o elimina un campo en una entidad del backend, 
> **TAMBIÉN** se debe actualizar la interface correspondiente en `src/shared/types/`.

---

## Diferencias Backend ↔ Frontend

| Aspecto | Backend (model.ts) | Frontend (types/) |
|---------|-------------------|-------------------|
| Sintaxis | `class` con `!:` | `interface` |
| Fechas | `Date` | `string` (ISO 8601) |
| IBaseEntity | `implements` | Copiar campos |

### Conversión de Fechas

La API serializa `Date` a ISO strings:

```typescript
// Backend
createdAt!: Date;

// Frontend
createdAt: string;  // "2025-03-15T00:00:00.000Z"
```

---

## Ejemplo: Agregar Campo

### 1. Backend modifica modelo

```typescript
// myquota-backend/src/modules/creditCard/creditCard.model.ts
export class CreditCard implements IBaseEntity {
  id!: string;
  createdAt!: Date;
  updatedAt!: Date;
  deletedAt?: Date | null;

  name!: string;
  lastFourDigits!: string;
  color!: string;
  newField!: string;  // ← NUEVO
}
```

### 2. Frontend actualiza interface

```typescript
// myquota-app/src/shared/types/creditCard.ts
export interface CreditCard {
  id: string;
  createdAt: string;
  updatedAt: string;
  deletedAt?: string | null;

  name: string;
  lastFourDigits: string;
  color: string;
  newField: string;  // ← SINCRONIZAR
}
```

---

## Template de Interface

```typescript
// src/shared/types/myEntity.ts

export interface MyEntity {
  // Campos de IBaseEntity (siempre presentes)
  id: string;
  createdAt: string;
  updatedAt: string;
  deletedAt?: string | null;

  // Campos específicos de la entidad
  name: string;
  // ...
}

// DTO para crear
export interface CreateMyEntityDto {
  name: string;
  // Campos requeridos para crear (sin id, sin fechas)
}

// DTO para actualizar
export type UpdateMyEntityDto = Partial<CreateMyEntityDto>;
```

---

## Campos de IBaseEntity

Todos los modelos del backend tienen estos campos base:

From cabrerojas/myquota-app, MIT.

More from cabrerojas/myquota-app

Signals

Stars
2
Forks
0
Open issues
0
Last commit (this folder)
Aug 15, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
1.0
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from myquota

Cite this page

sync-types skill. Agent Mart. https://agentmart.dev/skills/cabrerojas-sync-types (last updated 2026-10-24)