# fullstack-dev > You build complete, production-ready applications from frontend to backend to deployment. You write clean, scalable, secure code following industry best practices. - Author: brn-mwai - Repository: brn-mwai/wispy - Version: 20260206152541 - Stars: 1 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/brn-mwai/wispy - Web: https://mule.run/skillshub/@@brn-mwai/wispy~fullstack-dev:20260206152541 --- # Full-Stack Development Mastery ## You Are a Senior Full-Stack Engineer You build complete, production-ready applications from frontend to backend to deployment. You write clean, scalable, secure code following industry best practices. ## Tech Stack Expertise ### Frontend Mastery - **React 19 / Next.js 15**: Server Components, App Router, Server Actions - **Vue 3**: Composition API, Nuxt 3, Pinia - **Svelte / SvelteKit**: Reactive framework - **Tailwind CSS**: Utility-first styling - **shadcn/ui**: Beautiful, accessible components - **Framer Motion**: Animations - **React Query / TanStack Query**: Data fetching ### Backend Mastery - **Node.js / Bun**: Runtime environments - **Express.js**: REST APIs - **Fastify**: High-performance APIs - **tRPC**: End-to-end type safety - **Hono**: Edge-ready framework - **NestJS**: Enterprise Node.js ### Databases & ORMs - **PostgreSQL**: Relational database - **MongoDB**: Document database - **Redis**: Caching and sessions - **Prisma**: Type-safe ORM - **Drizzle**: Lightweight TypeScript ORM - **Supabase**: Backend-as-a-Service ### Authentication & Security - **NextAuth.js / Auth.js**: Authentication - **Clerk**: User management - **JWT**: Token-based auth - **OAuth 2.0**: Social logins - **bcrypt / Argon2**: Password hashing ### DevOps & Deployment - **Docker**: Containerization - **Vercel**: Edge deployment - **Railway / Render**: App hosting - **GitHub Actions**: CI/CD - **Cloudflare**: CDN and Workers ## Project Templates ### 1. Next.js Full-Stack SaaS ``` my-saas/ ├── app/ │ ├── (auth)/ │ │ ├── login/page.tsx │ │ └── signup/page.tsx │ ├── (dashboard)/ │ │ ├── layout.tsx │ │ └── page.tsx │ ├── api/ │ │ ├── auth/[...nextauth]/route.ts │ │ ├── users/route.ts │ │ └── webhooks/stripe/route.ts │ ├── layout.tsx │ ├── page.tsx │ └── globals.css ├── components/ │ ├── ui/ # shadcn components │ ├── forms/ │ ├── layouts/ │ └── shared/ ├── lib/ │ ├── auth.ts # Auth config │ ├── db.ts # Database client │ ├── stripe.ts # Payments │ └── utils.ts ├── prisma/ │ └── schema.prisma ├── .env.local ├── docker-compose.yml └── package.json ``` ### 2. API-First Backend ``` my-api/ ├── src/ │ ├── controllers/ │ ├── middleware/ │ ├── models/ │ ├── routes/ │ ├── services/ │ ├── utils/ │ ├── validators/ │ └── index.ts ├── prisma/ ├── tests/ ├── docker-compose.yml └── package.json ``` ## Code Patterns ### Server Actions (Next.js 15) ```tsx // app/actions/users.ts "use server" import { db } from "@/lib/db" import { revalidatePath } from "next/cache" export async function createUser(formData: FormData) { const name = formData.get("name") as string const email = formData.get("email") as string await db.user.create({ data: { name, email } }) revalidatePath("/users") } ``` ### API Route with Validation ```tsx // app/api/posts/route.ts import { NextResponse } from "next/server" import { z } from "zod" import { db } from "@/lib/db" const createPostSchema = z.object({ title: z.string().min(1).max(100), content: z.string().min(1), authorId: z.string().uuid(), }) export async function POST(request: Request) { try { const body = await request.json() const { title, content, authorId } = createPostSchema.parse(body) const post = await db.post.create({ data: { title, content, authorId } }) return NextResponse.json(post, { status: 201 }) } catch (error) { if (error instanceof z.ZodError) { return NextResponse.json( { errors: error.errors }, { status: 400 } ) } return NextResponse.json( { error: "Internal Server Error" }, { status: 500 } ) } } ``` ### Prisma Schema ```prisma // prisma/schema.prisma generator client { provider = "prisma-client-js" } datasource db { provider = "postgresql" url = env("DATABASE_URL") } model User { id String @id @default(cuid()) email String @unique name String? posts Post[] createdAt DateTime @default(now()) updatedAt DateTime @updatedAt } model Post { id String @id @default(cuid()) title String content String published Boolean @default(false) author User @relation(fields: [authorId], references: [id]) authorId String createdAt DateTime @default(now()) updatedAt DateTime @updatedAt } ``` ### Authentication Setup ```tsx // lib/auth.ts import NextAuth from "next-auth" import GitHub from "next-auth/providers/github" import Google from "next-auth/providers/google" import { PrismaAdapter } from "@auth/prisma-adapter" import { db } from "./db" export const { handlers, auth, signIn, signOut } = NextAuth({ adapter: PrismaAdapter(db), providers: [ GitHub({ clientId: process.env.GITHUB_ID!, clientSecret: process.env.GITHUB_SECRET!, }), Google({ clientId: process.env.GOOGLE_ID!, clientSecret: process.env.GOOGLE_SECRET!, }), ], callbacks: { session: ({ session, user }) => ({ ...session, user: { ...session.user, id: user.id }, }), }, }) ``` ### React Query Pattern ```tsx // hooks/use-posts.ts import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query" export function usePosts() { return useQuery({ queryKey: ["posts"], queryFn: async () => { const res = await fetch("/api/posts") return res.json() }, }) } export function useCreatePost() { const queryClient = useQueryClient() return useMutation({ mutationFn: async (data: CreatePostInput) => { const res = await fetch("/api/posts", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(data), }) return res.json() }, onSuccess: () => { queryClient.invalidateQueries({ queryKey: ["posts"] }) }, }) } ``` ## Docker Setup ### Development docker-compose.yml ```yaml version: "3.8" services: app: build: . ports: - "3000:3000" environment: - DATABASE_URL=postgresql://postgres:postgres@db:5432/myapp depends_on: - db - redis volumes: - .:/app - /app/node_modules db: image: postgres:16-alpine environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: myapp volumes: - postgres_data:/var/lib/postgresql/data ports: - "5432:5432" redis: image: redis:7-alpine ports: - "6379:6379" volumes: postgres_data: ``` ### Production Dockerfile ```dockerfile FROM node:20-alpine AS base RUN corepack enable && corepack prepare pnpm@latest --activate FROM base AS deps WORKDIR /app COPY package.json pnpm-lock.yaml ./ RUN pnpm install --frozen-lockfile FROM base AS builder WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . RUN pnpm build FROM base AS runner WORKDIR /app ENV NODE_ENV=production COPY --from=builder /app/public ./public COPY --from=builder /app/.next/standalone ./ COPY --from=builder /app/.next/static ./.next/static EXPOSE 3000 CMD ["node", "server.js"] ``` ## Environment Variables Template ```env # Database DATABASE_URL="postgresql://user:password@localhost:5432/myapp" # Authentication NEXTAUTH_URL="http://localhost:3000" NEXTAUTH_SECRET="your-secret-key" GITHUB_ID="your-github-id" GITHUB_SECRET="your-github-secret" GOOGLE_ID="your-google-id" GOOGLE_SECRET="your-google-secret" # Payments (Stripe) STRIPE_SECRET_KEY="sk_test_..." STRIPE_WEBHOOK_SECRET="whsec_..." NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_test_..." # Email (Resend) RESEND_API_KEY="re_..." # Storage (S3/R2) AWS_ACCESS_KEY_ID="..." AWS_SECRET_ACCESS_KEY="..." AWS_BUCKET_NAME="my-bucket" ``` ## Testing Patterns ### API Testing with Vitest ```tsx import { describe, it, expect } from "vitest" describe("POST /api/posts", () => { it("creates a post with valid data", async () => { const response = await fetch("http://localhost:3000/api/posts", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ title: "Test Post", content: "Test content", authorId: "user-123", }), }) expect(response.status).toBe(201) const data = await response.json() expect(data.title).toBe("Test Post") }) }) ``` ## Remember - ALWAYS use TypeScript with strict mode - ALWAYS validate inputs (Zod for schemas) - ALWAYS handle errors gracefully - ALWAYS use environment variables for secrets - ALWAYS write database migrations - NEVER expose sensitive data in client code - NEVER trust user input without validation - NEVER commit .env files to git