Workspace Overview
The repository is organized into workspaces defined in the rootpackage.json:
package.json
Directory Structure
Apps
Each app is a standalone application that can be developed and deployed independently.Web (apps/web/)
Next.js web application
- Framework: Next.js 15 with App Router
- UI Library: shadcn/ui components
- Styling: Tailwind CSS
- Key directories:
src/app/(auth)/- Authentication routessrc/app/(settings)/- Settings and admin pagessrc/components/- React componentssrc/lib/- Utility functions and hooks
- Dev command:
bun run dev:web - Build output:
.next/
Mobile (apps/mobile/)
Expo React Native mobile app
- Framework: Expo with React Native
- Key directories:
app/(auth)/- Authentication flowsapp/(tabs)/- Tab-based navigationcomponents/- React Native componentslib/hooks/- Custom React hooks
- Dev command:
bun run dev:mobile - Platforms: iOS and Android
Desktop (apps/desktop/)
Tauri v2 desktop application
- Frontend: React + Vite
- Backend: Rust (Tauri)
- Key directories:
src/- React frontend componentssrc-tauri/- Rust backend (commands, permissions)vite.config.ts- Vite configurationtauri.conf.json- Tauri configuration
- Dev command:
bun run dev:desktop - Requirements: Rust toolchain
Extension (apps/extension/)
Browser extension built with Wxt
- Framework: Wxt (Web Extension Toolkit)
- Key files:
src/background.ts- Background service workersrc/content.tsx- Content scriptssrc/popup.tsx- Extension popup UI
- Dev command:
bun run dev:extension - Build command:
bun run build:extension - Output:
dist/directory
Raycast (apps/raycast/)
Raycast extension
- Framework: Raycast API
- Dev command:
bun run dev:raycast - Build command:
bun run build:raycast - Publish command:
bun run publish:raycast
Docs (apps/docs/)
Documentation site
- Framework: Next.js with Fumadocs
- Content: MDX files in
content/docs/ - Key directories:
app/(home)/- Homepageapp/docs/[[...slug]]/- Documentation pagescontent/docs/- MDX contentcomponents/- Custom components
- Dev command:
bun run dev:docs - URL:
http://localhost:3001
Packages
Shared packages used across multiple apps.Convex (packages/convex/)
Backend-as-a-Service with Convex
- Purpose: Backend functions, database schema, workflows, and shared utilities
- Key directories:
_generated/- Auto-generated Convex types and APIworkflows/- Convex workflows (card processing, link metadata)ai/- AI processing functionscard/- Card-related functionsshared/- Shared utilities, constants, and hooks
- Key files:
schema.ts- Database schema definitionsconvex.config.ts- Convex configurationauth.config.ts- Better Auth configurationcrons.ts- Scheduled functionsindex.ts- Main entry point
- Dev command:
bun run dev:convex - Import alias:
@teak/convex
The Convex package is imported by all client apps and provides the unified backend API.
UI (packages/ui/)
Shared UI components package
- Purpose: Reusable UI components across apps
- Import alias:
@teak/ui
Turborepo Pipeline
Turborepo orchestrates task execution across the monorepo usingturbo.json.
Configuration
turbo.json
Task Pipeline
- build
- dev
- lint
- typecheck
- test
- Dependencies: Builds dependencies first (
^build) - Inputs: Source files, environment files
- Outputs:
.next/,dist/,.output/ - Environment: Exposes required env vars
Running Tasks
Watch Mode
Many dev commands useturbo watch for hot reloading:
Dependency Management
Package Overrides
The rootpackage.json enforces specific versions:
Adding Dependencies
TypeScript Paths
Workspaces can import shared packages using aliases:Caching and Performance
Remote Caching
Turborepo can cache build outputs remotely (enabled by default):- Skip rebuilding unchanged packages
- Share cache across team members
- Faster CI/CD pipelines
Local Cache
Cache stored in:node_modules/.cache/turbo/.turbo/directories in each workspace
Clear Cache
- Turbo daemon
node_modules/.cache- All
.turbodirectories
Development Workflows
Full Stack Development
Backend-Only Development
Multi-Platform Development
Pre-commit Hooks
Thesimple-git-hooks package runs tasks before commits:
package.json
pre-commit script runs:
Next Steps
Local Setup
Set up your local development environment
Convex Backend
Learn about the Convex backend architecture