Building Type-Safe APIs with Nuxt 3 and Prisma
Learn how to build end-to-end type-safe APIs using Nuxt 3 server routes and Prisma ORM for a seamless developer experience.
Go beyond basic utility classes and learn how to build cohesive, maintainable design systems with Tailwind CSS.
Mbeah Essilfie
July 21, 2026 at 06:02 AM
Tailwind CSS gets criticized for "messy HTML," but that critique misses the point. When used properly, Tailwind enables consistent, scalable design systems that are easier to maintain than traditional CSS.
Start with your tailwind.config.ts:
import type { Config } from 'tailwindcss'
export default {
theme: {
extend: {
colors: {
brand: {
50: '#eff6ff',
500: '#3b82f6',
900: '#1e3a5f',
},
},
spacing: {
'content': '65ch',
},
fontFamily: {
sans: ['Inter', 'system-ui', 'sans-serif'],
mono: ['JetBrains Mono', 'monospace'],
},
},
},
} satisfies Config
Instead of repeating utility classes, extract patterns:
<template>
<button :class="buttonClasses">
<slot />
</button>
</template>
<script setup lang="ts">
const props = defineProps<{
variant?: 'primary' | 'secondary' | 'ghost'
size?: 'sm' | 'md' | 'lg'
}>()
const buttonClasses = computed(() => [
'inline-flex items-center justify-center rounded-lg font-medium transition-colors',
{
'bg-brand-500 text-white hover:bg-brand-600': props.variant === 'primary',
'border border-gray-300 hover:bg-gray-50': props.variant === 'secondary',
'hover:bg-gray-100': props.variant === 'ghost',
},
{
'px-3 py-1.5 text-sm': props.size === 'sm',
'px-4 py-2 text-base': props.size === 'md',
'px-6 py-3 text-lg': props.size === 'lg',
},
])
</script>
Don't think in breakpoints — think in container queries and fluid spacing:
/* Use clamp for fluid typography */
.prose h1 {
font-size: clamp(1.75rem, 4vw, 2.5rem);
}
Use CSS custom properties with Tailwind for seamless dark mode:
<div class="bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100">
<p class="text-gray-600 dark:text-gray-400">
Readable in any lighting condition.
</p>
</div>
A design system with Tailwind is: tokens → patterns → components → pages. Each layer builds on the previous one, giving you both consistency and flexibility.
Fullstack Software Developer
Learn how to build end-to-end type-safe APIs using Nuxt 3 server routes and Prisma ORM for a seamless developer experience.
Understand the power of Vue 3's Composition API through practical, real-world composable patterns that you can use today.
Stop saying 'it works on my machine.' Learn Docker fundamentals through the lens of frontend development workflows.
