Skip to content

Instantly share code, notes, and snippets.

@Klerith
Klerith / checkValidations.ts
Last active November 13, 2025 20:46
Validaciones
const checkValidations = () => {
fieldErrors.value = {};
const result = productSchema.safeParse(newProduct.value);
if (!result.success) {
result.error.issues.forEach((issue) => {
const field = issue.path[0];
if (typeof field === 'string') {
@Klerith
Klerith / auth.d.ts
Created November 11, 2025 17:04
Expandir el tipo User de la sesi贸n
// auth.d.ts
declare module '#auth-utils' {
// Define the structure of your user object
interface User {
id: string;
email: string;
name?: string; // Optional field
roles: string[]; // Example of a specific role type
}
@Klerith
Klerith / products.seed.ts
Created November 7, 2025 15:48
Listado de productos para nuestra aplicaci贸n y sitio web de Nuxt
export const products = [
{
slug: 'cloud-storage-saas',
name: 'Cloud Storage Pro',
description:
'Servicio de almacenamiento en la nube seguro y escalable para empresas de cualquier tama帽o.',
price: 100,
images: [
'https://picsum.photos/600/400?random=1',
'https://picsum.photos/600/400?random=2',
@Klerith
Klerith / site-reviews.seed.ts
Created November 6, 2025 22:04
Semilla de rese帽as para el ejercicio de Nuxt
export const siteReviews = [
{
name: 'Carlos Ram铆rez',
subtitle: 'CEO de TechSolutions',
profileImage: 'https://randomuser.me/api/portraits/men/10.jpg',
description:
'Excelente consultor铆a, resolvieron mis dudas y mejoraron mis procesos tecnol贸gicos.',
},
{
name: 'Mariana L贸pez',
<script setup lang="ts">
defineProps<{
buttonLabel: string;
}>();
const reviewText = ref('');
const rating = ref(0);
const isOpen = ref(false);
const submitReview = () => {
<!-- PricingTable -->
<script setup lang="ts">
const tiers = [
{
id: 'solo',
title: 'Solo',
price: '$249',
description: 'Para aut贸nomos.',
billingCycle: '/mes',
@Klerith
Klerith / error.vue
Created October 9, 2025 15:13
Pantalla de error personalizada
<template>
<u-app>
<div class="error-container">
<div class="error-content">
<!-- Animaci贸n del n煤mero 404 -->
<div class="error-code-wrapper">
<h1 class="error-code">{{ error.statusCode || 404 }}</h1>
<div class="error-glow"></div>
</div>
@Klerith
Klerith / instalaciones-nuxt.md
Last active October 18, 2025 15:51
Instalaciones necesarias para el curso de Nuxt
@Klerith
Klerith / agente-voz.md
Created September 3, 2025 18:05
Instrucciones para el agente de voz

Role

Eres un agente de voz de inteligencia artificial que act煤a como asistente oficial de una tienda de art铆culos computacionales.
Tu funci贸n es ayudar a los clientes a consultar y gestionar sus 贸rdenes, as铆 como brindar informaci贸n sobre productos de la tienda, siempre respetando las cl谩usulas de seguridad.

Tools

  • get_order_information: permite consultar la informaci贸n de la orden usando:

  • order_id

@Klerith
Klerith / mi-tienda.instrucciones.md
Created August 26, 2025 18:07
Instrucciones para el agente de mi tienda - Curso de N8N

Instrucciones del Asistente Virtual

Eres un asistente virtual encargado de ayudar a los clientes a consultar y actualizar informaci贸n relacionada con sus 贸rdenes. Debes seguir estas reglas estrictamente.


Flujo General

  1. Identificaci贸n del Cliente
    • Si no tienes el nombre del cliente (name) o el n煤mero de orden (id), debes solicitarlos antes de continuar.
  • Si alguno falta, pregunta: