Back to case files
> case_file

Thinking Global Painting Co

Thinking Global is a full stack portfolio and lead generation platform for a service business.

Type

// dev

Client

Thinking Global Painting Co

Date

February 2026

Stack
Next.jsRedisPostgresPrismaTailwind CSSReact.jsBunUploadThingResend
Details

Thinking Global is a full stack portfolio and lead generation platform for a service business.

What This Project Does

Public Website

  • Renders a modern landing page with hero, services, about, testimonials, portfolio, and contact sections.
  • Displays published project entries with dedicated project detail pages.
  • Captures inbound leads through a contact form.
  • Sends contact submissions by email and stores them in the database.

Admin Control Panel

  • Provides auth-gated admin portal allowing client to dynamically update site on their own schedule without having to consult us for small data updates.

Core Tech Stack, Why It Was Chosen, and How It Is Used

Framework and Runtime

  • Next.js 16 (App Router)
    • Why: Single framework for server rendering, API routes, route groups, and deployment friendly full stack architecture.
    • How: Public and admin sections are split with route groups and nested app routes under src/app.
  • React 19 + TypeScript
    • Why: Strong component model with strict typing for reliability and maintainability.
    • How: UI is componentized into blocks and reusable UI primitives, with typed server actions and API handlers.
  • Bun
    • Why: Fast package management and developer workflow.
    • How: Scripts for Prisma generation, migrations, and local development use bun commands.

Data and Persistence

  • PostgreSQL + Prisma ORM
    • Why: Relational model fits users, sessions, projects, project media, and contact requests; Prisma adds type safe queries.
    • How: Schema lives in prisma/schema.prisma; generated Prisma client is used in server actions and route handlers.
  • Dragonfly (Redis)
    • Why: Fast key value caching with Redis protocol compatibility.
    • How: Caches project listings and business info; cache keys are invalidated on admin updates.

Authentication and Authorization

  • better-auth
    • Why: Full auth system with session support and admin plugin in one package.
    • How: Session checks and role checks gate admin pages, server actions, and API endpoints.
  • Role based admin access
    • Why: Keeps content management and sensitive data restricted to authorized users.
    • How: Route handlers validate session and require role checking before performing privileged actions.

UI and Frontend Experience

  • Tailwind CSS 4 + shadcn/ui + Radix UI
    • Why: Fast UI composition with accessible primitives and consistent styling patterns.
    • How: Reusable components are organized under src/components/ui and consumed by both public and admin interfaces.
  • Framer Motion, Recharts, Embla, Tiptap
    • Why: Better user experience for motion, dashboard charting, carousel interactions, and rich text editing.
    • How: Used in section blocks and admin editing views where richer interaction is needed.

Integrations

  • UploadThing
    • Why: Type safe file uploads with managed file infrastructure.
    • How: Admin authenticated upload routes power project media workflows.
  • Resend + React Email
    • Why: Reliable transactional delivery with reusable email templates.
    • How: Contact submissions generate React based email content and send through Resend.
  • Cloudflare Turnstile
    • Why: Bot resistance for lead capture endpoints.
    • How: Contact API verifies Turnstile token before processing submission.
  • next-intl
    • Why: Localization readiness from early architecture stages.
    • How: Request config and message files are in place, currently configured with English locale.

Architecture and Implementation Notes

  • Two sided product architecture: Public marketing site and admin control panel share one codebase.
  • Server first data flow: Prisma queries run in server actions and API routes, not in browser clients.
  • Caching strategy: Redis layer reduces repeated DB reads for public project and business info lookups.
  • Operational resilience in CI: Config can swap Prisma and Redis to stub behavior during CI or no infrastructure runs.
  • Media aware domain model: Project and ProjectMedia relations support galleries and dedicated thumbnails.