Skip to main content

Templates

React Web Template

  • API Client & Data Fetching:
    • TanStack Query (for async server state, caching, and retries).
    • Request/Response interceptors (for auth injection and error mapping).
  • Global Error Handler:
    • ErrorBoundary (class component for React UI render errors).
    • window.addEventListener('error') (for synchronous JS execution errors).
    • window.addEventListener('unhandledrejection') (for silent Promise rejections).
  • Input Validation: valibot (for lightweight i18n schema parsing).
  • Global State Management: zustand (for predictable client state).
  • Web Workers for File Uploads:
    • Off-thread image optimization, reformatting, resizing, and chunked uploads.
  • Websocket Compatibility: Client integration corresponding to backend Pub/Sub events.
  • i18n (Internationalization):
    • Translated validation messages.
    • Mapped API response messages.
  • Tailwind Setup: Utility-first CSS styling architecture.
  • Code Quality: ESLint and Prettier rules strictly enforced.

Expo React Native Template

  • Observability & Centralized Error Handling:
    • React UI render errors (Custom Class-based ErrorBoundary → Go Backend).
    • Critical JS/Network errors (ErrorUtils.setGlobalHandler → Go Backend).
    • Native OS/OOM/C++ crashes (Firebase Crashlytics via @react-native-firebase).
  • API Client & Data Fetching:
    • Native fetch with custom error interceptor wrapper.
    • TanStack Query (for async server state, caching, and offline retries).
    • Websocket logic for payments and waste collection.
  • Environment & Version Management:
    • Dynamic environments and auto-incrementing versions/build IDs (app.config.ts).
    • Native module auto-linking (Expo Plugins).
    • Continuous Native Production (npx expo prebuild for manual Xcode/Android Studio builds).
  • Routing & Deep Linking: Expo Router for file-based navigation and universal links.
  • Storage Architecture:
    • Fast synchronous local cache (React Native MMKV).
    • Compatible encrypted storage for JWTs and sensitive data (expo-secure-store).
  • Input Validation & Forms: React Hook Form wired with valibot schemas.
  • Global State Management: zustand (for client state).
  • i18n (Internationalization):
    • UI translations and API responses (expo-localization + i18next).
    • Native permission prompts (auto-linked locales JSON files in config).
  • Optimized Assets:
    • expo-image (for heavily cached, progressive rasters).
    • react-native-svg (for vector icons/illustrations).
  • Styling Engine: NativeWind for 1:1 Tailwind compatibility with React web app.
  • Code Quality: Expo standard ESLint and Prettier setup.

Go Backend Template

  • DDD File Structure: Domain-Driven Design layout for clear boundary separation.
  • Layered Architecture: Strict Handler → Service → Repository pattern.
  • Global Error Handler: Centralized catching, formatting, and routing of panics and standardized errors.
  • Observability: OpenTelemetry (OTEL) compliant tracing, metrics, and structured logging.
  • Configuration Management: Environment-based configuration injection.
  • Database Access: sqlc for type-safe repository generation.
  • Input Validation: Strict request payload validation.
  • Cache Setup: Standardized interface for Redis/Memcached.
  • CORS Configuration: Secure cross-origin policies for React and Expo clients.
  • Rate Limiting: IP/User-based throttling (comprehensively scoped, especially for external APIs like Yandex and Google Maps).
  • Websocket Support: Real-time bidirectional events (payments, waste collection).
    • Scale Requirement: Must include Pub/Sub (consumer/producer queues) for compatibility with horizontally scaled containerized applications.
  • Object Storage: Secure file upload flow via Pre-Signed URLs (S3/Blob Storage).
  • i18n (Internationalization):
    • Database-level localization strategy.
    • Custom success/error formats.
    • Translated validation messages.
  • Notifications: SMS gateway integration (pluggable for future channels).
  • Test Suite:
    • Unit tests (testify).
    • Integration tests (Testcontainers for real DB/Cache instances).
  • Docker Compatibility: Native configurations for AWS ECS and Azure ACA.
  • Feature Flags: (Optional/Nice-to-have) Dynamically alter endpoints or logic.