For DevelopersServices
Client Service (apps/client)
React 18 + Vite + Chakra UI + Clerk. Built as a static site and served via serve in Docker.
Key scripts (apps/client/package.json)
dev:bun --env-file='../../.env' run --bun vite --hostbuild:bunx vite buildstart:bunx serve -s dist -l 5173
Vite configuration (apps/client/vite.config.js)
- Base
/, PWA enabled, assets cached up to 5MB, alias@ -> /src - Dev server on port 5173
Dependencies
- UI: Chakra UI, Emotion, Framer Motion
- Auth:
@clerk/clerk-react - Data: TanStack React Query
- Maps: Mapbox GL,
react-map-gl - Analytics: Mixpanel
- Error monitoring: Sentry
- Types:
@sharingexcess/types
Environment (build args in Dockerfile)
VITE_API_URL,VITE_CLERK_PUBLISHABLE_KEY,VITE_MIXPANEL_PROJECT_TOKEN,VITE_SENTRY_DSN,VITE_ENV_NAME,VITE_STORAGE_BASE_URL,VITE_MAPBOX_TOKEN
Docker image (apps/client/Dockerfile)
- Multi-stage: build with Bun, compile server once to produce Hono exports, then
vite build - Runtime: minimal image serving
distwithserveon 5173
Railway (apps/client/railway.json)
- Builder: DOCKERFILE (path
apps/client/Dockerfile) - Staging: 1 replica, sleep enabled
- Production: 2 replicas
Local dev
bun devat root runs server then client (Turbo dependency)- Or
cd apps/client && bun run dev