Skip to content

Instantly share code, notes, and snippets.

@Klerith
Klerith / schema.prisma
Created January 15, 2026 19:39
Esquema de Prisma a utilizar
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
generator client {
provider = "prisma-client"
output = "../src/generated/prisma"
}
@Klerith
Klerith / WebSocketContext.tsx
Created January 13, 2026 14:51
WebSocket context creado en el curso
import {
createContext,
useCallback,
useEffect,
useRef,
useState,
type ReactNode,
} from 'react';
import type { Client, LatLng } from '../types';
import Cookies from 'js-cookie';
import {
createContext,
useCallback,
useEffect,
useState,
type ReactNode,
} from 'react';
type ConnectionStatus = 'connecting' | 'connected' | 'disconnected' | 'error';
@Klerith
Klerith / index.css
Created December 22, 2025 19:30
Estilos para la aplicación de partidos políticos
:root {
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
color-scheme: dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
font-synthesis: none;
@Klerith
Klerith / README.md
Created December 22, 2025 17:23
Partidos políticos - README

WebSocket Server - Partidos Políticos

Ejecutar en dev

  1. Clonar proyecto
  2. Ejecutar bun install
  3. Crear .env basado en .env.template
  4. Ejecutar bun run dev

Probar en el navegador

@Klerith
Klerith / default-parties.data.ts
Created December 20, 2025 16:55
Partidos políticos iniciales
import type { PoliticalParty } from '../types';
import { generateUuid } from '../utils/generate-uuid';
const defaultParties = [
{
name: 'Partido Rojo',
color: 'rgba(220, 53, 69, 0.2)',
borderColor: 'rgb(220, 53, 69)',
votes: 42,
},
@Klerith
Klerith / instalaciones-react.md
Last active January 16, 2026 17:11
Instalaciones necesarias para el curso de WebSockets + React + Bun

React Native Logo     

@Klerith
Klerith / instalaciones-tailwindcss.md
Last active January 8, 2026 16:09
Instalaciones necesarias para el curso de TailwindCSS
@Klerith
Klerith / calculator.service.ts
Created November 27, 2025 14:46
Pruebas en ls servicios con señales
it('should be created', () => {
// todo:
});
it('should be created with default values', () => {
// todo:
});
it('should set resultText, subResultText to "0" when C is pressed', () => {
@Klerith
Klerith / requirements.md
Created November 20, 2025 15:27
Requerimientos establecidos

Lineamientos para App de Venta de Propiedades y Presentación Web

Este documento define los requerimientos mínimos para una plataforma enfocada únicamente en venta de propiedades y su visualización en un sitio web público.

Requerimientos de desarrollo

  • Nuxt 4+
  • Tailwind CSS
  • TypeScript
  • Prisma