Skip to content

cryptocrystian/sapient-digital

Repository files navigation

sapient-digital website

Dark-first, enterprise-grade marketing site for Sapient Digital (integrated PR, Content, SEO). Built with Next.js 15 (App Router) + TypeScript + Tailwind + shadcn/ui and a tokenized design system.

✨ Features

Dark-first design system with CSS variables + Tailwind mapping

Modular sections (Hero, Services, Case Studies, Approach, Contact)

Reusable UI components (Buttons, Cards, Stat Chips, Pricing, FAQ)

MDX-ready content types (Services, Case Studies, Posts)

Accessibility: visible focus, reduced-motion, landmarks, labels

SEO/SGE: metadata, JSON-LD, sitemap, robots

Analytics hooks (events.ts) for CTAs, forms, case study opens

Minimal /api/lead endpoint (stub) for future email/CRM integration

🧱 Tech Stack

Framework: Next.js 15, App Router, TypeScript

UI: Tailwind CSS (build, not CDN), shadcn/ui, lucide-react

Fonts: Inter & Inter Tight via next/font

Content: MDX (optional later), typed models

Analytics: lightweight gtag/GTM wrapper

Deploy: Vercel (recommended)

🚀 Getting Started Prereqs

Node 18+

npm or pnpm

Install & run npm install npm run dev

Build & start npm run build npm start

📦 Scripts pnpm dev # local dev pnpm build # production build pnpm start # run production pnpm lint # (optional) add eslint config if needed

🔧 Environment (optional for later integrations)

Create .env.local (values can be empty for now):

Analytics (optional)

NEXT_PUBLIC_GA_ID=

Mail (optional, when wiring notifications)

MAILGUN_API_KEY= MAILGUN_DOMAIN= MAIL_FROM="Sapient Digital noreply@sapient.digital" MAIL_TO=you@yourdomain.com

The /api/lead route is a stub; you’ll wire Mailgun later.

🎨 Design System

CSS Tokens (see app/globals.css)

bg: 900 #0F1613 · 800 #13201A · 700 #183125 fg: 100 #E7F1EB · 300 #A7B3AD · 500 #8C9A95 accent: 500 #33B07A · 400 #46C38A gold: 400 #D4B266 line: 700 rgba(255,255,255,.08) · 600 rgba(255,255,255,.12) state: danger #E05A5A · info #6BB4FF · warn #E6A94B

Tailwind mapping (see tailwind.config.ts)

bg.900/800/700, fg.100/300/500, accent.500/400, gold.400, line.700/600, state.danger/info/warn

Type scale

h1 48/56, h2 36/44, h3 28/36, h4 22/30, body 16/26, small 14/22, micro 12/18

Headings: Inter Tight 600–700; Body: Inter 400–500

