Overview
packages/shared is a pnpm workspace package consumed by apps/mobile and apps/web. The web interim app (apps/web-interim) does not depend on it — it’s a lightweight standalone app with no shared package imports. When Phase 2 begins and the full web client is built out, both apps/mobile and apps/web will share types, validation, and constants through this package.
Types
Database Types (types/database.ts)
Snake_case types matching the Supabase schema directly:
Profile, ProfileStats, Recipe, RecipeWithStats, RecipeImage, RecipeTag, Collection, CollectionWithStats, Post, PostWithStats, PostImage, PostTag, LightroomSettings, Follow, RecipeFavorite, PostFavorite, RecipeRepost, PostRepost, CollectionRepost, PostComment, PostCommentMention, RecipeCommentMention, Notification, NotificationWithActor.
API Types (types/api.ts)
CamelCase types for API request/response contracts:
Form Types (types/forms.ts)
Zod-inferred types for React Hook Form:
Validation Schemas
All Zod schemas live invalidation/index.ts and are used both client-side (form validation) and server-side (API route validation):
Fujifilm Settings Schema
Validates all camera settings with proper ranges:| Setting | Range |
|---|---|
highlight | -2 to +4 |
shadow | -2 to +4 |
color | -4 to +4 |
sharpness | -4 to +4 |
noiseReduction | -4 to +4 |
clarity | -5 to +5 |
whiteBalanceRed/Blue | -9 to +9 |
kelvin | 2500 to 10000 |
Constants
Fujifilm Options
Theme Tokens (constants/theme.ts)
Design tokens for consistent styling across web and mobile:
Routes (constants/routes.ts)
Platform-specific route constants:
Other Constants
API Utilities
ApiClient
Platform-agnostic HTTP client with automatic JSON handling and error parsing:get, post, patch, put, delete. All include credentials: 'include' for cookie-based auth.
Query Keys
React Query key factory for consistent cache management:buildQueryString
Tag Suggestions
Comprehensive tag suggestion system for photography content:RECIPE_TAGS (film stock names), MOOD_TAGS, SEASON_TIME_TAGS, GENRE_TAGS, LOCATION_SUBJECT_TAGS, TECHNICAL_TAGS, COLOR_TAGS.