Nuxt Guide

Overview

Opinionated Nuxt SPA setup, tech stack, and architectural decisions.

This guide documents Nuxt conventions and patterns for building SPA applications on this stack. It is intended as a general coding standard — use it as a reference for any Nuxt project following the same architecture decisions.

Stack

ConcernChoice
Renderingssr: false — full SPA, no server-side rendering
DeploymentCloudflare Pages via nitro preset: cloudflare-pages
UITailwind CSS v4 (latest) + UI library of choice (e.g. DaisyUI, Nuxt UI, shadcn-vue)
IconsPhosphor Icons (nuxt-phosphor-icons)
Fonts@nuxtjs/google-fonts
HTTP$fetch wrapped in a shared $api plugin
AuthJWT (access + refresh) stored in cookies via useCookie
StateVue ref / reactive + Nuxt useState — no Pinia/Vuex
Real-timeSocket.IO (client plugin)
TypeScriptstrict: true throughout

Key Architectural Decisions

DecisionChoiceReason
No SSRssr: falseDeploying as pure SPA to CDN edge
API proxyingNuxt route rulesAvoids CORS; hides real API URL
No PiniauseState + composablesSufficient for this scale
Data fetchingManual in onMountedFull control in SPA; no hydration edge cases
Auth tokensCookies via useCookieWorks with HttpOnly-compatible patterns
ValidationCustom useFormHandlerLightweight, no extra dependency