🗂️ Project Structure app/ (marketing)/ _sections/ hero.tsx services.tsx case-studies.tsx approach.tsx contact.tsx page.tsx services/page.tsx work/page.tsx approach/page.tsx pricing/page.tsx resources/page.tsx about/page.tsx contact/page.tsx api/lead/route.ts sitemap.ts robots.txt components/ Header.tsx Footer.tsx StatChip.tsx ServiceCard.tsx CaseStudyCard.tsx ApproachStep.tsx ui/Button.tsx lib/ analytics.ts schema.ts utils.ts types/ service.ts case-study.ts public/ logos/, images/, og/*

🧩 Key Components

Header — sticky, translucent on scroll, accessible nav

Button — primary / ghost, tokenized

StatChip — KPI label/value/delta display

ServiceCard, CaseStudyCard, ApproachStep — section blocks

Footer — legal links, (optional) Saipien badge

ContactForm — labeled inputs, aria-invalid, helper text (expand later)

🧠 Accessibility

Semantic landmarks:

One

per page; consistent heading order

Visible focus ring (focus-visible)

Respect prefers-reduced-motion for transitions/animations

Forms: use + id, error states with aria-invalid and aria-describedby

Contrast AA+ for body text and controls

🔎 SEO / SGE

Basic metadata in app/layout.tsx

Organization JSON-LD helper in lib/schema.ts

app/sitemap.ts + app/robots.txt

OG images in /public/og/ (add later)

📈 Analytics

Light wrapper in lib/analytics.ts:

events.cta_click(where, label) events.form_start(id) events.form_submit(id, ok)

Hook from CTAs, form submit, and case study opens.

📨 API Routes

POST /api/lead — accepts JSON, returns { ok: true }. Add zod validation + Mailgun send later.

☁️ Deploy (Vercel)

Push repo to GitHub

Import on Vercel → set Environment Variables (if any)

Build command: pnpm build (Vercel auto-detects)

Set production domain (e.g., sapient.digital)

Add sitemap & robots routes to Vercel config if needed

✅ Quality Gates (Acceptance)

No console errors in dev/production

Lighthouse (Home): ≥ 90 Perf / Accessibility / Best Practices

Keyboard navigable; visible focus; reduced-motion respected

Tokens used everywhere (no stray hex values)

Pages scaffolded: /services, /work, /approach, /pricing, /resources, /about, /contact

🛠️ Dev Workflow

Build new UI as a component in components/

Consume it in a page section under app/(marketing)/_sections/

Keep tokens (bg/fg/accent/gold/line) — no hard-coded colors

Add analytics events for interactive elements

Write brief JSDoc comments for shared utilities/components

📝 TODOs / Next Steps

  1. Email Integration

    • Wire up /api/lead route with Mailgun or SendGrid
    • Add email templates for lead notifications
    • Add auto-response email to submitters
  2. Analytics Integration

    • Add Google Analytics (GA4) or GTM tracking code
    • Wire up analytics events in lib/analytics.ts
    • Set up conversion tracking
  3. Content Management

    • Set up MDX for blog posts in /resources
    • Create case study detail pages in /work/[slug]
    • Add service detail pages in /services/[slug]
  4. Design Enhancements

    • Add OG images for social sharing (/public/og/)
    • Create favicon set and app icons
    • Add loading states and skeleton screens
  5. shadcn/ui Components (Optional)

    • Run npx shadcn-ui@latest init if you want the full shadcn setup
    • Add Accordion, Dialog, Tooltip, Tabs as needed
    • The current Button component can be replaced with shadcn's Button
  6. Advanced Features

    • Add animations using Framer Motion
    • Implement scroll-triggered animations
    • Add dark/light mode toggle (optional, currently dark-first)
    • Build out pricing calculator or interactive pricing
  7. Testing & Quality

    • Add E2E tests with Playwright or Cypress
    • Run Lighthouse audits and optimize
    • Test keyboard navigation thoroughly
    • Add form validation improvements
  8. Performance

    • Optimize images with next/image
    • Add image placeholders and lazy loading
    • Implement edge caching strategies
  9. Legal & Compliance

    • Add Privacy Policy and Terms of Service pages
    • Implement cookie consent banner (if needed)
    • Add GDPR compliance features
  10. SaaS Landing Variant (Stretch)

    • Create /saas route with SaaS-specific copy
    • Adapt hero and sections for product-led messaging

🎯 What Was Built

This production-ready Next.js 15 app includes:

Core Infrastructure

  • ✅ Next.js 15 with App Router and TypeScript
  • ✅ Tailwind CSS with custom design tokens
  • ✅ Dark-first design system with CSS variables
  • ✅ Custom fonts (Inter & Inter Tight) via next/font
  • ✅ SEO-optimized with sitemap and robots.txt
  • ✅ Accessible components with ARIA labels and keyboard navigation

Pages & Routes

  • Home (/) - Full marketing page with all sections
  • Services (/services) - Placeholder page
  • Case Studies (/work) - Placeholder page
  • Approach (/approach) - Placeholder page
  • Pricing (/pricing) - Placeholder page
  • Resources (/resources) - Blog placeholder
  • About (/about) - Company info page
  • Contact (/contact) - Contact form page
  • API (/api/lead) - Lead form endpoint (stub)

Components

  • ✅ Header with sticky navigation
  • ✅ Footer with links and Saipien Labs attribution
  • ✅ Button component with variants (primary, ghost)
  • ✅ StatChip for KPI display
  • ✅ ServiceCard for service listings
  • ✅ CaseStudyCard with results and testimonials
  • ✅ ContactForm with validation and states

Sections (Home Page)

  • ✅ Hero section with headline and KPIs
  • ✅ Services section (3 service cards)
  • ✅ Case Studies section (2 detailed case studies)
  • ✅ Approach section (4-step process)
  • ✅ Contact section with form

Utilities & Types

  • ✅ Analytics event wrapper (lib/analytics.ts)
  • ✅ Schema.org JSON-LD helper (lib/schema.ts)
  • ✅ Tailwind utility merger (lib/utils.ts)
  • ✅ TypeScript types for Service and CaseStudy

Build Quality

  • ✅ Production build passes with no errors
  • ✅ ESLint compliant
  • ✅ TypeScript strict mode enabled
  • ✅ All pages statically generated
  • ✅ Optimized bundle sizes (First Load JS: ~102-115 kB)

🚢 Ready to Deploy

The app is production-ready and can be deployed to Vercel immediately:

# Commit and push to GitHub
git add .
git commit -m "Production-ready Sapient Digital website"
git push

# Then deploy via Vercel dashboard or CLI
vercel

The build is optimized, accessible, and SEO-ready!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors