Skip to content

darkroomengineering/satus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SATUS

SatΕ«s

A modern, high-performance React application starter with Next.js 15, React 19, Tailwind CSS v4, and advanced WebGL capabilities. SatΕ«s means "start" or "beginning" in Latin, serving as a foundation for new projects.

Ask DeepWiki

Note: This README is for developers working on the SatΕ«s template. For client/team handoff documentation, see PROD-README.md (replace this README in production projects).

Quick Start

# Install dependencies
bun install

# Create .env.local (see Environment Variables below)
# touch .env.local

# Start development server with Turbopack
bun dev

# Build for production
bun build

# Start production server
bun start

πŸ›  Tech Stack

πŸ“ Project Structure

satus/
β”œβ”€β”€ app/                    # Next.js App Router pages and layouts
β”œβ”€β”€ components/             # Reusable UI components
β”œβ”€β”€ hooks/                  # Custom React hooks
β”œβ”€β”€ integrations/           # Third-party service integrations
β”‚   β”œβ”€β”€ hubspot/           # HubSpot forms integration
β”‚   β”œβ”€β”€ shopify/           # E-commerce functionality
β”‚   └── sanity/            # Headless CMS
β”œβ”€β”€ libs/                   # Utility functions and helpers
β”œβ”€β”€ orchestra/              # Debug and development tools
β”‚   β”œβ”€β”€ grid/              # Grid overlay
β”‚   β”œβ”€β”€ minimap/           # Page minimap
β”‚   β”œβ”€β”€ stats/             # Performance stats
β”‚   └── theatre/           # Animation tools
β”œβ”€β”€ styles/                 # Global styles and configuration
β”œβ”€β”€ webgl/                  # 3D graphics and WebGL components
└── public/                 # Static assets

Key Features

Performance Optimized

  • Turbopack for lightning-fast HMR in development
  • React Server Components by default
  • Dynamic imports for code splitting
  • Image optimization with a custom thin wrapper around Next.js Image
  • Font optimization with Next.js Font

Modern Styling

  • Tailwind CSS v4 with CSS-first configuration
  • CSS Modules for component styles
  • Custom viewport units (mobile-vw, desktop-vw)
  • Theme support with CSS variables

Advanced Graphics

  • WebGL/Three.js integration with React Three Fiber
  • Post-processing effects pipeline
  • Shader support with GLSL
  • Theatre.js for animation debugging
  • Optimized 3D performance

Developer Experience

  • TypeScript with strict mode
  • Biome for consistent code style
  • Hot Module Replacement with Turbopack
  • Git hooks with Lefthook
  • Debug tools accessible with CMD+O

Third-Party Integrations

  • Sanity - Headless CMS with visual editing
  • Shopify - E-commerce with cart functionality
  • HubSpot - Forms and marketing automation

Managing Integrations

Check which integrations are configured:

bun validate:env              # Check environment setup
bun cleanup:integrations      # List unused integrations

Remove unused integrations to reduce bundle size (~250-400KB potential savings). See Integrations Documentation for detailed removal instructions.

🎨 Styling System

CSS Modules

Components use CSS modules with the s import convention:

import s from './component.module.css'

function Component() {
  return <div className={s.wrapper} />
}

Responsive Design

Custom viewport functions for responsive sizing:

.element {
  width: mobile-vw(150);    /* 150px at mobile viewport */
  height: desktop-vh(100);  /* 100px at desktop viewport */
}

Theme Variables

CSS variables for consistent theming:

.element {
  color: var(--color-text);
  background-color: var(--color-background);
}

πŸ”§ Development Tools

Debug Panel (CMD+O)

  • Theatre.js Studio - Visual animation editor
  • FPS Meter - Performance monitoring
  • Grid Overlay - Layout debugging
  • Minimap - Page overview

Available Scripts

# Development
bun dev                     # Start dev server with Turbopack
bun build                   # Production build
bun start                   # Start production server

# Code Quality
bun lint                    # Run Biome linter
bun lint:fix                # Fix linting issues
bun typecheck               # TypeScript validation

# Utilities
bun setup:styles            # Generate style files
bun watch:styles            # Watch style changes
bun validate:env            # Check environment variables
bun cleanup:integrations    # List unused integrations
bun analyze                 # Bundle analysis

🌐 Environment Variables

Create a .env.local file with:

# Sanity CMS
NEXT_PUBLIC_SANITY_PROJECT_ID="your-project-id"
NEXT_PUBLIC_SANITY_DATASET="production"
NEXT_PUBLIC_SANITY_STUDIO_URL="http://localhost:3000/studio"
SANITY_API_WRITE_TOKEN="your-write-token"

# Shopify
SHOPIFY_STORE_DOMAIN="your-store.myshopify.com"
SHOPIFY_STOREFRONT_ACCESS_TOKEN="your-storefront-token"
SHOPIFY_REVALIDATION_SECRET="your-random-secret"

# HubSpot
HUBSPOT_ACCESS_TOKEN="your-access-token"
NEXT_PUBLIC_HUBSPOT_PORTAL_ID="your-portal-id"

# App Base URL
NEXT_PUBLIC_BASE_URL="http://localhost:3000"

πŸ“š Documentation

Deployment

Deploy to Vercel (recommended):

vercel

Pre-deployment Checklist

  • Environment variables configured
  • Sanity webhooks set up
  • GSAP license valid (if using premium)
  • SSL certificates configured
  • Performance metrics validated

Other Platforms

Supports any Next.js-compatible platform: Vercel, Netlify, AWS Amplify, Google Cloud Run, or self-hosted.

Important Notes

Images & Links

  • βœ… Always use ~/components/link (auto-detects external, smart prefetch)
  • βœ… Always use ~/components/image for DOM (never next/image)
  • βœ… Use ~/webgl/components/image in WebGL contexts

GSAP & Animation

  • Add <GSAPRuntime /> in app/layout.tsx for ScrollTrigger + Lenis
  • No manual ticker setup needed

Sanity

  • Requires draft mode routes: /api/draft-mode/enable and /api/draft-mode/disable
  • Must set NEXT_PUBLIC_BASE_URL for preview resolution

Orchestra

  • Toggle debug tools with Cmd/Ctrl + O
  • State persists in localStorage and syncs across tabs
  • Automatically excluded from production builds

Shopify

  • Use exact env var names: SHOPIFY_STORE_DOMAIN, SHOPIFY_STOREFRONT_ACCESS_TOKEN

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/fix-everything)
  3. Commit your changes (git commit -m 'Add fix everything feature')
  4. Push to the branch (git push origin feature/fix-everything)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Built by darkroom.engineering
  • Inspired by modern web development best practices
  • Community contributions and feedback