Skip to main content
Version: 1.0.0
Last Updated: 2025-12-31
Target Audience: Developers
Quick reference for common development tasks, patterns, and gotchas in Encore OS Platform.

Common Commands

CodeRabbit Review

See: CODE_REVIEW_PROCESS.md for complete workflow

Build & Test

Git Workflow


Common Patterns

Spacing Patterns

Page Container:
Vertical Spacing:
Grid Spacing:
See: SPACING_AND_UX_STANDARDS.md for complete guide

Color Tokens

Semantic Colors:
See: SEMANTIC_COLORS.md for complete color reference

Icon Usage

Import Pattern:
Size Guidelines:
  • Small: 16px (w-4 h-4)
  • Medium: 20px (w-5 h-5)
  • Large: 24px (w-6 h-6)
See: ICON_GUIDE.md for complete guide

Common Components

OverviewPageWrapper

Standardized wrapper for module overview pages with pull-to-refresh:

PageContainer

Provides consistent responsive page-level padding.
Spacing Options: sm, md, lg

ResponsiveFormLayout

Responsive column layouts for forms.

MobileTableWrapper

Horizontal scroll wrapper for wide tables with visual indicators.

PermissionGate

Conditional rendering based on permissions.

useCurrentUser Hook

Centralized user authentication hook.

Common Gotchas

❌ React.lazy for Routes (REQUIRED)

❌ WRONG:
✅ CORRECT:
Why: Code splitting improves performance and reduces initial bundle size.

❌ Loading States (Never Return Null)

❌ WRONG:
✅ CORRECT:
Why: Prevents layout shift and provides better UX.

❌ Permissions Checks

❌ WRONG:
✅ CORRECT:
Why: Supports granular permissions and V2 system.

❌ useCurrentUser Hook (REQUIRED)

❌ WRONG:
✅ CORRECT:
Why: Caches user across component mounts (1 API call vs 162+).

❌ Static Supabase Imports (REQUIRED)

❌ WRONG:
✅ CORRECT:
Why: Ensures proper module initialization and avoids dynamic import issues.

❌ QueryClient Configuration

❌ WRONG:
✅ CORRECT:
Why: Optimizes performance and reduces unnecessary network requests.

Setup & Configuration

Standards & Patterns

Code Quality